views:

61

answers:

1

I have a TextBox control placed inside my window and I would like to change its Border. In order to do this, I have to somehow modify the existing Border set by the default control template.

Is there a way to modify only a part of a default control template (for a standard WPF control) by somehow overriding the existing objects?

+2  A: 

http://msdn.microsoft.com/en-us/library/aa970773.aspx

There is no way to replace only part of the visual tree of a control; to change the visual tree of a control you must set the Template property of the control to its new and complete ControlTemplate.

qntmfred
Makes sense. Would it be possible to somehow obtain the default control template without using Microsoft Expression Blend?
Dennis Delimarsky
That link I posted has links to the default templates, just scroll down the page a little
qntmfred
I've seen that. I was just curious if there is a way to somehow extract the existing template from a control directly from Visual Studio.
Dennis Delimarsky