Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

A Style for Round Glassy WPF Buttons

, 5 Jan 2009
A style for giving WPF buttons a glassy, Windows Vista-like look.
GlassButton_demo.zip
GlassButton
GlassButton
GlassButton.sln.cache
bin
images
Properties
Resources
Debug
GlassButton.exe
GlassButton.vshost.exe
background.jpg
ff.png
rw.png
stop.png
vista_flag.png
Settings.settings
<Window x:Class="GlassButton.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Glass Buttons" Height="228" Width="272">

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Resources\GlassButton.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
        <Image Source="images\background.jpg" />
        <StackPanel Orientation="Horizontal">

            <Button Style="{StaticResource GlassButton}" Width="50" Height="50" Background="#FF660707"  Margin="10"/>

            <Button Style="{StaticResource GlassButton}" Width="50" Height="50" Background="#FF1D5BBA"  Margin="10">
                <Image Width="40" Height="35" Source="images\vista_flag.png"/>
            </Button>

            <Button Style="{StaticResource GlassButton}" Width="30" Height="30" Background="Black"  Margin="2">
                <Image Width="18" Height="18" Source="images\rw.png"/>
            </Button>

            <Button Style="{StaticResource GlassButton}" Width="30" Height="30" Background="Black"  Margin="2">
                <Image Width="15" Height="15" Source="images\stop.png"/>
            </Button>

            <Button Style="{StaticResource GlassButton}" Width="30" Height="30" Background="Black"  Margin="2">
                <Image Width="18" Height="18" Source="images\ff.png"/>
            </Button>

        </StackPanel>
    </Grid>
</Window>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Lev Danielyan
Software Developer (Senior) Virage Logic Corporation
Armenia Armenia
I'm a developer focusing on Quality Assurance at the Virage Logic Corporation.
My main responsibilities include the development and maintenance of an environment for automated quality assurance of the Verilog IP provided by our company.

| Advertise | Privacy | Mobile
Web04 | 2.8.140922.1 | Last Updated 5 Jan 2009
Article Copyright 2009 by Lev Danielyan
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid