I'm trying to reproduce a Visual Studio style toolbar with the two gradient backgrounds in C# code. I can see how to do it in XAML, but how do I drill into the object to change the backgound of its 'MainPanelBorder' border in my C# code ?
Thanks
I'm trying to reproduce a Visual Studio style toolbar with the two gradient backgrounds in C# code. I can see how to do it in XAML, but how do I drill into the object to change the backgound of its 'MainPanelBorder' border in my C# code ?
Thanks
You would need to use the
myToolbar.Template.FindName("MainPanelBorder", myToolbar) as Panel
//Or whatever the type of the item is in the template.