StrokeDashArray: 1,4,1,2 / StrokeDashOffset: 1

image_pdfimage_print


   
   
<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">
    <Ellipse Grid.Row="6" Grid.Column="1" Width="150" Height="150"
               StrokeDashArray="1 4 1 2" StrokeDashOffset="1"
               Stroke="Black" StrokeThickness="3" Fill="Blue">
    </Ellipse>

</Window>

   
    
    
     


StrokeDashArray: 1 / StrokeDashOffset: 1

image_pdfimage_print


   
   

<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">
    <Ellipse Grid.Row="6" Grid.Column="2" Width="150" Height="150"
             StrokeDashArray="1" StrokeDashOffset="1"
             Stroke="Black" StrokeThickness="3" Fill="Blue">
    </Ellipse>

</Window>

   
    
    
     


Stretch = Uniform

image_pdfimage_print
   
    

<Window x:Class="Chapter05.ImageBrushExample"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Chapter05" Height="300" Width="300">
      <StackPanel Margin="5" Grid.Column="0" Grid.Row="1">
        <TextBlock Margin="5" Text="Stretch = Uniform" />
        <Button Width="135" Height="100">
          <Button.Background>
            <ImageBrush ImageSource="c:image.jpg" Stretch="Uniform" />
          </Button.Background>
        </Button>
      </StackPanel>
</Window>

   
    
    
    
     


Stretch = UniformToFill

image_pdfimage_print
   
    

<Window x:Class="Chapter05.ImageBrushExample"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Chapter05" Height="300" Width="300">
      <StackPanel Margin="5" Grid.Column="1" Grid.Row="1">
        <TextBlock Margin="5" Text="Stretch = UniformToFill" />
        <Button Width="135" Height="100">
          <Button.Background>
            <ImageBrush ImageSource="c:image.jpg" Stretch="UniformToFill" />
          </Button.Background>
        </Button>
      </StackPanel>
</Window>

   
    
    
    
     


Stretch = Fill

image_pdfimage_print


   
    

<Window x:Class="Chapter05.ImageBrushExample"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Chapter05" Height="300" Width="300">
      <StackPanel Margin="5" Grid.Column="1" Grid.Row="0">
        <TextBlock Margin="5" Text="Stretch = Fill" />
        <Button Width="135" Height="100">
          <Button.Background>
            <ImageBrush ImageSource="c:image.jpg" Stretch="Fill" />
          </Button.Background>
        </Button>
      </StackPanel>
</Window>

   
    
    
    
     


Stretch = None

image_pdfimage_print


   
    

<Window x:Class="Chapter05.ImageBrushExample"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Chapter05" Height="300" Width="300">
      <StackPanel Margin="5" Grid.Column="0" Grid.Row="0">
        <TextBlock Margin="5" Text="Stretch = None" />
        <Button Width="135" Height="100">
          <Button.Background>
            <ImageBrush ImageSource="c:image.jpg" Stretch="None" />
          </Button.Background>
        </Button>
      </StackPanel>
</Window>

   
    
    
    
     


StackPanel with StackPanel

image_pdfimage_print


   
    


<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      WindowTitle="StackPanel Sample">

    <StackPanel>
        <TabControl MinHeight="500" MinWidth="400">
            <TabItem Header="StackPanel" IsSelected="true">
                <StackPanel>
                    <Border Background="Red" BorderBrush="Black" BorderThickness="1">
                        <TextBlock Foreground="black" FontSize="12">Stacked Item #1</TextBlock>
                    </Border>
                    <Border Width="400" Background="Blue" BorderBrush="Black" BorderThickness="1">
                        <TextBlock Foreground="black" FontSize="14">Stacked Item #2</TextBlock>
                    </Border>
                    <Border Background="Yellow" BorderBrush="Black" BorderThickness="1">
                        <TextBlock Foreground="black" FontSize="16">Stacked Item #3</TextBlock>
                    </Border>
                    <Border Width="200" Background="Green" BorderBrush="Black" BorderThickness="1">
                        <TextBlock Foreground="black" FontSize="18">Stacked Item #4</TextBlock>
                    </Border>
                    <Border Background="White" BorderBrush="Black" BorderThickness="1">
                        <TextBlock Foreground="black" FontSize="20">Stacked Item #5</TextBlock>
                    </Border>
                </StackPanel>
            </TabItem>
        </TabControl>

    </StackPanel>

</Page>