Three-State CheckBox : CheckBox « Windows Presentation Foundation « C# / C Sharp






Three-State CheckBox

Three-State CheckBox
    

<Window x:Class="SimpleStyles.Window1"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="SimpleStyles"
  Background="#F8F8F8">
  <ScrollViewer>
    <WrapPanel>
      <!-- CheckBox -->
      <HeaderedItemsControl Header="CheckBox">
        <CheckBox Margin="8">Normal</CheckBox>
        <CheckBox Margin="8" IsChecked="true">Checked</CheckBox>
        <CheckBox Margin="8" IsThreeState="true" IsChecked="{x:Null}">Indeterminate</CheckBox>
      </HeaderedItemsControl>
   
    </WrapPanel>
  </ScrollViewer>
</Window>

   
    
    
    
  








Related examples in the same category

1.A CheckBox with a skew transformationA CheckBox with a skew transformation
2.Add CheckBox to StackPanelAdd CheckBox to StackPanel
3.Customized CheckBoxCustomized CheckBox
4.CheckBox StyleCheckBox Style
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