0
votes

I have made one custom user control (search text box), which basically consists of one dock panel, and in the panel there are two controls: textbox and button.

I have set some default appearance for this control, which consists of setting a border on the user control, and setting no borders and no background on the textbox, and I have created a custom style for the button. So far this control looks the way I want, and is working correctly.

The problem arises when I want to allow themes for my application. When I put custom styles for basic windows controls (Button, TextBox, ListBox, etc), they are displayed properly with the new theme. But I don't know how to make a template for my custom control. Any attempt ended up in the control not showing at all at runtime.

What exactly must be done in the new template for this control? Do I need to make a template for the User control, and for the textbox and the button controls also?

1

1 Answers

0
votes

You are mixing up user controls and custom controls here. What you described above is a user control, and you cannot apply new templates to it.