I am trying to reproduce a Visual Studio style toolbar with two gradient backgrounds in C # code. I can see how to do this in XAML, but how can I expand the object to change the binding of the "MainPanelBorder" border in my C # code?
thank
You will need to use
myToolbar.Template.FindName("MainPanelBorder", myToolbar) as Panel //Or whatever the type of the item is in the template.