Permalink
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (25 sloc) 1.12 KB
<UserControl x:Class="ElementResourcesCustomControlLibrary.ShapeResizer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--<Snippet2>-->
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Dictionary1.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<!--</Snippet2>-->
<StackPanel>
<Slider Name="RectangleSize"
Width="100" Orientation="Horizontal"
Value="50" Minimum="0" Maximum="100"
SmallChange="1" LargeChange="10"
TickPlacement="BottomRight" TickFrequency="10"/>
<!--myBrush is a shared resource in dictionary1.xaml.-->
<Rectangle Fill="{StaticResource myBrush}"
Margin="0,20,0,0"
Height="{Binding ElementName=RectangleSize,Path=Value}"
Width="{Binding ElementName=RectangleSize,Path=Value}"/>
</StackPanel>
</UserControl>