c# - Binding not working on GroupBox.HeaderTemplate -
I created a custom header for my group box like the following group:
I also want to set a binding set on the background of this header, so I The following code is written:
& Lt; / Border & gt; & Lt; / DataTemplate & gt; & Lt; /GroupBox.HeaderTemplate> & Lt; / GroupBox & gt; After the execution, I have the backend of the groupbox correctly, but not the header!
Is able to explain why he is not working?
You can use that way; & lt; Groupbox width = "130" height = "80" borderbrash = "black" margin = "5" grid. Roll = "0" background = "{binding H collar}" & gt; & Lt; GroupBox.Header & gt; & Lt; Border border border = "black" bordertyx = "1" corner radius = "3" horizontal align = "statch" width = "70" margin = "- 2,0, -3, -1" height = "20" background = "{ Binding path = h collar} "& gt; & Lt; TextBlock Text = "Hubs" Foreground = "Black" FontWeight = "DemiBold" horizontal align = "center" /> & Lt; / Border & gt; & Lt; /GroupBox.Header> & Lt; -! & Lt; DataTemplate & gt; & Lt; Border border border = "black" bordertyx = "1" corner radius = "3" horizontal align = "statch" width = "70" margin = "- 2,0, -3, -1" height = "20" background = "{ Binding path = h collar} "& gt; & Lt; TextBlock Text = "Hubs" Foreground = "Black" FontWeight = "DemiBold" horizontal align = "center" /> & Lt; / Border & gt; & Lt; / DataTemplate & gt; - & gt; & Lt; / GroupBox & gt;
Comments
Post a Comment