Class Window
- Namespace
- CarinaStudio.Controls
- Assembly
- CarinaStudio.AppBase.Avalonia.dll
Extended Avalonia.Controls.Window.
public class Window : Window, INotifyPropertyChanged, IDataContextProvider, IThemeVariantHost, IResourceHost, IResourceNode, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, IDataTemplateHost, INamed, ISetterValue, IRenderRoot, ICloseable, IStyleHost, ILogicalRoot, ILogical, ITextInputMethodRoot, IInputRoot, IInputElement, IFocusScope, ILayoutRoot, ISynchronizable
- Inheritance
-
AvaloniaObjectAnimatableStyledElementVisualLayoutableInteractiveInputElementControlTemplatedControlContentControlTopLevelWindowBaseWindowWindow
- Implements
-
IDataContextProviderIThemeVariantHostIResourceHostIResourceNodeISetLogicalParentISetInheritanceParentIStyleableIDataTemplateHostINamedISetterValueIRenderRootICloseableIStyleHostILogicalRootILogicalITextInputMethodRootIInputRootIInputElementIFocusScopeILayoutRoot
- Derived
- Inherited Members
-
Window.SizeToContentPropertyWindow.ExtendClientAreaToDecorationsHintPropertyWindow.ExtendClientAreaChromeHintsPropertyWindow.ExtendClientAreaTitleBarHeightHintPropertyWindow.IsExtendedIntoWindowDecorationsPropertyWindow.WindowDecorationMarginPropertyWindow.OffScreenMarginPropertyWindow.SystemDecorationsPropertyWindow.ShowActivatedPropertyWindow.ShowInTaskbarPropertyWindow.WindowStatePropertyWindow.TitlePropertyWindow.IconPropertyWindow.WindowStartupLocationPropertyWindow.CanResizePropertyWindow.WindowClosedEventWindow.WindowOpenedEventWindow.BeginMoveDrag(PointerPressedEventArgs)Window.BeginResizeDrag(WindowEdge, PointerPressedEventArgs)Window.Close()Window.Hide()Window.Show()Window.IsVisibleChanged(AvaloniaPropertyChangedEventArgs)Window.Show(Window)Window.ShowDialog(Window)Window.ShowDialog<TResult>(Window)Window.MeasureOverride(Size)Window.ArrangeSetBounds(Size)Window.OnClosing(WindowClosingEventArgs)Window.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)Window.OnCreateAutomationPeer()Window.PlatformImplWindow.OwnedWindowsWindow.SizeToContentWindow.TitleWindow.ExtendClientAreaToDecorationsHintWindow.ExtendClientAreaChromeHintsWindow.ExtendClientAreaTitleBarHeightHintWindow.IsExtendedIntoWindowDecorationsWindow.WindowDecorationMarginWindow.OffScreenMarginWindow.SystemDecorationsWindow.ShowActivatedWindow.ShowInTaskbarWindow.WindowStateWindow.CanResizeWindow.IconWindow.WindowStartupLocationWindow.PositionWindow.StyleKeyOverrideWindow.ClosingWindowBase.IsActivePropertyWindowBase.OwnerPropertyWindowBase.TopmostPropertyWindowBase.Activate()WindowBase.EnsureInitialized()WindowBase.OnResized(WindowResizedEventArgs)WindowBase.ArrangeCore(Rect)WindowBase.IgnoreVisibilityChangesWindowBase.IsActiveWindowBase.ScreensWindowBase.OwnerWindowBase.TopmostWindowBase.DesktopScalingWindowBase.ActivatedWindowBase.DeactivatedWindowBase.PositionChangedWindowBase.ResizedTopLevel.ClientSizePropertyTopLevel.FrameSizePropertyTopLevel.PointerOverElementPropertyTopLevel.TransparencyLevelHintPropertyTopLevel.ActualTransparencyLevelPropertyTopLevel.TransparencyBackgroundFallbackPropertyTopLevel.ActualThemeVariantPropertyTopLevel.RequestedThemeVariantPropertyTopLevel.SystemBarColorPropertyTopLevel.BackRequestedEventTopLevel.TryGetPlatformHandle()TopLevel.SetSystemBarColor(Control, SolidColorBrush)TopLevel.GetSystemBarColor(Control)TopLevel.GetTopLevel(Visual)TopLevel.StartRendering()TopLevel.StopRendering()TopLevel.OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)TopLevel.OnApplyTemplate(TemplateAppliedEventArgs)TopLevel.InvalidateMirrorTransform()TopLevel.ClientSizeTopLevel.FrameSizeTopLevel.TransparencyLevelHintTopLevel.ActualTransparencyLevelTopLevel.TransparencyBackgroundFallbackTopLevel.RequestedThemeVariantTopLevel.RendererDiagnosticsTopLevel.RenderScalingTopLevel.StorageProviderTopLevel.InsetsManagerTopLevel.ClipboardTopLevel.FocusManagerTopLevel.PlatformSettingsTopLevel.BypassFlowDirectionPoliciesTopLevel.OpenedTopLevel.ClosedTopLevel.ScalingChangedTopLevel.BackRequestedContentControl.ContentPropertyContentControl.ContentTemplatePropertyContentControl.HorizontalContentAlignmentPropertyContentControl.VerticalContentAlignmentPropertyContentControl.RegisterContentPresenter(ContentPresenter)ContentControl.ContentContentControl.ContentTemplateContentControl.PresenterContentControl.HorizontalContentAlignmentContentControl.VerticalContentAlignmentTemplatedControl.BackgroundPropertyTemplatedControl.BorderBrushPropertyTemplatedControl.BorderThicknessPropertyTemplatedControl.CornerRadiusPropertyTemplatedControl.FontFamilyPropertyTemplatedControl.FontSizePropertyTemplatedControl.FontStylePropertyTemplatedControl.FontWeightPropertyTemplatedControl.FontStretchPropertyTemplatedControl.ForegroundPropertyTemplatedControl.PaddingPropertyTemplatedControl.TemplatePropertyTemplatedControl.IsTemplateFocusTargetPropertyTemplatedControl.TemplateAppliedEventTemplatedControl.GetIsTemplateFocusTarget(Control)TemplatedControl.ApplyTemplate()TemplatedControl.GetTemplateFocusTarget()TemplatedControl.OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs)TemplatedControl.OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs)TemplatedControl.OnTemplateChanged(AvaloniaPropertyChangedEventArgs)TemplatedControl.BackgroundTemplatedControl.BorderBrushTemplatedControl.BorderThicknessTemplatedControl.CornerRadiusTemplatedControl.FontFamilyTemplatedControl.FontSizeTemplatedControl.FontStyleTemplatedControl.FontWeightTemplatedControl.FontStretchTemplatedControl.ForegroundTemplatedControl.PaddingTemplatedControl.TemplateTemplatedControl.TemplateAppliedControl.FocusAdornerPropertyControl.TagPropertyControl.ContextMenuPropertyControl.ContextFlyoutPropertyControl.RequestBringIntoViewEventControl.ContextRequestedEventControl.LoadedEventControl.UnloadedEventControl.SizeChangedEventControl.OnLoaded(RoutedEventArgs)Control.OnUnloaded(RoutedEventArgs)Control.OnSizeChanged(SizeChangedEventArgs)Control.OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs)Control.OnDetachedFromVisualTreeCore(VisualTreeAttachmentEventArgs)Control.OnGotFocus(GotFocusEventArgs)Control.OnLostFocus(RoutedEventArgs)Control.OnPointerReleased(PointerReleasedEventArgs)Control.OnKeyUp(KeyEventArgs)Control.FocusAdornerControl.DataTemplatesControl.ContextMenuControl.ContextFlyoutControl.IsLoadedControl.TagControl.ContextRequestedControl.LoadedControl.UnloadedControl.SizeChangedInputElement.FocusablePropertyInputElement.IsEnabledPropertyInputElement.IsEffectivelyEnabledPropertyInputElement.CursorPropertyInputElement.IsKeyboardFocusWithinPropertyInputElement.IsFocusedPropertyInputElement.IsHitTestVisiblePropertyInputElement.IsPointerOverPropertyInputElement.IsTabStopPropertyInputElement.GotFocusEventInputElement.LostFocusEventInputElement.KeyDownEventInputElement.KeyUpEventInputElement.TabIndexPropertyInputElement.TextInputEventInputElement.TextInputMethodClientRequestedEventInputElement.PointerEnteredEventInputElement.PointerExitedEventInputElement.PointerMovedEventInputElement.PointerPressedEventInputElement.PointerReleasedEventInputElement.PointerCaptureLostEventInputElement.PointerWheelChangedEventInputElement.TappedEventInputElement.HoldingEventInputElement.DoubleTappedEventInputElement.Focus(NavigationMethod, KeyModifiers)InputElement.OnKeyDown(KeyEventArgs)InputElement.OnTextInput(TextInputEventArgs)InputElement.OnPointerEntered(PointerEventArgs)InputElement.OnPointerExited(PointerEventArgs)InputElement.OnPointerMoved(PointerEventArgs)InputElement.OnPointerPressed(PointerPressedEventArgs)InputElement.OnPointerCaptureLost(PointerCaptureLostEventArgs)InputElement.OnPointerWheelChanged(PointerWheelEventArgs)InputElement.UpdateIsEffectivelyEnabled()InputElement.FocusableInputElement.IsEnabledInputElement.CursorInputElement.IsKeyboardFocusWithinInputElement.IsFocusedInputElement.IsHitTestVisibleInputElement.IsPointerOverInputElement.IsTabStopInputElement.IsEffectivelyEnabledInputElement.TabIndexInputElement.KeyBindingsInputElement.IsEnabledCoreInputElement.GestureRecognizersInputElement.GotFocusInputElement.LostFocusInputElement.KeyDownInputElement.KeyUpInputElement.TextInputInputElement.TextInputMethodClientRequestedInputElement.PointerEnteredInputElement.PointerExitedInputElement.PointerMovedInputElement.PointerPressedInputElement.PointerReleasedInputElement.PointerCaptureLostInputElement.PointerWheelChangedInputElement.TappedInputElement.HoldingInputElement.DoubleTappedInteractive.RaiseEvent(RoutedEventArgs)Interactive.BuildEventRoute(RoutedEvent)Layoutable.DesiredSizePropertyLayoutable.WidthPropertyLayoutable.HeightPropertyLayoutable.MinWidthPropertyLayoutable.MaxWidthPropertyLayoutable.MinHeightPropertyLayoutable.MaxHeightPropertyLayoutable.MarginPropertyLayoutable.HorizontalAlignmentPropertyLayoutable.VerticalAlignmentPropertyLayoutable.UseLayoutRoundingPropertyLayoutable.UpdateLayout()Layoutable.Measure(Size)Layoutable.Arrange(Rect)Layoutable.InvalidateMeasure()Layoutable.InvalidateArrange()Layoutable.AffectsMeasure<T>(params AvaloniaProperty[])Layoutable.AffectsArrange<T>(params AvaloniaProperty[])Layoutable.ArrangeOverride(Size)Layoutable.OnMeasureInvalidated()Layoutable.OnVisualParentChanged(Visual, Visual)Layoutable.WidthLayoutable.HeightLayoutable.MinWidthLayoutable.MaxWidthLayoutable.MinHeightLayoutable.MaxHeightLayoutable.MarginLayoutable.HorizontalAlignmentLayoutable.VerticalAlignmentLayoutable.DesiredSizeLayoutable.IsMeasureValidLayoutable.IsArrangeValidLayoutable.UseLayoutRoundingLayoutable.EffectiveViewportChangedLayoutable.LayoutUpdatedVisual.BoundsPropertyVisual.ClipToBoundsPropertyVisual.ClipPropertyVisual.IsVisiblePropertyVisual.OpacityPropertyVisual.OpacityMaskPropertyVisual.EffectPropertyVisual.HasMirrorTransformPropertyVisual.RenderTransformPropertyVisual.RenderTransformOriginPropertyVisual.FlowDirectionPropertyVisual.VisualParentPropertyVisual.ZIndexPropertyVisual.GetFlowDirection(Visual)Visual.SetFlowDirection(Visual, FlowDirection)Visual.InvalidateVisual()Visual.Render(DrawingContext)Visual.AffectsRender<T>(params AvaloniaProperty[])Visual.OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs)Visual.BoundsVisual.ClipToBoundsVisual.ClipVisual.IsEffectivelyVisibleVisual.IsVisibleVisual.OpacityVisual.OpacityMaskVisual.EffectVisual.HasMirrorTransformVisual.RenderTransformVisual.RenderTransformOriginVisual.FlowDirectionVisual.ZIndexVisual.VisualChildrenVisual.VisualRootVisual.AttachedToVisualTreeVisual.DetachedFromVisualTreeStyledElement.DataContextPropertyStyledElement.NamePropertyStyledElement.ParentPropertyStyledElement.TemplatedParentPropertyStyledElement.ThemePropertyStyledElement.BeginInit()StyledElement.EndInit()StyledElement.ApplyStyling()StyledElement.InitializeIfNeeded()StyledElement.OnDataContextBeginUpdate()StyledElement.OnDataContextEndUpdate()StyledElement.OnInitialized()StyledElement.NameStyledElement.ClassesStyledElement.DataContextStyledElement.IsInitializedStyledElement.StylesStyledElement.StyleKeyStyledElement.ResourcesStyledElement.TemplatedParentStyledElement.ThemeStyledElement.LogicalChildrenStyledElement.PseudoClassesStyledElement.ParentStyledElement.ActualThemeVariantStyledElement.AttachedToLogicalTreeStyledElement.DetachedFromLogicalTreeStyledElement.DataContextChangedStyledElement.InitializedStyledElement.ResourcesChangedStyledElement.ActualThemeVariantChangedAnimatable.TransitionsPropertyAnimatable.OnPropertyChangedCore(AvaloniaPropertyChangedEventArgs)Animatable.TransitionsAvaloniaObject.CheckAccess()AvaloniaObject.VerifyAccess()AvaloniaObject.ClearValue(AvaloniaProperty)AvaloniaObject.ClearValue<T>(AvaloniaProperty<T>)AvaloniaObject.ClearValue<T>(StyledProperty<T>)AvaloniaObject.ClearValue<T>(DirectPropertyBase<T>)AvaloniaObject.GetHashCode()AvaloniaObject.GetValue(AvaloniaProperty)AvaloniaObject.GetValue<T>(StyledProperty<T>)AvaloniaObject.GetValue<T>(DirectPropertyBase<T>)AvaloniaObject.GetBaseValue<T>(StyledProperty<T>)AvaloniaObject.IsAnimating(AvaloniaProperty)AvaloniaObject.IsSet(AvaloniaProperty)AvaloniaObject.SetValue<T>(StyledProperty<T>, T, BindingPriority)AvaloniaObject.SetValue<T>(DirectPropertyBase<T>, T)AvaloniaObject.SetCurrentValue<T>(StyledProperty<T>, T)AvaloniaObject.CoerceValue(AvaloniaProperty)AvaloniaObject.RaisePropertyChanged<T>(DirectPropertyBase<T>, T, T)AvaloniaObject.SetAndRaise<T>(DirectPropertyBase<T>, ref T, T)AvaloniaObject.InheritanceParentAvaloniaObject.this[AvaloniaProperty]AvaloniaObject.this[IndexerDescriptor]AvaloniaObject.PropertyChanged
- Extension Methods
Constructors
Window()
Initialize new Window instance.
public Window()
Fields
HasDialogsProperty
Property of HasDialogs.
public static readonly DirectProperty<Window, bool> HasDialogsProperty
Field Value
IsClosedProperty
Property of IsClosed.
public static readonly DirectProperty<Window, bool> IsClosedProperty
Field Value
IsOpenedProperty
Property of IsOpened.
public static readonly DirectProperty<Window, bool> IsOpenedProperty
Field Value
IsShownAsDialogProperty
Property of IsShownAsDialog.
public static readonly DirectProperty<Window, bool> IsShownAsDialogProperty
Field Value
Properties
HasDialogs
Get whether at least one dialog owned by this window is shown or not.
public bool HasDialogs { get; }
Property Value
IsClosed
Check whether window is closed or not.
public bool IsClosed { get; }
Property Value
IsOpened
Check whether window is opened or not.
public bool IsOpened { get; }
Property Value
IsShownAsDialog
Check whether window is shown as dialog or not.
public bool IsShownAsDialog { get; }
Property Value
SynchronizationContext
Get DispatcherSynchronizationContext of UI thread.
public DispatcherSynchronizationContext SynchronizationContext { get; }
Property Value
Methods
MeasureCore(Size)
Overrides the core measure logic for windows.
protected override Size MeasureCore(Size availableSize)
Parameters
availableSizeSizeThe available size.
Returns
- Size
The measured size.
Remarks
The layout logic for top-level windows is different than for other controls because they don't have a parent, meaning that many layout properties handled by the default MeasureCore (such as margins and alignment) make no sense.
OnClosed(EventArgs)
Called when window closed.
protected override void OnClosed(EventArgs e)
Parameters
eEventArgsEvent data.
OnFirstMeasurementCompleted(Size)
Called when first measurement completed when opening Window.
protected virtual void OnFirstMeasurementCompleted(Size measuredSize)
Parameters
measuredSizeSizeMeasured size.
OnOpened(EventArgs)
Called when window opened.
protected override void OnOpened(EventArgs e)
Parameters
eEventArgsEvent data.
OnOpening(EventArgs)
Called to raise Opening event.
protected virtual void OnOpening(EventArgs e)
Parameters
eEventArgsEvent data.
Events
Opening
Raised when opening window and before it can be seen by user.
public event EventHandler? Opening