C# Class WinRTXamlToolkit.Controls.ToolWindow

Inheritance: Windows.UI.Xaml.Controls.ContentControl
Afficher le fichier Open project: xyzzer/WinRTXamlToolkit

Méthodes publiques

Свойство Type Description
CanCloseProperty Windows.UI.Xaml.DependencyProperty
CanDragAnywhereProperty Windows.UI.Xaml.DependencyProperty
CanMaximizeProperty Windows.UI.Xaml.DependencyProperty
CanResizeProperty Windows.UI.Xaml.DependencyProperty
CanSnapToEdgeProperty Windows.UI.Xaml.DependencyProperty
TitleBackgroundBrushProperty Windows.UI.Xaml.DependencyProperty
TitleProperty Windows.UI.Xaml.DependencyProperty
TitleTemplateProperty Windows.UI.Xaml.DependencyProperty
WindowEdgeSnapBehaviorProperty Windows.UI.Xaml.DependencyProperty
WindowMovableAreaEdgeThicknessProperty Windows.UI.Xaml.DependencyProperty
WindowMovableAreaProperty Windows.UI.Xaml.DependencyProperty
WindowStartupLocationProperty Windows.UI.Xaml.DependencyProperty
WindowStateProperty Windows.UI.Xaml.DependencyProperty
XProperty Windows.UI.Xaml.DependencyProperty
YProperty Windows.UI.Xaml.DependencyProperty

Méthodes publiques

Méthode Description
ActivateAsync ( ) : System.Threading.Tasks.Task

Activates the window. The method can be awaited to wait for the unsnap animation to complete.

Close ( ) : void

Closes the window.

Hide ( ) : void

Hides the window.

Maximize ( ) : void

Maximizes the window

MinimizeAsync ( ) : System.Threading.Tasks.Task

Minimizes the window.

RestoreAsync ( ) : System.Threading.Tasks.Task

Restores the window

Show ( ) : void

Shows the window.

SnapToEdgeAsync ( ) : System.Threading.Tasks.Task

Snaps to nearest edge.

ToolWindow ( ) : System

Initializes a new instance of the ToolWindow class.

Méthodes protégées

Méthode Description
OnApplyTemplate ( ) : void

Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class.

OnCanCloseChanged ( bool oldCanClose, bool newCanClose ) : void

Provides derived classes an opportunity to handle changes to the CanClose property.

OnCanDragAnywhereChanged ( bool oldCanDragAnywhere, bool newCanDragAnywhere ) : void

Provides derived classes an opportunity to handle changes to the CanDragAnywhere property.

OnCanMaximizeChanged ( bool oldCanMaximize, bool newCanMaximize ) : void

Provides derived classes an opportunity to handle changes to the CanMaximize property.

OnCanResizeChanged ( bool oldCanResize, bool newCanResize ) : void

Provides derived classes an opportunity to handle changes to the CanResize property.

OnCanSnapToEdgeChanged ( bool oldCanSnapToEdge, bool newCanSnapToEdge ) : void

Provides derived classes an opportunity to handle changes to the CanSnapToEdge property.

OnTitleChanged ( object oldTitle, object newTitle ) : void

Provides derived classes an opportunity to handle changes to the Title property.

OnTitleTemplateChanged ( DataTemplate oldTitleTemplate, DataTemplate newTitleTemplate ) : void

Provides derived classes an opportunity to handle changes to the TitleTemplate property.

OnWindowEdgeSnapBehaviorChanged ( WindowEdgeSnapBehavior oldWindowEdgeSnapBehavior, WindowEdgeSnapBehavior newWindowEdgeSnapBehavior ) : void

Provides derived classes an opportunity to handle changes to the WindowEdgeSnapBehavior property.

OnWindowMovableAreaChanged ( WindowMovableArea oldWindowMovableArea, WindowMovableArea newWindowMovableArea ) : void

Provides derived classes an opportunity to handle changes to the WindowMovableArea property.

OnWindowMovableAreaEdgeThicknessChanged ( Thickness oldWindowMovableAreaEdgeThickness, Thickness newWindowMovableAreaEdgeThickness ) : void

Provides derived classes an opportunity to handle changes to the WindowMovableAreaEdgeThickness property.

OnWindowStartupLocationChanged ( WindowStartupLocation oldWindowStartupLocation, WindowStartupLocation newWindowStartupLocation ) : void

Provides derived classes an opportunity to handle changes to the WindowStartupLocation property.

OnWindowStateChanged ( WindowStates oldWindowState, WindowStates newWindowState ) : void

Provides derived classes an opportunity to handle changes to the WindowState property.

