strana 93
---------
<Canvas Height="200" Width="200">
  <Line X1="0" Y1="0" X2="100" Y2="100" Stroke="Black" StrokeThickness="2" />
</Canvas>



strana 94
---------
<Canvas Height="200" Width="200">
  <Canvas.RenderTransform>
    <TransformGroup>
      <ScaleTransform ScaleY="-1" />
      <TranslateTransform Y="200" />
    </TransformGroup>
  </Canvas.RenderTransform>
  <Line X1="0" Y1="0" X2="100" Y2="100" Stroke="Black" StrokeThickness="2" />
</Canvas>




strana 95
---------
<UserControl
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  x:Class="kontejner1.MainPage"
  Width="640" Height="480">

  <Grid x:Name="LayoutRoot" Background="White" ShowGridLines="True">

    <Canvas Width="300" Height="200"  >
      <Line X1="10" Y1="10" X2="150" Y2="150"
        Stroke="Blue" StrokeThickness="4" />
    </Canvas>

  </Grid>
</UserControl>




strana 100
----------
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace kontejner1
{
  public partial class MainPage : UserControl
  {
    public MainPage()
    {
      // Required to initialize variables
      InitializeComponent();
      for (int c = 0; c < 100; c++)
      {
        double x = c * Math.PI;
        double y = 50 + 100 * Math.Sin(x/12);
        kmity.Points.Add(new Point(x, y));
      }
    }
  }
}




strana 102
----------
XAML:
<Polygon Name="kmity" Fill="LightGray" Stroke="Blue" StrokeThickness="2" />

C#:
public MainPage()
{
  // Required to initialize variables
  InitializeComponent();
  for (int c = 0; c < 97; c++)
  {
    double x = c * Math.PI;
    double y = 50 + 100 * Math.Sin(x/12);
    kmity.Points.Add(new Point(x, y));
  }
}



<StackPanel>
  <TextBlock Text="Elipsa" Margin="10 10 10 5"/>
  <Ellipse Width="200" Height="100" Fill="LightGray" Stroke="Black"/>
  <TextBlock Text="Kruh" Margin="10 10 10 5"/>
  <Ellipse Width="100" Height="100" Fill="LightGray" Stroke="Black"/>
</StackPanel>



strana 103
----------
<Grid x:Name="LayoutRoot" Background="White" ShowGridLines="True">

  <Grid.RowDefinitions>
    <RowDefinition Height="Auto"/>
    <RowDefinition/>
  </Grid.RowDefinitions>
  <Grid.ColumnDefinitions>
    <ColumnDefinition/>
    <ColumnDefinition/>
    <ColumnDefinition/>
  </Grid.ColumnDefinitions>

  <TextBlock Grid.Column="0" Grid.Row="0" Text="Fill" 
    TextAlignment="Center" Margin="5"/>
  <TextBlock Grid.Column="1" Grid.Row="0" Text="Uniform" 
    TextAlignment="Center" Margin="5"/>
  <TextBlock Grid.Column="2" Grid.Row="0" Text="UniformToFill" 
    TextAlignment="Center" Margin="5"/>
  <Ellipse Grid.Column="0" Grid.Row="1" Fill="LightGray"
    Stroke="Black" Stretch="Fill" Margin="5"/>
  <Ellipse Grid.Column="1" Grid.Row="1" Fill="LightGray"
    Stroke="Black" Stretch="Uniform" Margin="5"/>
  <Ellipse Grid.Column="2" Grid.Row="1" Fill="LightGray"
    Stroke="Black" Stretch="UniformToFill" Margin="5"/>
</Grid>




strana 106
----------
<Path Stroke="Black" StrokeThickness="3" Fill="LightGray">
  <Path.Data>
    <GeometryGroup FillRule="EvenOdd">
      <LineGeometry StartPoint="10,10" EndPoint="150,50" />
      <EllipseGeometry Center="80,140" RadiusX="60" RadiusY="60" />
      <RectangleGeometry Rect="70,120 200 50" />
    </GeometryGroup>
  </Path.Data>
</Path>


<Path Stroke="Black" StrokeThickness="3" >
  <Path.Data>
    <PathGeometry>
      <PathGeometry.Figures>
        <PathFigure StartPoint="10,50">
          <PathFigure.Segments>
            <BezierSegment Point1="50,0"
              Point2="160,120" Point3="200,200"/>
            <LineSegment Point="300,100" />
            <ArcSegment Size="50,50" RotationAngle="45"
              IsLargeArc="True" SweepDirection="Clockwise" 
              Point="160,-0"/>
          </PathFigure.Segments>
        </PathFigure>
      </PathGeometry.Figures>
    </PathGeometry>
  </Path.Data>
</Path>




strana 107
----------
<Path Stroke="Blue" StrokeThickness="3">
  <Path.Data>
    <PathGeometry>
      <PathFigure StartPoint="100,20">
        <PolyLineSegment Points="120,100,160,80,
          105,150,140,140,160,200"/>
      </PathFigure>
    </PathGeometry>
  </Path.Data>
</Path>
Mini-jazyk:
<Path Stroke="Blue" StrokeThickness="3"
  Data="M 100 20 L 120 100 L 160 80 L 105 150 L 140 140 L 160 200"/>




