Den
Den

Reputation: 16826

Partially change a WPF template for a standard control

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?

Upvotes: 1

Views: 1707

Answers (1)

kenwarner
kenwarner

Reputation: 29120

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.

Upvotes: 2

Related Questions