Files
ShrlAlgoToolkit/WPFluent/Controls/NavigationView/NavigationViewItemHeader.cs

48 lines
1.5 KiB
C#
Raw Normal View History


// Based on Windows UI Library
// Copyright(c) Microsoft Corporation.All rights reserved.
//
// https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.navigationviewitemheader?view=winrt-22621
// ReSharper disable once CheckNamespace
namespace WPFluent.Controls;
/// <summary>
/// Represents a header for a group of menu items in a NavigationMenu.
/// </summary>
public class NavigationViewItemHeader : System.Windows.Controls.Control
{
/// <summary>
/// Identifies the <see cref="Icon"/> dependency property.
/// </summary>
public static readonly DependencyProperty IconProperty = DependencyProperty.Register(
nameof(Icon),
typeof(IconElement),
typeof(NavigationViewItemHeader),
new PropertyMetadata(null));
/// <summary>
/// Identifies the <see cref="Text"/> dependency property.
/// </summary>
public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
nameof(Text),
typeof(string),
typeof(NavigationViewItemHeader),
new PropertyMetadata(string.Empty));
/// <summary>
/// Gets or sets the icon.
/// </summary>
[Bindable(true)]
[Category("Appearance")]
public IconElement? Icon { get => (IconElement?)GetValue(IconProperty); set => SetValue(IconProperty, value); }
/// <summary>
/// Gets or sets the text presented in the header element.
/// </summary>
[Bindable(true)]
public string Text { get => (string)GetValue(TextProperty); set => SetValue(TextProperty, value); }
}