c# - Binding to an ancestor in WPF -
I have a window in a assembly that has a text block control which I want to attach to the value of a class property which That is the property of Windows Parents DataContacts, the class which is serving as a data contantex is defined only within the second assembly. My question is, what type of requirement do I have to specify in my bond statement as type? Can I just use the type of property of the datacontent which is normal between two assemblies or do I need to use the type of datacontext?
Below is a prototype that I feel it should work, but I am not confused about anything :)
Assembly # 1
Strong>window
& lt; TextBlock Text = "{Compulsive Relative Soros = {Resultant Surge Origin Type = {x: Type Client: Client}}, Path = Name}" /> Assembly # 2
application shell set square shell {public client client} {client = value; }} On startup () {Navigation window window = new navigation window (); Window.DataContext = This; Window.Navigate (GetHomeView ()); }}
should do the following:
& Lt; TextBlock Text = "{binding relative source = {relative resource mode = search installer, exterior type = {x: type window}}, path = datacontext.client.name}" />
Comments
Post a Comment