OnXChanged ( double oldX, double newX ) : void

Provides derived classes an opportunity to handle changes to the X property.

OnYChanged ( double oldY, double newY ) : void

Provides derived classes an opportunity to handle changes to the Y property.

Private Methods

Méthode Description
AnimateRotatedSnapAsync ( double x, double y, double angle ) : System.Threading.Tasks.Task
AnimateStraightSnapAsync ( double x, double y ) : System.Threading.Tasks.Task
AnimateToStraightenAsync ( ) : System.Threading.Tasks.Task
CleanupSnapProperties ( ) : void
FilterOutManipulations ( UIElement element ) : void
GetDesiredPosition ( double startx, double starty, double &angle, Edges &edge ) : DoublePoint

Calculates the desired position, rotation and snapping edge given the position of the window.

GetMovableArea ( ) : Rect

Gets the range of X,Y window position values acceptable for the window

HookUpEvents ( ) : void
HookUpSizingThumbManipulations ( Rectangle thumb ) : void
InitializeStartupLocation ( ) : void
OnBorderManipulationCompleted ( object sender, ManipulationCompletedRoutedEventArgs e ) : void
OnBorderManipulationDelta ( object sender, ManipulationDeltaRoutedEventArgs e ) : void
OnBorderManipulationInertiaStarting ( object sender, ManipulationInertiaStartingRoutedEventArgs e ) : void
OnBorderManipulationStarting ( object sender, ManipulationStartedRoutedEventArgs e ) : void
OnBorderPointerPressed ( object sender, PointerRoutedEventArgs e ) : void
OnBorderThicknessChanged ( object sender, Thickness thickness ) : void
OnCanCloseChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the CanClose property.

OnCanDragAnywhereChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the CanDragAnywhere property.

OnCanMaximizeChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the CanMaximize property.

OnCanResizeChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the CanResize property.

OnCanSnapToEdgeChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the CanSnapToEdge property.

OnCloseButtonClick ( object sender, RoutedEventArgs e ) : void
OnFilteredOutManipulationStarted ( object sender, ManipulationStartedRoutedEventArgs e ) : void
OnFilteredOutManipulationStarting ( object sender, ManipulationStartingRoutedEventArgs e ) : void
OnLoaded ( object sender, RoutedEventArgs e ) : void
OnMaximizeButtonClick ( object sender, RoutedEventArgs e ) : void
OnMinimizeButtonClick ( object sender, RoutedEventArgs e ) : void
OnParentSizeChanged ( object sender, SizeChangedEventArgs e ) : void
OnRestoreButtonClick ( object sender, RoutedEventArgs e ) : void
OnSnapButtonClick ( object sender, RoutedEventArgs e ) : void
OnThumbManipulationDelta ( object sender, ManipulationDeltaRoutedEventArgs e ) : void
OnTitleChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the Title property.

OnTitleGridSizeChanged ( object sender, SizeChangedEventArgs e ) : void
OnTitleTemplateChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the TitleTemplate property.

OnUnloaded ( object sender, RoutedEventArgs e ) : void
OnWindowEdgeSnapBehaviorChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the WindowEdgeSnapBehavior property.

OnWindowMovableAreaChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the WindowMovableArea property.

OnWindowMovableAreaEdgeThicknessChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the WindowMovableAreaEdgeThickness property.

OnWindowStartupLocationChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the WindowStartupLocation property.

OnWindowStateChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the WindowState property.

OnXChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the X property.

OnYChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the Y property.

RaiseClosed ( ) : void
RaiseClosing ( ) : bool

Raises the closing event.

SnapToEdgeIfNecessary ( ) : void
StopCurrentSnapStoryboard ( ) : void
UnFilterOutManipulations ( UIElement element ) : void
UnhookEvents ( ) : void
UpdateSizingThumbSizes ( ) : void

Update the sizes of the sizing thumbs.

UpdateVisualStates ( bool useTransitions ) : void

Updates the visual states.

Method Details

ActivateAsync() public méthode

Activates the window. The method can be awaited to wait for the unsnap animation to complete.
public ActivateAsync ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task

Close() public méthode

Closes the window.
public Close ( ) : void
Résultat void

Hide() public méthode

Hides the window.
public Hide ( ) : void
Résultat void

Maximize() public méthode

Maximizes the window
public Maximize ( ) : void
Résultat void

MinimizeAsync() public méthode

Minimizes the window.
public MinimizeAsync ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task

OnApplyTemplate() protected méthode

Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class.
protected OnApplyTemplate ( ) : void
Résultat void

OnCanCloseChanged() protected méthode

Provides derived classes an opportunity to handle changes to the CanClose property.
protected OnCanCloseChanged ( bool oldCanClose, bool newCanClose ) : void
oldCanClose bool The old CanClose value
newCanClose bool The new CanClose value
Résultat void

OnCanDragAnywhereChanged() protected méthode

Provides derived classes an opportunity to handle changes to the CanDragAnywhere property.
protected OnCanDragAnywhereChanged ( bool oldCanDragAnywhere, bool newCanDragAnywhere ) : void
oldCanDragAnywhere bool The old CanDragAnywhere value
newCanDragAnywhere bool The new CanDragAnywhere value
Résultat void

OnCanMaximizeChanged() protected méthode

Provides derived classes an opportunity to handle changes to the CanMaximize property.
protected OnCanMaximizeChanged ( bool oldCanMaximize, bool newCanMaximize ) : void
oldCanMaximize bool The old CanMaximize value
newCanMaximize bool The new CanMaximize value
Résultat void

OnCanResizeChanged() protected méthode

Provides derived classes an opportunity to handle changes to the CanResize property.
protected OnCanResizeChanged ( bool oldCanResize, bool newCanResize ) : void
oldCanResize bool The old CanResize value
newCanResize bool The new CanResize value
Résultat void

OnCanSnapToEdgeChanged() protected méthode

Provides derived classes an opportunity to handle changes to the CanSnapToEdge property.
protected OnCanSnapToEdgeChanged ( bool oldCanSnapToEdge, bool newCanSnapToEdge ) : void
oldCanSnapToEdge bool The old CanSnapToEdge value
newCanSnapToEdge bool The new CanSnapToEdge value
Résultat void

OnTitleChanged() protected méthode

Provides derived classes an opportunity to handle changes to the Title property.
protected OnTitleChanged ( object oldTitle, object newTitle ) : void
oldTitle object The old Title value
newTitle object The new Title value
Résultat void

OnTitleTemplateChanged() protected méthode

Provides derived classes an opportunity to handle changes to the TitleTemplate property.
protected OnTitleTemplateChanged ( DataTemplate oldTitleTemplate, DataTemplate newTitleTemplate ) : void
oldTitleTemplate Windows.UI.Xaml.DataTemplate The old TitleTemplate value
newTitleTemplate Windows.UI.Xaml.DataTemplate The new TitleTemplate value
Résultat void

OnWindowEdgeSnapBehaviorChanged() protected méthode

Provides derived classes an opportunity to handle changes to the WindowEdgeSnapBehavior property.
protected OnWindowEdgeSnapBehaviorChanged ( WindowEdgeSnapBehavior oldWindowEdgeSnapBehavior, WindowEdgeSnapBehavior newWindowEdgeSnapBehavior ) : void
oldWindowEdgeSnapBehavior WindowEdgeSnapBehavior The old WindowEdgeSnapBehavior value
newWindowEdgeSnapBehavior WindowEdgeSnapBehavior The new WindowEdgeSnapBehavior value
Résultat void

OnWindowMovableAreaChanged() protected méthode

Provides derived classes an opportunity to handle changes to the WindowMovableArea property.
protected OnWindowMovableAreaChanged ( WindowMovableArea oldWindowMovableArea, WindowMovableArea newWindowMovableArea ) : void
oldWindowMovableArea WindowMovableArea The old WindowMovableArea value
newWindowMovableArea WindowMovableArea The new WindowMovableArea value
Résultat void

OnWindowMovableAreaEdgeThicknessChanged() protected méthode

Provides derived classes an opportunity to handle changes to the WindowMovableAreaEdgeThickness property.
protected OnWindowMovableAreaEdgeThicknessChanged ( Thickness oldWindowMovableAreaEdgeThickness, Thickness newWindowMovableAreaEdgeThickness ) : void
oldWindowMovableAreaEdgeThickness Windows.UI.Xaml.Thickness The old WindowMovableAreaEdgeThickness value
newWindowMovableAreaEdgeThickness Windows.UI.Xaml.Thickness The new WindowMovableAreaEdgeThickness value
Résultat void

OnWindowStartupLocationChanged() protected méthode

Provides derived classes an opportunity to handle changes to the WindowStartupLocation property.
protected OnWindowStartupLocationChanged ( WindowStartupLocation oldWindowStartupLocation, WindowStartupLocation newWindowStartupLocation ) : void
oldWindowStartupLocation WindowStartupLocation The old WindowStartupLocation value
newWindowStartupLocation WindowStartupLocation The new WindowStartupLocation value
Résultat void

