You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From MS docs:
A split view control has an expandable/collapsible pane and a content area.
A split view's content area is always visible. The pane can expand and collapse or remain in an open state, and can present itself from either the left side or right side of an app window. The pane has four modes: Overlay, Inline, CompactOverlay, CompactInline. (Detailed in links below)
In-page Panes could contain additional features and applications components and should be hidden by default on narrow window and showed on wide window.
2.1. Old Microsoft Edge right pane with favorites, settings and other
Proposed API
publicclassSplitView:Control{publicSplitView();[Content]publicobjectContent{get;set;}publicSplitViewPanePlacementPanePlacement{get;set;}publicBrushPaneBackground{get;set;}publicobjectPane{get;set;}publicdoubleOpenPaneLength{get;set;}publicboolIsPaneOpen{get;set;}publicSplitViewDisplayModeDisplayMode{get;set;}publicdoubleCompactPaneLength{get;set;}publicLightDismissOverlayModeLightDismissOverlayMode{get;set;}publicSplitViewTemplateSettingsTemplateSettings{get;}publicstaticStyledPropertyCompactPaneLengthProperty{get;}publicstaticStyledPropertyContentProperty{get;}publicstaticStyledPropertyDisplayModeProperty{get;}publicstaticStyledPropertyIsPaneOpenProperty{get;}publicstaticStyledPropertyOpenPaneLengthProperty{get;}publicstaticStyledPropertyPaneBackgroundProperty{get;}publicstaticStyledPropertyPanePlacementProperty{get;}publicstaticStyledPropertyPaneProperty{get;}publicstaticStyledPropertyLightDismissOverlayModeProperty{get;}publicstaticDirectPropertyTemplateSettingsProperty{get;}publiceventEventHandler<EventArgs>PaneClosed;publiceventEventHandler<SplitViewPaneClosingEventArgs>PaneClosing;publiceventEventHandler<EventArgs>PaneOpened;publiceventEventHandler<EventArgs>PaneOpening;}publicsealedclassSplitViewPaneClosingEventArgs{publicboolCancel{get;set;}}// Provides calculated values that can be referenced as **TemplatedParent** sources when defining templates for a SplitView.publicsealedclassSplitViewTemplateSettings:AvaloniaObject{publicGridLengthCompactPaneGridLength{get;}publicdoubleNegativeOpenPaneLength{get;}publicdoubleNegativeOpenPaneLengthMinusCompactLength{get;}publicGridLengthOpenPaneGridLength{get;}publicdoubleOpenPaneLength{get;}publicdoubleOpenPaneLengthMinusCompactLength{get;}}publicenumSplitViewDisplayMode{Overlay=0,Inline=1,CompactOverlay=2,CompactInline=3}publicenumSplitViewPanePlacement{Left=0,Right=1}// Defines constants that specify whether the area outside of a *light-dismiss* UI is darkened.publicenumLightDismissOverlayMode{Auto=0,On=1,Off=2}
Open questions:
Should this control be shipped with Avalonia or moved to separated package?
There some possible differences in API with UWP's control. For instance, "object" for Content and Pane instead of UIElement and EventHandler instead of TypedEventHandler. But I am not sure, if it is real issue.
In UWP LightDismissOverlayMode is also used for Flyout, ComboBox, ContentDialog. In future Avalonia could also support it for another controls.
I agree that this control would be useful, however I'm hesitant to accept any more controls into Avalonia itself because they become a maintenance burden on the core developers and we don't have enough time as it is.
I'm working on creating a library for Fluent Design/WinUI inspired things for use with Avalonia, sort of inspired by #3950, and I've ported the SplitView control. This is all a work in progress, but the SplitView is finished and works. https://github.com/amwx/FluentAvalonia
Overview
From MS docs:
A split view control has an expandable/collapsible pane and a content area.
A split view's content area is always visible. The pane can expand and collapse or remain in an open state, and can present itself from either the left side or right side of an app window. The pane has four modes: Overlay, Inline, CompactOverlay, CompactInline. (Detailed in links below)
Possible usage
1.1. Simple HamburgerMenu implementation based on SplitView
1.2. WinUI's NavigationView is built on top of SplitView (only for Left mode)
2.1. Old Microsoft Edge right pane with favorites, settings and other
Proposed API
Open questions:
Related links
Gif example
Gif source: https://nicksnettravels.builttoroam.com/uwp-splitview/

The text was updated successfully, but these errors were encountered: