HypernovaDesktop Components · docs
Binarymission
WPF › Tree List View › BinaryCheckBox

BinaryCheckBox

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Controls.TreeControls

A check box whose box, border and check mark can each be coloured for every state – normal, pointer over, pressed and disabled – without writing a template.

public class BinaryCheckBox : CheckBox

Inherits from / implements: CheckBox

Remarks

It is an ordinary CheckBox in every other way: bind IsChecked, set IsThreeState, and so on. It sits well in a tree list view cell.

Examples

<GridViewColumn Header="Done" Width="60">
    <GridViewColumn.CellTemplate>
        <DataTemplate>
            <tlv:BinaryCheckBox IsChecked="{Binding IsComplete}"
                                CornerRadius="3"
                                NormalBorderBrush="#9AA7B8"
                                CheckMarkGlyphBrush="#1F77D0" />
        </DataTemplate>
    </GridViewColumn.CellTemplate>
</GridViewColumn>

Members at a glance

Properties
CheckMarkGlyphBrushGets or sets the colour of the check mark.
CheckMarkHeightGets or sets the height of the check mark.
CheckMarkWidthGets or sets the width of the check mark.
CornerRadiusGets or sets how much the corners of the box are rounded.
DisabledBackgroundBrushGets or sets the fill of the box while the check box is disabled.
DisabledBorderBrushGets or sets the colour of the box's border while the check box is disabled.
DisabledForegroundBrushGets or sets the colour of the check box's text while it is disabled.
DisabledGlyphBrushGets or sets the colour of the check mark while the check box is disabled.
MouseOverBrushGets or sets the fill of the box while the pointer is over it.
NormalBorderBrushGets or sets the colour of the box's border.
NormalBrushGets or sets the fill of the box when the pointer is not over it.
PressedBorderBrushGets or sets the colour of the box's border while it is being pressed.
PressedBrushGets or sets the fill of the box while it is being pressed.
Methods
OnApplyTemplateFinds the check mark in the template once it has been applied, and draws it at CheckMarkWidth by CheckMarkHeight.
Fields
CheckMarkGlyphBrushPropertyIdentifies the CheckMarkGlyphBrush dependency property.
CheckMarkHeightPropertyIdentifies the CheckMarkHeight dependency property.
CheckMarkWidthPropertyIdentifies the CheckMarkWidth dependency property.
CornerRadiusPropertyIdentifies the CornerRadius dependency property.
DisabledBackgroundBrushPropertyIdentifies the DisabledBackgroundBrush dependency property.
DisabledBorderBrushPropertyIdentifies the DisabledBorderBrush dependency property.
DisabledForegroundBrushPropertyIdentifies the DisabledForegroundBrush dependency property.
DisabledGlyphBrushPropertyIdentifies the DisabledGlyphBrush dependency property.
MouseOverBrushPropertyIdentifies the MouseOverBrush dependency property.
NormalBorderBrushPropertyIdentifies the NormalBorderBrush dependency property.
NormalBrushPropertyIdentifies the NormalBrush dependency property.
PressedBorderBrushPropertyIdentifies the PressedBorderBrush dependency property.
PressedBrushPropertyIdentifies the PressedBrush dependency property.

Properties

CheckMarkGlyphBrush

public Brush CheckMarkGlyphBrush

Gets or sets the colour of the check mark.

CheckMarkHeight

public double CheckMarkHeight

Gets or sets the height of the check mark.

Value
The height in device-independent units (1/96 inch). The control's style sets 15.

CheckMarkWidth

public double CheckMarkWidth

Gets or sets the width of the check mark.

Value
The width in device-independent units (1/96 inch). The control's style sets 15.

CornerRadius

public CornerRadius CornerRadius

Gets or sets how much the corners of the box are rounded.

Value
The default is no rounding.

DisabledBackgroundBrush

public Brush DisabledBackgroundBrush

Gets or sets the fill of the box while the check box is disabled.

DisabledBorderBrush

public Brush DisabledBorderBrush

Gets or sets the colour of the box's border while the check box is disabled.

DisabledForegroundBrush

public Brush DisabledForegroundBrush

Gets or sets the colour of the check box's text while it is disabled.

DisabledGlyphBrush

public Brush DisabledGlyphBrush

Gets or sets the colour of the check mark while the check box is disabled.

MouseOverBrush

public Brush MouseOverBrush

Gets or sets the fill of the box while the pointer is over it.

NormalBorderBrush

public Brush NormalBorderBrush

Gets or sets the colour of the box's border.

NormalBrush

public Brush NormalBrush

Gets or sets the fill of the box when the pointer is not over it.

PressedBorderBrush

public Brush PressedBorderBrush

Gets or sets the colour of the box's border while it is being pressed.

PressedBrush

public Brush PressedBrush

Gets or sets the fill of the box while it is being pressed.

Methods

OnApplyTemplate

public override void OnApplyTemplate()

Finds the check mark in the template once it has been applied, and draws it at CheckMarkWidth by CheckMarkHeight.

Remarks

A derived class that overrides this should call the base implementation.

Fields

CheckMarkGlyphBrushProperty static

public static DependencyProperty CheckMarkGlyphBrushProperty

Identifies the CheckMarkGlyphBrush dependency property.

CheckMarkHeightProperty static

public static DependencyProperty CheckMarkHeightProperty

Identifies the CheckMarkHeight dependency property.

CheckMarkWidthProperty static

public static DependencyProperty CheckMarkWidthProperty

Identifies the CheckMarkWidth dependency property.

CornerRadiusProperty static

public static DependencyProperty CornerRadiusProperty

Identifies the CornerRadius dependency property.

DisabledBackgroundBrushProperty static

public static DependencyProperty DisabledBackgroundBrushProperty

Identifies the DisabledBackgroundBrush dependency property.

DisabledBorderBrushProperty static

public static DependencyProperty DisabledBorderBrushProperty

Identifies the DisabledBorderBrush dependency property.

DisabledForegroundBrushProperty static

public static DependencyProperty DisabledForegroundBrushProperty

Identifies the DisabledForegroundBrush dependency property.

DisabledGlyphBrushProperty static

public static DependencyProperty DisabledGlyphBrushProperty

Identifies the DisabledGlyphBrush dependency property.

MouseOverBrushProperty static

public static DependencyProperty MouseOverBrushProperty

Identifies the MouseOverBrush dependency property.

NormalBorderBrushProperty static

public static DependencyProperty NormalBorderBrushProperty

Identifies the NormalBorderBrush dependency property.

NormalBrushProperty static

public static DependencyProperty NormalBrushProperty

Identifies the NormalBrush dependency property.

PressedBorderBrushProperty static

public static DependencyProperty PressedBorderBrushProperty

Identifies the PressedBorderBrush dependency property.

PressedBrushProperty static

public static DependencyProperty PressedBrushProperty

Identifies the PressedBrush dependency property.