Skip to main content

TitleBar

C# API / Fluence.Wpf.Controls

  • Assembly: Fluence.Wpf
  • Namespace: Fluence.Wpf.Controls
public class TitleBar : ContentControl

A Fluent Design shell title bar with optional navigation buttons (back and pane toggle), an icon slot, title and subtitle text, left/right header slots, and a centred custom-content slot.

Remarks: Place this control inside TitleBar and configure visibility of the back/pane-toggle buttons via IsBackButtonVisible and IsPaneToggleButtonVisible. Respond to navigation gestures through the BackRequested and PaneToggleRequested events or the command properties BackCommand and PaneToggleCommand.

Base type: ContentControl (including inherited WPF and .NET members)

C# source

Constructors​

TitleBar​

public TitleBar()

Initializes a new instance of the TitleBar class.

Properties​

BackCommand​

public ICommand BackCommand { get; set; }

Gets or sets the command invoked when the back button is clicked. When null the back button click still raises BackRequested.

BackCommandParameter​

public object BackCommandParameter { get; set; }

Gets or sets the command parameter passed to BackCommand.

CustomContent​

public object CustomContent { get; set; }

Gets or sets custom content displayed in the centred content slot of the title bar. Setting this also assigns Content unless Content has been independently set to a different value.

Icon​

public object Icon { get; set; }

Gets or sets the title bar icon content.

IsBackButtonVisible​

public bool IsBackButtonVisible { get; set; }

Gets or sets a value indicating whether the back navigation button is visible.

IsCompact​

public bool IsCompact { get; set; }

Gets or sets a value indicating whether the title bar uses compact height (32 px) instead of the default 48 px.

IsPaneToggleButtonVisible​

public bool IsPaneToggleButtonVisible { get; set; }

Gets or sets a value indicating whether the pane toggle button is visible.

LeftHeader​

public object LeftHeader { get; set; }

Gets or sets content displayed in the left header slot, before the icon and title text.

PaneToggleCommand​

public ICommand PaneToggleCommand { get; set; }

Gets or sets the command invoked when the pane toggle button is clicked. When null the pane toggle click still raises PaneToggleRequested.

PaneToggleCommandParameter​

public object PaneToggleCommandParameter { get; set; }

Gets or sets the command parameter passed to PaneToggleCommand.

RightHeader​

public object RightHeader { get; set; }

Gets or sets content displayed in the right header slot, after the central stretch column.

Subtitle​

public string Subtitle { get; set; }

Gets or sets the subtitle text displayed after the title.

Title​

public string Title { get; set; }

Gets or sets the title text displayed in the title bar.

Methods​

OnApplyTemplate​

public override void OnApplyTemplate()

Documentation inherited from the ContentControl API.

OnBackRequested​

protected virtual void OnBackRequested(EventArgs e)

Raises the BackRequested event.

Parameter e: Event data. Pass Empty for a plain notification.

OnCreateAutomationPeer​

protected override AutomationPeer OnCreateAutomationPeer()

Documentation inherited from the ContentControl API.

OnPaneToggleRequested​

protected virtual void OnPaneToggleRequested(EventArgs e)

Raises the PaneToggleRequested event.

Parameter e: Event data. Pass Empty for a plain notification.

OnPropertyChanged​

protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)

Documentation inherited from the ContentControl API.

Events​

BackRequested​

public event EventHandler? BackRequested

Occurs when the back button is invoked after command execution has been processed.

PaneToggleRequested​

public event EventHandler? PaneToggleRequested

Occurs when the pane toggle button is invoked after command execution has been processed.

Dependency property identifiers​

Use these identifiers with WPF property APIs. The matching CLR properties appear above when the control exposes them.

BackCommandParameterProperty​

public static readonly DependencyProperty BackCommandParameterProperty

Identifies the BackCommandParameter dependency property.

BackCommandProperty​

public static readonly DependencyProperty BackCommandProperty

Identifies the BackCommand dependency property.

CustomContentProperty​

public static readonly DependencyProperty CustomContentProperty

Identifies the CustomContent dependency property.

IconProperty​

public static readonly DependencyProperty IconProperty

Identifies the Icon dependency property.

IsBackButtonVisibleProperty​

public static readonly DependencyProperty IsBackButtonVisibleProperty

Identifies the IsBackButtonVisible dependency property.

IsCompactProperty​

public static readonly DependencyProperty IsCompactProperty

Identifies the IsCompact dependency property.

IsPaneToggleButtonVisibleProperty​

public static readonly DependencyProperty IsPaneToggleButtonVisibleProperty

Identifies the IsPaneToggleButtonVisible dependency property.

LeftHeaderProperty​

public static readonly DependencyProperty LeftHeaderProperty

Identifies the LeftHeader dependency property.

PaneToggleCommandParameterProperty​

public static readonly DependencyProperty PaneToggleCommandParameterProperty

Identifies the PaneToggleCommandParameter dependency property.

PaneToggleCommandProperty​

public static readonly DependencyProperty PaneToggleCommandProperty

Identifies the PaneToggleCommand dependency property.

RightHeaderProperty​

public static readonly DependencyProperty RightHeaderProperty

Identifies the RightHeader dependency property.

SubtitleProperty​

public static readonly DependencyProperty SubtitleProperty

Identifies the Subtitle dependency property.

TitleProperty​

public static readonly DependencyProperty TitleProperty

Identifies the Title dependency property.