Source

OKCDG_WPF / Meme / Meme / MainWindow.xaml

Full commit
<Window x:Class="Meme.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="600" Width="525">
    <Window.Resources>
        <!-- glass button obtained from http://mrpmorris.blogspot.com/2008/04/wpf-custom-button-templates.html -->
        <Style TargetType="{x:Type Button}">
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="Margin" Value="5" />
        </Style>
        <ControlTemplate x:Key="glassButton" TargetType="{x:Type Button}">
            <Border BorderThickness="1,1,1,1" CornerRadius="4,4,4,4" BorderBrush="Black" Background="Black">
                <Grid>
                    <Border x:Name="BorderUp" BorderThickness="2,2,2,2" CornerRadius="4,4,4,4">
                        <Border.BorderBrush>
                            <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1" >
                                <GradientStop Color="White" Offset="0"/>
                                <GradientStop Color="#222222" Offset="1"/>
                            </LinearGradientBrush>
                        </Border.BorderBrush>
                        <Border.Background>
                            <LinearGradientBrush StartPoint=".5,0" EndPoint=".5,1">
                                <GradientStop Color="#aaaaff" Offset="0"/>
                                <GradientStop Color="#444466" Offset="0.6"/>
                                <GradientStop Color="#444444" Offset="1"/>
                            </LinearGradientBrush>
                        </Border.Background>
                    </Border>
                    <ContentPresenter x:Name="Contents" HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto" Margin="3,3,3,3"/>
                </Grid>
            </Border>
            <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter TargetName="BorderUp"  Property="Background">
                        <Setter.Value>
                            <LinearGradientBrush StartPoint=".5,0" EndPoint=".5,1">
                                <GradientStop Color="#aaffff" Offset="0"/>
                                <GradientStop Color="#446688" Offset="0.6"/>
                                <GradientStop Color="#666666" Offset="1"/>
                            </LinearGradientBrush>
                        </Setter.Value>
                    </Setter>
                </Trigger>
                <Trigger Property="IsMouseOver" Value="False">
                    <Setter TargetName="BorderUp" Property="Background">
                        <Setter.Value>
                            <LinearGradientBrush StartPoint=".5,0" EndPoint=".5,1">
                                <GradientStop Color="#aaaaff" Offset="0"/>
                                <GradientStop Color="#444466" Offset="0.6"/>
                                <GradientStop Color="#444444" Offset="1"/>
                            </LinearGradientBrush>
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
    </Window.Resources>
        <DockPanel>
        <Button Template="{StaticResource glassButton}" DockPanel.Dock="Top" Width="100" HorizontalAlignment="Left" Click="GetNextMeme">Random Meme</Button>
        <Border DockPanel.Dock="Bottom">
            <Image Name="image"></Image>
        </Border>
    </DockPanel>
</Window>