OnWindowStateChanged() protected méthode

Provides derived classes an opportunity to handle changes to the WindowState property.
protected OnWindowStateChanged ( WindowStates oldWindowState, WindowStates newWindowState ) : void
oldWindowState WindowStates The old WindowState value
newWindowState WindowStates The new WindowState value
Résultat void

OnXChanged() protected méthode

Provides derived classes an opportunity to handle changes to the X property.
protected OnXChanged ( double oldX, double newX ) : void
oldX double The old X value
newX double The new X value
Résultat void

OnYChanged() protected méthode

Provides derived classes an opportunity to handle changes to the Y property.
protected OnYChanged ( double oldY, double newY ) : void
oldY double The old Y value
newY double The new Y value
Résultat void

RestoreAsync() public méthode

Restores the window
public RestoreAsync ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task

Show() public méthode

Shows the window.
public Show ( ) : void
Résultat void

SnapToEdgeAsync() public méthode

Snaps to nearest edge.
public SnapToEdgeAsync ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task

ToolWindow() public méthode

Initializes a new instance of the ToolWindow class.
public ToolWindow ( ) : System
Résultat System

Property Details

CanCloseProperty public_oe static_oe property

CanClose Dependency Property
public static DependencyProperty,Windows.UI.Xaml CanCloseProperty
Résultat Windows.UI.Xaml.DependencyProperty

CanDragAnywhereProperty public_oe static_oe property

CanDragAnywhere Dependency Property
public static DependencyProperty,Windows.UI.Xaml CanDragAnywhereProperty
Résultat Windows.UI.Xaml.DependencyProperty

CanMaximizeProperty public_oe static_oe property

CanMaximize Dependency Property
public static DependencyProperty,Windows.UI.Xaml CanMaximizeProperty
Résultat Windows.UI.Xaml.DependencyProperty

CanResizeProperty public_oe static_oe property

CanResize Dependency Property
public static DependencyProperty,Windows.UI.Xaml CanResizeProperty
Résultat Windows.UI.Xaml.DependencyProperty

CanSnapToEdgeProperty public_oe static_oe property

CanSnapToEdge Dependency Property
public static DependencyProperty,Windows.UI.Xaml CanSnapToEdgeProperty
Résultat Windows.UI.Xaml.DependencyProperty

TitleBackgroundBrushProperty public_oe static_oe property

TitleBackgroundBrush Dependency Property
public static DependencyProperty,Windows.UI.Xaml TitleBackgroundBrushProperty
Résultat Windows.UI.Xaml.DependencyProperty

TitleProperty public_oe static_oe property

Title Dependency Property
public static DependencyProperty,Windows.UI.Xaml TitleProperty
Résultat Windows.UI.Xaml.DependencyProperty

TitleTemplateProperty public_oe static_oe property

TitleTemplate Dependency Property
public static DependencyProperty,Windows.UI.Xaml TitleTemplateProperty
Résultat Windows.UI.Xaml.DependencyProperty

WindowEdgeSnapBehaviorProperty public_oe static_oe property

WindowEdgeSnapBehavior Dependency Property
public static DependencyProperty,Windows.UI.Xaml WindowEdgeSnapBehaviorProperty
Résultat Windows.UI.Xaml.DependencyProperty

WindowMovableAreaEdgeThicknessProperty public_oe static_oe property

WindowMovableAreaEdgeThickness Dependency Property
public static DependencyProperty,Windows.UI.Xaml WindowMovableAreaEdgeThicknessProperty
Résultat Windows.UI.Xaml.DependencyProperty

WindowMovableAreaProperty public_oe static_oe property

WindowMovableArea Dependency Property
public static DependencyProperty,Windows.UI.Xaml WindowMovableAreaProperty
Résultat Windows.UI.Xaml.DependencyProperty

WindowStartupLocationProperty public_oe static_oe property

WindowStartupLocation Dependency Property
public static DependencyProperty,Windows.UI.Xaml WindowStartupLocationProperty
Résultat Windows.UI.Xaml.DependencyProperty

WindowStateProperty public_oe static_oe property

WindowState Dependency Property
public static DependencyProperty,Windows.UI.Xaml WindowStateProperty
Résultat Windows.UI.Xaml.DependencyProperty

XProperty public_oe static_oe property

X Dependency Property
public static DependencyProperty,Windows.UI.Xaml XProperty
Résultat Windows.UI.Xaml.DependencyProperty

YProperty public_oe static_oe property

Y Dependency Property
public static DependencyProperty,Windows.UI.Xaml YProperty
Résultat Windows.UI.Xaml.DependencyProperty