I have a class that inherits from Button. In the XAML for the class, I have specified a Width and Height and Content, in the hope that when I use the VS2010 WPF designer to insert my control in e.g. a window, these would be the default values for those properties. However, the designer uses the default values from Button.
My control XAML:
<Button x:Class="Something.FunctionButton4"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="64" d:DesignWidth="64"
Height="64" Width="64" Content="FunctionButton"
OverridesDefaultStyle="True"
Focusable="False">
<Button.Template>
<ControlTemplate TargetType="Button">
...
</ControlTemplate>
</Button.Template>
</Button>
Designer generated XAML:
<my:FunctionButton4 Content="Button" Height="23" x:Name="functionButton43" Width="75" />
What do I need to do to control the designer defaults?