strana 113
----------
<Rectangle Width="300" Height="200">
  <Rectangle.Fill>
    <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
      <GradientStop Color="Red" Offset="0.0" />
      <GradientStop Color="Green" Offset="0.25" />
      <GradientStop Color="Blue" Offset="0.75" />
      <GradientStop Color="White" Offset="1.0" />
    </LinearGradientBrush>
  </Rectangle.Fill>
</Rectangle>




strana 115
----------
<Canvas Width="300" Height="200"  >
  <Rectangle Width="300" Height="200">
    <Rectangle.Fill>
      <LinearGradientBrush StartPoint="0,0">
        <!-- Prusvitna cast -->
        <GradientStop Color="#000000FF" Offset="0.0" />
        <!-- Neprusvitna casr -->
        <GradientStop Color="#FF0000FF" Offset="1.0" />
      </LinearGradientBrush>
    </Rectangle.Fill>
  </Rectangle>
</Canvas>


<Ellipse Width="200" Height="200">
  <Ellipse.Fill>
    <RadialGradientBrush>
      <GradientStop Color="Red" Offset="0.0" />
      <GradientStop Color="Green" Offset="0.25" />
      <GradientStop Color="Blue" Offset="0.75" />
      <GradientStop Color="White" Offset="1.0" />
    </RadialGradientBrush>
  </Ellipse.Fill>
</Ellipse>



strana 117
----------
<Canvas>
  <Rectangle StrokeThickness="20" Canvas.Left="40" Canvas.Top="40" 
    Width="100" Height="200"> 
    <Rectangle.Stroke> 
      <LinearGradientBrush > 
        <GradientStop Color="Blue" Offset="0"/> 
        <GradientStop Color="White" Offset="0.5"/> 
        <GradientStop Color="Red" Offset="1"/> 
      </LinearGradientBrush> 
    </Rectangle.Stroke> 
  </Rectangle> 
</Canvas>





strana 122
----------
<Rectangle Width="200" Height="80" Fill="Blue">
  <Rectangle.RenderTransform>
    <MatrixTransform>
      <MatrixTransform.Matrix >
        <Matrix OffsetX="50" OffsetY="10" M12="0.3" />
      </MatrixTransform.Matrix>
    </MatrixTransform>
  </Rectangle.RenderTransform>
</Rectangle>



strana 124
----------
<Rectangle Canvas.Left="50" Canvas.Top="10" Width="200" 
  Height="80" Fill="Blue">
  <Rectangle.RenderTransform>
    <RotateTransform Angle="30" />
  </Rectangle.RenderTransform>
</Rectangle>




<Rectangle Canvas.Left="50" Canvas.Top="10" 
  Width="200" Height="80" Fill="Blue">
  <Rectangle.RenderTransform>
    <ScaleTransform ScaleX="0.4" ScaleY="0.4" />
  </Rectangle.RenderTransform>
</Rectangle>

<Rectangle Canvas.Left="150" Canvas.Top="10" 
  Width="200" Height="80" Fill="Red">
  <Rectangle.RenderTransform>
    <ScaleTransform ScaleX="0.6" ScaleY="0.8" />
  </Rectangle.RenderTransform>
</Rectangle>




strana 125
----------
<Rectangle Canvas.Left="50" Canvas.Top="20" 
  Width="200" Height="80" Fill="Blue">
  <Rectangle.RenderTransform>
    <SkewTransform  CenterX="25" CenterY="35" AngleX="30" AngleY="10"/>
  </Rectangle.RenderTransform>
</Rectangle>




strana 126
----------
<Canvas> 
  <Rectangle Fill="Blue" Stroke="Black" 
    Width="100" Height="100" Canvas.Left="80" Canvas.Top="80"> 
    <Rectangle.RenderTransform> 
      <SkewTransform AngleX="45"/> 
    </Rectangle.RenderTransform> 
  </Rectangle> 

  <Rectangle Fill="LightBlue" Stroke="Black" Width="100" Height="100" 
    Canvas.Left="80" Canvas.Top="180"> 
    <Rectangle.RenderTransform> 
      <SkewTransform AngleX="45"/> 
    </Rectangle.RenderTransform> 
  </Rectangle> 

  <Rectangle Fill="Blue" Stroke="Black" 
    Width="100" Height="100" Canvas.Left="80" Canvas.Top="80"> 
    <Rectangle.RenderTransform> 
      <SkewTransform AngleY="45"/>
    </Rectangle.RenderTransform> 
  </Rectangle>
</Canvas>




strana 127
----------
<Rectangle Canvas.Left="50" Canvas.Top="20" 
  Width="200" Height="80" Fill="Gray">
  <Rectangle.RenderTransform>
    <TranslateTransform X="10" Y="5" />
  </Rectangle.RenderTransform>
</Rectangle>

<Rectangle Canvas.Left="50" Canvas.Top="20" 
  Width="200" Height="80" Fill="Blue">
</Rectangle>



strana 128
----------
<Rectangle Canvas.Left="50" Canvas.Top="20" 
  Width="200" Height="80" Fill="Gray">
  <Rectangle.RenderTransform>
    <TransformGroup>
      <RotateTransform Angle="20" />
      <SkewTransform CenterX="0" CenterY="0" AngleX="20"/>
    </TransformGroup>
  </Rectangle.RenderTransform>
</Rectangle>


