In This Article

SettingsGroup Class

Displays a group of settings.

[TemplatePart(Name = "PART_DescriptionPresenter", Type = typeof(ContentPresenter))]
[TemplatePart(Name = "PART_HeaderPresenter", Type = typeof(ContentPresenter))]
[TemplatePart(Name = "PART_ItemsPresenter", Type = typeof(ItemsPresenter))]
public class SettingsGroup : ItemsControl
Inheritance:
object Visual UIElement FrameworkElement Control ItemsControl object

Constructors

SettingsGroup()

Initializes a new instance of the class.

public SettingsGroup()

Properties

Description

The setting description.

public object? Description { get; set; }

Property Value

object

DescriptionTemplate

The template used to display the Description.

public DataTemplate? DescriptionTemplate { get; set; }

Property Value

DataTemplate

DescriptionTemplateSelector

Gets or sets the DataTemplateSelector to use for Description.

public DataTemplateSelector DescriptionTemplateSelector { get; set; }

Property Value

DataTemplateSelector:

The DataTemplateSelector to use for Description.

Header

The content for the header.

public object? Header { get; set; }

Property Value

object

HeaderTemplate

The template used to display the Header.

public DataTemplate? HeaderTemplate { get; set; }

Property Value

DataTemplate

HeaderTemplateSelector

Gets or sets the DataTemplateSelector to use for Header.

public DataTemplateSelector HeaderTemplateSelector { get; set; }

Property Value

DataTemplateSelector:

The DataTemplateSelector to use for Header.

IsAnimationEnabled

Whether animation is enabled.

public bool IsAnimationEnabled { get; set; }

Property Value

bool:

The default value is true.

IsDescriptionVisible

Indicates if the description is visible.

public bool? IsDescriptionVisible { get; set; }

Property Value

bool?:

true to force the description to be visible, false to force the description to be hidden, or null to show the description only when description content is available. The default value is null.

IsHeaderVisible

Indicates if the header is visible.

public bool? IsHeaderVisible { get; set; }

Property Value

bool?:

true to force the header to be visible, false to force the header to be hidden, or null to show the header only when header content is available. The default value is null.

IsItemsFooterVisible

Indicates if the items footer is visible.

public bool? IsItemsFooterVisible { get; set; }

Property Value

bool?:

true to force the items footer to be visible, false to force the items footer to be hidden, or null to show the items footer only when items footer content is available. The default value is null.

IsItemsHeaderVisible

Indicates if the items header is visible.

public bool? IsItemsHeaderVisible { get; set; }

Property Value

bool?:

true to force the items header to be visible, false to force the items header to be hidden, or null to show the items header only when items header content is available. The default value is null.

ItemsFooter

The content displayed below the items.

public object? ItemsFooter { get; set; }

Property Value

object

ItemsFooterTemplate

The template used to display the ItemsFooter.

public DataTemplate? ItemsFooterTemplate { get; set; }

Property Value

DataTemplate

ItemsFooterTemplateSelector

Gets or sets the DataTemplateSelector to use for ItemsFooter.

public DataTemplateSelector ItemsFooterTemplateSelector { get; set; }

Property Value

DataTemplateSelector:

The DataTemplateSelector to use for ItemsFooter.

ItemsHeader

The content displayed above the items.

public object? ItemsHeader { get; set; }

Property Value

object

ItemsHeaderTemplate

The template used to display the ItemsHeader.

public DataTemplate? ItemsHeaderTemplate { get; set; }

Property Value

DataTemplate

ItemsHeaderTemplateSelector

Gets or sets the DataTemplateSelector to use for ItemsHeader.

public DataTemplateSelector ItemsHeaderTemplateSelector { get; set; }

Property Value

DataTemplateSelector:

The DataTemplateSelector to use for ItemsHeader.

Spacing

The amount of spacing between items.

public double Spacing { get; set; }

Property Value

double

SpacingThickness

Gets a Thickness where the Spacing has been uniformly applied to all sides.

public Thickness SpacingThickness { get; }

Property Value

Thickness

Methods

