CheckBox Style : CheckBox « Windows Presentation Foundation « C# / C Sharp

Home
C# / C Sharp
1.2D Graphics
2.Class Interface
3.Collections Data Structure
4.Components
5.Data Types
6.Database ADO.net
7.Design Patterns
8.Development Class
9.Event
10.File Stream
11.Generics
12.GUI Windows Form
13.Language Basics
14.LINQ
15.Network
16.Office
17.Reflection
18.Regular Expressions
19.Security
20.Services Event
21.Thread
22.Web Services
23.Windows
24.Windows Presentation Foundation
25.XML
26.XML LINQ
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source
C# / C Sharp » Windows Presentation Foundation » CheckBoxScreenshots 
CheckBox Style
CheckBox Style
    
<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WPF" Height="220" Width="300">
    <Window.Resources>
        <Style x:Key="BaseControlStyle" 
               TargetType="{x:Type Control}">
            <Setter Property="FontFamily" Value="Tahoma" />
            <Setter Property="FontSize" Value="24pt"/>
            <Setter Property="Margin" Value="4" />
        </Style>

        <Style TargetType="{x:Type Button}" 
               BasedOn="{StaticResource BaseControlStyle}">
            <Setter Property="FontWeight" Value="Bold" />
        </Style>

        <Style TargetType="{x:Type CheckBox}" 
               BasedOn="{StaticResource BaseControlStyle}">
        </Style>
        <Style TargetType="{x:Type TextBox}" 
               BasedOn="{StaticResource BaseControlStyle}">
        </Style>

    </Window.Resources>

    <Grid>
        <StackPanel>
            <CheckBox>CheckBox</CheckBox>
            <TextBox>TextBox</TextBox>
            <Button>Button</Button>
            <Button FontWeight="Light">Button with overridden style</Button>
            <TextBlock>TextBlock</TextBlock>
            <ComboBox>ComboBox</ComboBox>
        </StackPanel>
    </Grid>
</Window>

   
    
    
    
  
Related examples in the same category
1.Three-State CheckBoxThree-State CheckBox
2.A CheckBox with a skew transformationA CheckBox with a skew transformation
3.Add CheckBox to StackPanelAdd CheckBox to StackPanel
4.Customized CheckBoxCustomized CheckBox
5.CheckBox checked event listenerCheckBox checked event listener
6.Handles CheckBox Indeterminate events when a CheckBox changes to a indeterminate state.Handles CheckBox Indeterminate events when a CheckBox changes to a indeterminate state.
7.Handle CheckBox Unchecked eventsHandle CheckBox Unchecked events
8.Handle CheckBox checked events
9.Use Linq to get checked CheckBoxUse Linq to get checked CheckBox
10.Check the CheckBox based on key pressed statesCheck the CheckBox based on key pressed states
11.CheckBox ListCheckBox List
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.