I defined a menu template that, in theory, should use the background of "AppBackground" SoliColorBrush, which separately File is defined.
In "Debug Mode", I use the following code to change that variable: Resources ["AppBackground"] = New SolidColorBrush (Colors.DarkGreen);
Its application has an intentional effect on the background, however, I have no effect on custom menu design. I have tried to use both static resources and dynamic resources without any luck. Is this a known issue, and is there a trick here?
Defined in the Resource Directory:
& lt; Solid codebrush x: key = "appbackground" color = "# 003466" /> defined in a file:
style x: key = "{x: type menu item}" target type = "{x: type menu item}" & Gt; & Lt; Setter Estates = "Template" & gt; & Lt; Setter.Value & gt; & Lt; ControlTemplate TargetType = "{x: Type menu item}" & gt; & Lt; Border x: name = "border" range = "1" & gt; & Lt; Grid Background = "{Binding Source = {Static Resources AppBackground}}" & gt;
Havant noticed that you have marked that with this dynamic bedding also I only saw the code because this is the reason I wrote my first answer:
Use dynamic binding, which should work.
The real problem is that you wrap the resource through a binding, remove this , as I wrote in my second post, forgive the chaos with many replies.
Grid Background = "{DynamicResource AppBackground}" & gt;
Comments
Post a Comment