Mega Code Archive

 
Categories / Silverlight / UI Controls
 

The button and text block are up-side down in the custom coordinate system

<UserControl x:Class='SilverlightApplication3.MainPage'     xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'      xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'     xmlns:d='http://schemas.microsoft.com/expression/blend/2008'      xmlns:mc='http://schemas.openxmlformats.org/markup-compatibility/2006'      mc:Ignorable='d'      d:DesignWidth='640'      d:DesignHeight='480'>   <Border BorderBrush="Black" BorderThickness="1" Height="200"     Width="200">     <Canvas Height="200" Width="200">             <Button Canvas.Top="50" Canvas.Left="80" FontSize="15" Foreground="Red"               Content="My Button">               <Button.RenderTransform>                 <ScaleTransform ScaleY="-1" />               </Button.RenderTransform>             </Button>             <TextBlock Canvas.Top="120" Canvas.Left="20" FontSize="12pt"               Foreground="Blue">               <TextBlock.RenderTransform>                 <ScaleTransform ScaleY="-1" />               </TextBlock.RenderTransform>             </TextBlock>     </Canvas>   </Border> </UserControl>