Getting multi-connected “information” in a WPF output window

When I run my application, I get a lot of information, for example:

System.Windows.Data Information: 10 : Cannot retrieve value using the binding and 
no valid fallback value exists; using default instead. 
BindingExpression:Path=Period; DataItem=null; target element is 'TextBlock' (Name=''); 
target property is 'Text' (type 'String')

System.Windows.Data Information: 10 : Cannot retrieve value using the binding and 
no valid fallback value exists; using default instead. 
BindingExpression:Path=DocumentId; DataItem=null; target element is 'TextBlock' (Name=''); 
target property is 'Text' (type 'String')

Should I take care of this output?

+3
source share
2 answers

Yes you need. It is safer to handle anchor feedback (information, errors, etc.) Just like a compiler warning and errors. Binding problems tend to slow down the execution of an application because it forces the bindings to be re-read and, in my experience, sometimes breaks them down to where you need to recreate the binding in the code.

, , FallbackValue , . , , "Count", - , , <TextBlock Text={Binding Count, FallbackValue=0} />, "0" , .

+4

, , , ; , . , " ".

-

System.Windows.Data Information: 20: BindingExpression - . BindingExpression: Path = PlacementTarget.DataContext.RemoveCommand; DataItem = 'ContextMenu' (Name= ''); "MenuItem" (Name= ''); target "Command" ( "ICommand" )

PlacementTarget, , ;

- , , . , Hugo, -

BindingExpression path

WPF window like:

System.Windows.Data: 40: BindingExpression: 'AcquireFocus' 'object' '' DataSource ' (HashCode = 61327894). BindingExpression: Path = AcquireFocus; DataItem = 'DataSource' (HashCode = 61327894); 'VsButton' (Name= ''); "AcquireFocus" ( 'Boolean') *

, , . WPF , , . , . Studio 2010 WPF.

http://blogs.msdn.com/b/visualstudio/archive/2010/03/02/wpf-in-visual-studio-2010-part-2-performance-tuning.aspx

+1

Source: https://habr.com/ru/post/1767681/


All Articles