VIBlend
Home Products Downloads Purchase Support Forum About Blog

How to style the standard WPF Button?

by viblend 30. September 2010 05:50

If you want to customize the appearance of the standard WPF Button with our Free Office 2010 Blue, Black and Silver themes for WPF then you need to do the following:

1. Add a reference to the Theme assembly.  In Solution Explorer, right-click on the project node and click Add Reference. Browse to the VIBlend.WPF.Theme.Office2010Black.dll, VIBlend.WPF.Theme.Office2010Blue.dll or VIBlend.WPF.Theme.Office2010Silver.dll and click the ‘OK’ button.
2. Drag and drop a Button control from the VS toolbox.
3.  Load the Theme resources and set the Style property of the Button control.

 <Window x:Class="WpfApplication98.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <ResourceDictionary Source="/VIBlend.WPF.Theme.Office2010Blue;component/Button.xaml"/>
    </Window.Resources>
    <Grid>
           <Button Content="Office 2010 Blue" Style="{StaticResource Office2010BlueButtonStyle}" Height="30" Name="button1" Width="125" />
    </Grid>
</Window>

About the author

Some text that describes me

Tag cloud

Recent comments

Comment RSS
Copyright © 2011 VIBlend  
ALL RIGHTS RESERVED  
 
Terms of Use | Privacy Policy
WinForms Controls Purchase Online About Us
       
DataGrid Navigation Pane Technical Support Blog
ScrollBar TreeView
ListBox ProgressBar Downloads Register
ComboBox Buttons
TabControl Editors Documentation Client Login

VIBlend Blog is powered by BlogEngine.NET