HypernovaDesktop Components · docs
Binarymission
WPF › Smart Navigator › BinarySmartListResources

BinarySmartListResources

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

The resource keys of the BinarySmartListBoxItem card style and of the colours of the selected and disabled cards, for restyling the cards of a BinarySmartListBox from your own resources.

public static class BinarySmartListResources

Remarks

A resource with one of these keys in the application's or a window's resources takes the place of the built-in one – and of a skin's – for every list box below it.

Examples

A green selection in every smart list box of the application, and a card style that builds on the built-in one.

<Application.Resources>
    <SolidColorBrush x:Key="{x:Static nav:BinarySmartListResources.ItemSelectionBackgroundBrush}" Color="#E6F4EA" />

    <Style x:Key="RoomyCard" TargetType="nav:BinarySmartListBoxItem"
           BasedOn="{StaticResource {x:Static nav:BinarySmartListResources.BinarySmartListBoxItemStyleKey}}">
        <Setter Property="ItemBorderPadding" Value="12" />
        <Setter Property="ItemBorderCornerRadius" Value="8" />
    </Style>
</Application.Resources>

Members at a glance

Properties
BinarySmartListBoxItemStyleKeyGets the key of the built-in card style that BinarySmartListBox gives its items.
ItemDisabledForegroundBrushGets the key of the brush a disabled card's plain content is drawn in.
ItemSelectionBackgroundBrushGets the key of the brush that fills the selected card.

Properties

BinarySmartListBoxItemStyleKey static

public static ComponentResourceKey BinarySmartListBoxItemStyleKey

Gets the key of the built-in card style that BinarySmartListBox gives its items.

Value
The key of a Style whose target type is BinarySmartListBoxItem.
Remarks

Use it as the BasedOn of a style of your own, set as the list's ItemsControl.ItemContainerStyle, to change a few things and keep the rest.

ItemDisabledForegroundBrush static

public static ComponentResourceKey ItemDisabledForegroundBrush

Gets the key of the brush a disabled card's plain content is drawn in.

Value
The key of a Brush; the built-in brush with no skin in force is Gray.
Remarks

ItemSelectionBackgroundBrush static

public static ComponentResourceKey ItemSelectionBackgroundBrush

Gets the key of the brush that fills the selected card.

Value
The key of a Brush. The built-in brush with no skin in force is a pale blue, #EAF2FD; the selected card is outlined in a stronger blue, #3A78D0.