Mega Code Archive

 
Categories / C# / WPF
 

RotateTransform an ImageBrush

<Window x:Class="Workspace.DockExample"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     Title="Workspace" Width="640" Height="480">     <Rectangle Width="175" Height="90" Stroke="Black">       <Rectangle.Fill>         <ImageBrush ImageSource="c:\image.jpg">           <ImageBrush.RelativeTransform>             <RotateTransform CenterX="0.5" CenterY="0.5" Angle="45" />           </ImageBrush.RelativeTransform>         </ImageBrush>       </Rectangle.Fill>     </Rectangle> </Window>