Margin: Left,Top,Right,Bottom : Margin « Containers « Silverlight






Margin: Left,Top,Right,Bottom

Margin: Left,Top,Right,Bottom
    

<UserControl x:Class="SilverlightApplication3.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="800" Height="600">

    <Canvas>

      <Border BorderBrush="Black" BorderThickness="1">
        <TextBlock Margin="0,10,20,30">0,10,20,30</TextBlock>
      </Border>

    </Canvas>


</UserControl>

   
    
    
    
  








Related examples in the same category

1.Using Margins and Alignment
2.Set MarginSet Margin
3.The darker area represents the Margin; the lighter area represents the Padding.The darker area represents the Margin; the lighter area represents the Padding.