using System;
using Avalonia.Controls.Metadata;
using Avalonia.Controls.Presenters;
using Avalonia.Controls.Primitives;
using Avalonia.Controls.Templates;
using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.LogicalTree;
using Avalonia.Media;
using Avalonia.Metadata;
using Avalonia.Reactive;
namespace Avalonia.Controls
{
///
/// A control with two views: A collapsible pane and an area for content
///
[TemplatePart("PART_PaneRoot", typeof(Panel))]
[PseudoClasses(pcOpen, pcClosed)]
[PseudoClasses(pcCompactOverlay, pcCompactInline, pcOverlay, pcInline)]
[PseudoClasses(pcLeft, pcRight)]
[PseudoClasses(pcLightDismiss)]
public class SplitView : ContentControl
{
protected const string pcOpen = ":open";
protected const string pcClosed = ":closed";
protected const string pcCompactOverlay = ":compactoverlay";
protected const string pcCompactInline = ":compactinline";
protected const string pcOverlay = ":overlay";
protected const string pcInline = ":inline";
protected const string pcLeft = ":left";
protected const string pcRight = ":right";
protected const string pcLightDismiss = ":lightDismiss";
///
/// Defines the property
///
public static readonly StyledProperty CompactPaneLengthProperty =
AvaloniaProperty.Register(
nameof(CompactPaneLength),
defaultValue: 48);
///
/// Defines the property
///
public static readonly StyledProperty DisplayModeProperty =
AvaloniaProperty.Register(
nameof(DisplayMode),
defaultValue: SplitViewDisplayMode.Overlay);
///
/// Defines the property
///
public static readonly StyledProperty IsPaneOpenProperty =
AvaloniaProperty.Register(
nameof(IsPaneOpen),
defaultValue: false,
coerce: CoerceIsPaneOpen);
///
/// Defines the property
///
public static readonly StyledProperty OpenPaneLengthProperty =
AvaloniaProperty.Register(
nameof(OpenPaneLength),
defaultValue: 320);
///
/// Defines the property
///
public static readonly StyledProperty PaneBackgroundProperty =
AvaloniaProperty.Register(nameof(PaneBackground));
///
/// Defines the property
///
public static readonly StyledProperty PanePlacementProperty =
AvaloniaProperty.Register(nameof(PanePlacement));
///
/// Defines the property
///
public static readonly StyledProperty