ClearContainerForItemOverride(DependencyObject, object)

When overridden in a derived class, undoes the effects of the PrepareContainerForItemOverride(DependencyObject, object) method.

protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameter Type Description
element DependencyObject

The container element.

item object

The item.

GetContainerForItemOverride()

Creates or identifies the element that is used to display the given item.

protected override DependencyObject GetContainerForItemOverride()

Returns

DependencyObject:

The element that is used to display the given item.

IsItemItsOwnContainerOverride(object)

Determines if the specified item is (or is eligible to be) its own container.

protected override bool IsItemItsOwnContainerOverride(object item)
Parameter Type Description
item object

The item to check.

Returns

bool:

true if the item is (or is eligible to be) its own container; otherwise, false.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().

public override void OnApplyTemplate()

OnCreateAutomationPeer()

Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific AutomationPeer implementation.

PrepareContainerForItemOverride(DependencyObject, object)

Prepares the specified element to display the specified item.

protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameter Type Description
element DependencyObject

Element used to display the specified item.

item object

Specified item.

ToString()

Returns the string representation of this object.

public override string ToString()

Returns

string:

The string representation of this object.

Fields

DescriptionProperty

Identifies the Description depedency property.

public static readonly DependencyProperty DescriptionProperty

DescriptionTemplateProperty

Identifies the DescriptionTemplate depedency property.

public static readonly DependencyProperty DescriptionTemplateProperty

DescriptionTemplateSelectorProperty

Identifies the DescriptionTemplateSelector dependency property.

public static readonly DependencyProperty DescriptionTemplateSelectorProperty

HeaderProperty

Identifies the Header dependency property.

public static readonly DependencyProperty HeaderProperty

HeaderTemplateProperty

Identifies the HeaderTemplate depedency property.

public static readonly DependencyProperty HeaderTemplateProperty

HeaderTemplateSelectorProperty

Identifies the HeaderTemplateSelector dependency property.

public static readonly DependencyProperty HeaderTemplateSelectorProperty

IsAnimationEnabledProperty

Identifies the IsAnimationEnabled dependency property.

public static readonly DependencyProperty IsAnimationEnabledProperty

IsDescriptionVisibleProperty

Identifies the IsDescriptionVisible depedency property.

public static readonly DependencyProperty IsDescriptionVisibleProperty

IsHeaderVisibleProperty

Identifies the IsHeaderVisible depedency property.

public static readonly DependencyProperty IsHeaderVisibleProperty

IsItemsFooterVisibleProperty

Identifies the IsItemsFooterVisible depedency property.

public static readonly DependencyProperty IsItemsFooterVisibleProperty

IsItemsHeaderVisibleProperty

Identifies the IsItemsHeaderVisible depedency property.

public static readonly DependencyProperty IsItemsHeaderVisibleProperty

ItemsFooterProperty

Identifies the ItemsFooter dependency property.

public static readonly DependencyProperty ItemsFooterProperty

ItemsFooterTemplateProperty

Identifies the ItemsFooterTemplate depedency property.

public static readonly DependencyProperty ItemsFooterTemplateProperty

ItemsFooterTemplateSelectorProperty

Identifies the ItemsFooterTemplateSelector dependency property.

public static readonly DependencyProperty ItemsFooterTemplateSelectorProperty

ItemsHeaderProperty

Identifies the ItemsHeader dependency property.

public static readonly DependencyProperty ItemsHeaderProperty

ItemsHeaderTemplateProperty

Identifies the ItemsHeaderTemplate depedency property.

public static readonly DependencyProperty ItemsHeaderTemplateProperty

ItemsHeaderTemplateSelectorProperty

Identifies the ItemsHeaderTemplateSelector dependency property.

public static readonly DependencyProperty ItemsHeaderTemplateSelectorProperty

SpacingProperty

Identifies the Spacing dependency property.

public static readonly DependencyProperty SpacingProperty

SpacingThicknessProperty

Identifies the read-only SpacingThickness dependency property.

public static readonly DependencyProperty SpacingThicknessProperty