Class SplitView
A control with two views: A collapsible pane and an area for content
[TemplatePart("PART_PaneRoot", typeof(Panel))]
[PseudoClasses(new string[] { ":open", ":closed" })]
[PseudoClasses(new string[] { ":compactoverlay", ":compactinline", ":overlay", ":inline" })]
[PseudoClasses(new string[] { ":left", ":right" })]
[PseudoClasses(new string[] { ":lightDismiss" })]
public class SplitView : ContentControl, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
- Inheritance
-
SplitView
- Implements
- Inherited Members
- Extension Methods
Constructors
SplitView()
public SplitView()
Fields
CompactPaneLengthProperty
Defines the CompactPaneLength property
public static readonly StyledProperty<double> CompactPaneLengthProperty
Field Value
DisplayModeProperty
Defines the DisplayMode property
public static readonly StyledProperty<SplitViewDisplayMode> DisplayModeProperty
Field Value
IsPaneOpenProperty
Defines the IsPaneOpen property
public static readonly StyledProperty<bool> IsPaneOpenProperty
Field Value
OpenPaneLengthProperty
Defines the OpenPaneLength property
public static readonly StyledProperty<double> OpenPaneLengthProperty
Field Value
PaneBackgroundProperty
Defines the PaneBackground property
public static readonly StyledProperty<IBrush?> PaneBackgroundProperty
Field Value
PaneClosedEvent
Defines the PaneClosed event.
public static readonly RoutedEvent<RoutedEventArgs> PaneClosedEvent
Field Value
PaneClosingEvent
Defines the PaneClosing event.
public static readonly RoutedEvent<CancelRoutedEventArgs> PaneClosingEvent
Field Value
PaneOpenedEvent
Defines the PaneOpened event.
public static readonly RoutedEvent<RoutedEventArgs> PaneOpenedEvent
Field Value
PaneOpeningEvent
Defines the PaneOpening event.
public static readonly RoutedEvent<CancelRoutedEventArgs> PaneOpeningEvent
Field Value
PanePlacementProperty
Defines the PanePlacement property
public static readonly StyledProperty<SplitViewPanePlacement> PanePlacementProperty
Field Value
PaneProperty
Defines the Pane property
public static readonly StyledProperty<object?> PaneProperty
Field Value
PaneTemplateProperty
Defines the PaneTemplate property.
public static readonly StyledProperty<IDataTemplate> PaneTemplateProperty
Field Value
TemplateSettingsProperty
Defines the TemplateSettings property
public static readonly DirectProperty<SplitView, SplitViewTemplateSettings> TemplateSettingsProperty
Field Value
UseLightDismissOverlayModeProperty
Defines the UseLightDismissOverlayMode property
public static readonly StyledProperty<bool> UseLightDismissOverlayModeProperty
Field Value
Properties
CompactPaneLength
Gets or sets the length of the pane when in CompactOverlay or CompactInline mode
public double CompactPaneLength { get; set; }
Property Value
DisplayMode
Gets or sets the SplitViewDisplayMode for the SplitView
public SplitViewDisplayMode DisplayMode { get; set; }
Property Value
IsPaneOpen
Gets or sets whether the pane is open or closed
public bool IsPaneOpen { get; set; }
Property Value
OpenPaneLength
Gets or sets the length of the pane when open
public double OpenPaneLength { get; set; }
Property Value
Pane
Gets or sets the Pane for the SplitView
[DependsOn("PaneTemplate")]
public object? Pane { get; set; }
Property Value
PaneBackground
Gets or sets the background of the pane
public IBrush? PaneBackground { get; set; }
Property Value
PanePlacement
Gets or sets the SplitViewPanePlacement for the SplitView
public SplitViewPanePlacement PanePlacement { get; set; }
Property Value
PaneTemplate
Gets or sets the data template used to display the header content of the control.
public IDataTemplate PaneTemplate { get; set; }
Property Value
TemplateSettings
Gets or sets the TemplateSettings for the SplitView.
public SplitViewTemplateSettings TemplateSettings { get; }
Property Value
UseLightDismissOverlayMode
Gets or sets whether WinUI equivalent LightDismissOverlayMode is enabled
When enabled, and the pane is open in Overlay or CompactOverlay mode, the contents of the SplitView are darkened to visually separate the open pane and the rest of the SplitView.
public bool UseLightDismissOverlayMode { get; set; }
Property Value
Methods
OnApplyTemplate(TemplateAppliedEventArgs)
Called when the control's template is applied. In simple terms, this means the method is called just before the control is displayed.
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
Parameters
e
TemplateAppliedEventArgsThe event args.
OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)
Called when the control is added to a rooted visual tree.
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
Parameters
e
VisualTreeAttachmentEventArgsThe event args.
OnCoerceIsPaneOpen(bool)
Called when the IsPaneOpen property has to be coerced.
protected virtual bool OnCoerceIsPaneOpen(bool value)
Parameters
value
boolThe value to coerce.
Returns
OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs)
Called when the control is removed from a rooted visual tree.
protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)
Parameters
e
VisualTreeAttachmentEventArgsThe event args.
OnKeyDown(KeyEventArgs)
Called before the KeyDown event occurs.
protected override void OnKeyDown(KeyEventArgs e)
Parameters
e
KeyEventArgsThe event args.
OnPaneClosed(RoutedEventArgs)
protected virtual void OnPaneClosed(RoutedEventArgs args)
Parameters
args
RoutedEventArgs
OnPaneClosing(CancelRoutedEventArgs)
protected virtual void OnPaneClosing(CancelRoutedEventArgs args)
Parameters
OnPaneOpened(RoutedEventArgs)
protected virtual void OnPaneOpened(RoutedEventArgs args)
Parameters
args
RoutedEventArgs
OnPaneOpening(CancelRoutedEventArgs)
protected virtual void OnPaneOpening(CancelRoutedEventArgs args)
Parameters
OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Called when a avalonia property changes on the object.
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
Parameters
change
AvaloniaPropertyChangedEventArgsThe property change details.
RegisterContentPresenter(ContentPresenter)
Called when an ContentPresenter is registered with the control.
protected override bool RegisterContentPresenter(ContentPresenter presenter)
Parameters
presenter
ContentPresenterThe presenter.
Returns
Events
PaneClosed
Fired when the pane is closed.
public event EventHandler<RoutedEventArgs>? PaneClosed
Event Type
PaneClosing
Fired when the pane is closing.
public event EventHandler<CancelRoutedEventArgs>? PaneClosing
Event Type
Remarks
The event args Cancel property may be set to true to cancel the event and keep the pane open.
PaneOpened
Fired when the pane is opened.
public event EventHandler<RoutedEventArgs>? PaneOpened
Event Type
PaneOpening
Fired when the pane is opening.
public event EventHandler<CancelRoutedEventArgs>? PaneOpening
Event Type
Remarks
The event args Cancel property may be set to true to cancel the event and keep the pane closed.