wpf - DataTrigger Binding to a ToggleButton within another namespace -


I try to reach a togglebutton which is a dockpanel trigger within a different user control. Style Datatrigger.

Here it is said that when I have both the Toggleton and Docapenel namespace, then it is:

   & Lt; Style.Triggers & gt; & Lt; Data Trigger Binding = "{Binding Ischic, Element Name = DescriptionBugBlutton}" Value = "False" & gt; & Lt; Setter Property = "UIElement.Visibility" Value = "Collapsed" /> & Lt; / DataTrigger & gt; & Lt; /Style.Triggers> & Lt; / Style & gt; & Lt; /DockPanel.Style> & Lt; TextBox DocPanel.Doc = "Top" Text = "..." /> & Lt; / DockPanel & gt;  

But now when I move Toggleton to another file (other namespace) it does not work anymore. ElementName (as I think) works only for elements of the same file, so how can I manage the bindings for my togglebutton's iShack in another file?

Is there any suggestions? FYI, the word for which you are looking for is the area of ​​the name "FYI";

, And there is no way to refer to the element defined in another name field. Of course, you should not allow to to do so.

Rather than compounding a UI element in the other, consider complying both of them in a common property, either through some common ancestor element in their visual model, or dependent property through heritage.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -