Scale a Visual Brush Background WPF
Posted
by user279244
on Stack Overflow
See other posts from Stack Overflow
or by user279244
Published on 2010-03-21T12:11:07Z
Indexed on
2010/03/21
13:51 UTC
Read the original article
Hit count: 572
wpf
|visualbrush
Hello, I have a Item called MiniMap in my xaml. I have set the background of it to a visual brush representting a canvas Item. Now, I want to scale the background to a ratio 0.7 . How can I do it? Thanks in advance
<local:MiniMap Width="201" Height="134" x:Name="MiniMapItem" MinHeight="100" MinWidth="100" Opacity="1" SnapsToDevicePixels="True" Margin="0,0,20,20" VerticalAlignment="Bottom" HorizontalAlignment="Right">
<local:MiniMap.Background>
<VisualBrush Visual="{Binding ElementName=viewport}" Stretch="None" TileMode="None" AlignmentX="Left" AlignmentY="Top" />
</local:MiniMap.Background>
</local:MiniMap>
© Stack Overflow or respective owner