Fish Eye Buttons


   
       

<StackPanel xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <StackPanel.Resources>
        <Style TargetType="{x:Type Button}">
            <Setter Property="HorizontalAlignment" Value="Center" />
            <Setter Property="FontSize" Value="12" />
            <Style.Triggers>
                <EventTrigger RoutedEvent="Button.MouseEnter">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation 
                                Storyboard.TargetProperty="FontSize"
                                To="36" Duration="0:0:1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
                <EventTrigger RoutedEvent="Button.MouseLeave">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation 
                                Storyboard.TargetProperty="FontSize"
                                To="12" Duration="0:0:0.25" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Style.Triggers>
        </Style>
    </StackPanel.Resources>

    <Button>1</Button>
    <Button>2</Button>
    <Button>3</Button>
</StackPanel>

   
    
    
    
    
    
    
     


Button IsMouseOver


   
       
<Window x:Class="PropertyTrigger.Window1"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="PropertyTrigger" 
  Height="300" 
  Width="300"
  >
  <Window.Resources>

    <Style TargetType="{x:Type Button}">
      <Style.Triggers>
        <Trigger Property="IsMouseOver" Value="True">
          <Setter Property="Background" Value="Orange" />
        </Trigger>
      </Style.Triggers>
    </Style>

  </Window.Resources>

  <Grid>
    
    <Button 
      VerticalAlignment="Top"
      HorizontalAlignment="Stretch"
      Height="46"
      Name="button1"
      >
      Button
    </Button>
    
  </Grid>
</Window>

   
    
    
    
    
    
    
     


The button and text block are up-side down in the custom coordinate system.


   
      
<Window x:Class="LineInCustomSystem"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Line In Custom System" Height="240" Width="220">
  <Border BorderBrush="Black" BorderThickness="1" Height="200"
    Width="200">
    <Canvas Height="200" Width="200">
            <Button Canvas.Top="50" Canvas.Left="80" FontSize="15" Foreground="Red"
              Content="My Button">
              <Button.RenderTransform>
                <ScaleTransform ScaleY="-1" />
              </Button.RenderTransform>
            </Button>
            <TextBlock Canvas.Top="120" Canvas.Left="20" FontSize="12pt"
              Foreground="Blue">
              <Bold>My Text Block</Bold>
              <TextBlock.RenderTransform>
                <ScaleTransform ScaleY="-1" />
              </TextBlock.RenderTransform>
            </TextBlock>
    </Canvas>
  </Border>
</Window>

   
    
    
    
    
    
     


Button with OpacityMask


   
      

<Window x:Class="OpacityMaskExample"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title=""
  Height="430" Width="300">
  <Grid>
        <Button Height="60" Width="60"
          RenderTransformOrigin="1,0.5">
          <Button.OpacityMask>
            <LinearGradientBrush StartPoint="0,0"
              EndPoint="0,1">
              <GradientStop Color="Transparent"
                Offset="0" />
              <GradientStop Color="#77000000" Offset="1" />
            </LinearGradientBrush>
          </Button.OpacityMask>
          <Button.RenderTransform>
            <ScaleTransform ScaleY="-1" />
          </Button.RenderTransform>
        </Button>
  </Grid>
</Window>