Good Day,
I have a Silverlight user control that has several canvas controls within a Stack Panel. I know that I can set the Width and Height of each canvas panel manually in the Xaml, but I want them to be the same size.
Is there some way I can define a property in a UserControl.Resources location:
<UserControl.Resources>
<Setter Property Name="aWidth" Value="50" />
<Setter Property Name="aHeight" Value="50" />
</UserControl.Resources>
<StackPanel Orientation="Horizontal">
<Canvas x:Name="canvas1" Width="{StaticResource aWidth}" Height="{StaticResource aHeight}" />
<Canvas x:Name="canvas2" Width="{StaticResource aWidth}" Height="{StaticResource aHeight}" />
</StackPanel>
so that each panel is the same width and height and I only have to set it once.
TIA