tags:

views:

1713

answers:

2

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

+1  A: 

You would need to use the

myToolbar.Template.FindName("MainPanelBorder", myToolbar) as Panel 
   //Or whatever the type of the item is in the template.
Micah
A: 

Many thanks, and it works !

JackSpratt