Simple Border : Border « Windows Presentation Foundation « C# / C Sharp






Simple Border

Simple Border
     

<Window x:Class="Content.SimpleBorder"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="SimpleBorder" Height="300" Width="300">
  <Border Margin="5" Padding="5" Background="LightYellow" 
          BorderBrush="SteelBlue" BorderThickness="3,5,3,5" CornerRadius="3"
          VerticalAlignment="Top">
    <StackPanel>
      <Button Margin="3">One</Button>
      <Button Margin="3">Two</Button>
      <Button Margin="3">Three</Button>
    </StackPanel>
  </Border>
</Window>

   
    
    
    
    
  








Related examples in the same category

1.Set Border's BorderBrush to ImageBrushSet Border's BorderBrush to ImageBrush
2.Set Border Margin, BorderThickness, BorderBrush, Width and HeightSet Border Margin, BorderThickness, BorderBrush, Width and Height
3.Adding border to TextBlock with BorderAdding border to TextBlock with Border
4.Border with LinearGradientBrushBorder with LinearGradientBrush
5.Set border thicknessSet border thickness
6.Set border marginSet border margin
7.Set border corner radiusSet border corner radius
8.Display a BorderDisplay a Border
9.A custom pen to draw the bordersA custom pen to draw the borders
10.Change borderChange border