<Button x:Name="btnSettingsOK" IsEnabled="{Binding 
ElementName=WinSettings,Path=IsDirty}" ... />
-or-

<Button x:Name=" btnSettingsOK " IsEnabled="{Binding IsDirty, 
ElementName=WinSettings}" ... /> 

Both Binding statements work. I can’t decide which feels more natural.





You can think of it like this in C#:



new Binding { ElementName = “WinSettings”, Path = “IsDirty” }



vs



new Binding(“IsDirty”) { ElementName = “WinSettings” }



The Binding class has a constructor that takes a path, so you can either pass 
that in (the second xaml snippet) or set it along with the other properties 
(the first). (Note that the C# code here is just for illustrative purposes and 
I doubt it compiles as-is. )



Matt

<<wlEmoticon-smile[1].png>>

_______________________________________________
ozwpf mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf

Reply via email to