I read some tutorials on building user controls in wpf before embarking on building my own. Many of these centred around creating a control based on a standard button with the facility to add an imge and custom text. Most of these also seemed to actively define the image dimensions and bind them to a dependency property so you might end up with xaml like this;
<Button Background="#00000000" x:Name="MyBtn" Height="Auto" Width="Auto" ToolTip="Click me to do something." BorderThickness="0">
<StackPanel Margin="2" Orientation="Horizontal">
<Image Source="{Binding ImageName, ElementName=DN}"
Width="{Binding ImageWidth, ElementName=DN}"
Height="{Binding ImageHeight, ElementName=DN}"/>
<TextBlock Margin="3" Text="{Binding BtnText,ElementName=DN}"/>
</StackPanel>
</Button>
Is it actually necessary to specifically define the Image Width and Height?
Thanks