External Web Links


   
 

<Page x:Class="NavigationApplication.ExternalLinks"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="ExternalLinks" 
    >
  <TextBlock Margin="3" TextWrapping="Wrap">
    Visit the website
    <Hyperlink NavigateUri="http://www.kutayzorlu.com/java2s/com">www.kutayzorlu.com/java2s/com</Hyperlink>.
    <LineBreak />
  </TextBlock>
</Page>

   
     


Link To Another Page


   
 
<Page x:Class="NavigationApplication.LinkToAssemblyPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="LinkToAssemblyPage">
  <StackPanel Margin="3">
    <TextBlock Margin="3" TextWrapping="Wrap">
      This is a simple page.
      Click <Hyperlink NavigateUri="/PageLibrary;component/SharedPage.xaml">here</Hyperlink>.
    </TextBlock>


  </StackPanel>
</Page>

   
     


Image with ContextMenu


   
    

<Window x:Class="ControlDemos.menu"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="ControlDemos" Height="300" Width="300">
      <Image Name="image1" Source="file:///c:/image.jpg">
        <Image.ContextMenu>
          <ContextMenu>
            <MenuItem Header="CheckStates">
              <MenuItem Header="A" IsCheckable="True" IsChecked="True" Name="mnuItem1" ></MenuItem>
              <MenuItem Header="B" IsCheckable="True" IsChecked="False"></MenuItem>
              <MenuItem Header="C" IsCheckable="False" IsChecked="False"></MenuItem>
              <MenuItem Header="D" IsCheckable="False" IsChecked="True">
                <MenuItem.ToolTip>
                  <StackPanel Orientation="Horizontal">
                    <Image Source="c:image.jpg"></Image>
                    <Label>picture tooltip</Label>
                  </StackPanel>
                </MenuItem.ToolTip>
              </MenuItem>
            </MenuItem>
          </ContextMenu>
        </Image.ContextMenu>
      </Image>
</Window>

   
    
    
    
     


Animated Clip Examples


   
    

<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">
      <Image Source="c:image.jpg" 
        Width="200" Height="150" HorizontalAlignment="Left">
        <Image.Clip>
          <EllipseGeometry x:Name="MyEllipseGeometry1"
            RadiusX="100"
            RadiusY="75"
            Center="100,75"/>
        </Image.Clip>
        <Image.Triggers>
          <EventTrigger RoutedEvent="Image.Loaded">
            <BeginStoryboard>
              <Storyboard>
                <PointAnimation 
                  Storyboard.TargetName="MyEllipseGeometry1" 
                  Storyboard.TargetProperty="(EllipseGeometry.Center)"
                  From="0,0" To="200,150" Duration="0:0:3" RepeatBehavior="Forever" 
                  AutoReverse="True" />
                </Storyboard>
            </BeginStoryboard>
          </EventTrigger>
        </Image.Triggers>
      </Image> 

</Window>

   
    
    
    
     


Elliptical Clip Example


   
    

<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">
      <Image Source="c:image.jpg" Width="200" Height="150" HorizontalAlignment="Left">
        <Image.Clip>
          <EllipseGeometry
            RadiusX="100"
            RadiusY="75"
            Center="100,75"/>
        </Image.Clip>
      </Image>

</Window>

   
    
    
    
     


ImageBrush within a DrawingBrush.


   
    

<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">
      <Rectangle Width="50" Height="50" Grid.Row="0" Grid.Column="1">
        <Rectangle.Fill>
          <DrawingBrush Viewport="0,0,1,1" TileMode="Tile">
            <DrawingBrush.Drawing>
              <DrawingGroup>
                <GeometryDrawing Brush="Pink">
                  <GeometryDrawing.Geometry>
                    <RectangleGeometry Rect="0,0,1,1" />
                  </GeometryDrawing.Geometry>
                </GeometryDrawing>
                <GeometryDrawing>
                  <GeometryDrawing.Brush>
                    <ImageBrush ImageSource="c:image.jpg"  />
                  </GeometryDrawing.Brush>
                  <GeometryDrawing.Geometry>
                    <RectangleGeometry Rect="0,0,0.5,0.5" />
                  </GeometryDrawing.Geometry>
                </GeometryDrawing>
                <GeometryDrawing>
                  <GeometryDrawing.Brush>
                    <ImageBrush ImageSource="c:image.jpg"  />
                  </GeometryDrawing.Brush>
                  <GeometryDrawing.Geometry>
                    <RectangleGeometry Rect="0.5,0.5,0.5,0.5" />
                  </GeometryDrawing.Geometry>
                </GeometryDrawing>
              </DrawingGroup>
            </DrawingBrush.Drawing>
          </DrawingBrush>
        </Rectangle.Fill>
      </Rectangle>

</Window>