C# Класс SilverFlow.Controls.FloatingWindow

Наследование: System.Windows.Controls.ContentControl, IResizableElement, IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
CloseButtonStyleProperty System.Windows.DependencyProperty
FlowDirectionProperty System.Windows.DependencyProperty
IconProperty System.Windows.DependencyProperty
IconTextProperty System.Windows.DependencyProperty
MaximizeButtonStyleProperty System.Windows.DependencyProperty
MinimizeButtonStyleProperty System.Windows.DependencyProperty
PositionProperty System.Windows.DependencyProperty
ResizeEnabledProperty System.Windows.DependencyProperty
ResizingAreaThicknessProperty DependencyProperty
RestoreButtonStyleProperty DependencyProperty
ShowCloseButtonProperty DependencyProperty
ShowInIconbarProperty DependencyProperty
ShowMaximizeButtonProperty DependencyProperty
ShowMinimizeButtonProperty DependencyProperty
ShowRestoreButtonProperty DependencyProperty
TitleBackgroundProperty DependencyProperty
TitleProperty DependencyProperty
TitleStyleProperty DependencyProperty

Private Properties

Свойство Тип Описание
ActiveWindowChanged void
Application_Exit void
CaptureMouseCursor void
CheckHost void
CloseButton_Click void
Closing_Completed void
ContentRoot_SizeChanged void
EnsureVisible void
FloatingWindow_MouseLeftButtonDown void
GetAppSettingsKey string
GetCurrentWindowPosition Point
GetStoryboards void
GetThumbnailImage ImageSource
Host_SizeChanged void
InertialMotion_Completed void
InitializeContentRootTransformGroup void
IsMouseOverButtons bool
MaximizeButton_Click void
Maximizing_Completed void
MinimizeButton_Click void
MoveWindow void
OnCloseButtonStylePropertyChanged void
OnMaximizeButtonStylePropertyChanged void
OnMinimizeButtonStylePropertyChanged void
OnPositionPropertyChanged void
OnResizingAreaThicknessPropertyChanged void
OnRestoreButtonStylePropertyChanged void
OnShowCloseButtonPropertyChanged void
OnTitleStylePropertyChanged void
Opening_Completed void
RestoreButton_Click void
RestoreMaximizedWindow void
RestoringMaximized_Completed void
RestoringMinimized_Completed void
SaveActualSize void
SaveSizeAndPosition void
SetInitialRootPosition void
SetStyles void
SetTopmost void
ShowMaximizeButtonPropertyChanged void
ShowMinimizeButtonPropertyChanged void
ShowRestoreButtonPropertyChanged void
ShowWindow void
ShowWindow void
StartMaximizingAnimation void
StartRestoringAnimation void
StopInertialMotion void
SubscribeToEvents void
SubscribeToStoryBoardEvents void
SubscribeToTemplatePartEvents void
UnSubscribeFromEvents void
UnsubscribeFromStoryBoardEvents void
UnsubscribeFromTemplatePartEvents void

Открытые методы

Метод Описание
Activate ( ) : void

Makes the window topmost and tries to set focus on it.

Close ( ) : void

Closes a FloatingWindow.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

FloatingWindow ( ) : System

Initializes a new instance of the FloatingWindow class.

MaximizeWindow ( ) : void

Maximizes the window.

MinimizeWindow ( ) : void

Minimizes the window.

OnApplyTemplate ( ) : void

Builds the visual tree for the FloatingWindow control when a new template is applied.

RestoreSizeAndPosition ( ) : void

Restores the size and position stored in the IsolatedStorage on closing.

RestoreWindow ( ) : void

Restores window state, size and its position.

Show ( ) : void

Opens the FloatingWindow in previously saved position or in the center of the FloatingWindowHost.

Show ( Point point ) : void

Shows the window in the specified coordinates, relative to the window's Host.

Show ( Thickness margins ) : void

Shows a FloatingWindow at maximal size taking into account specified margins and current FloatingWindowHost size.

Show ( double x, double y ) : void

Shows the window in the specified coordinates, relative to the window's Host.

ShowModal ( ) : void

Shows the window as a modal one.

Защищенные методы

Метод Описание
OnActivated ( EventArgs e ) : void

Raises the FloatingWindow.Activated event.

OnClosed ( EventArgs e ) : void

Raises the FloatingWindow.Closed event.

OnClosing ( CancelEventArgs e ) : void

Raises the FloatingWindow.Closing event.

OnDeactivated ( EventArgs e ) : void

Raises the FloatingWindow.Deactivated event.

OnMaximized ( EventArgs e ) : void

Raises the FloatingWindow.Maximized event.

OnMinimized ( EventArgs e ) : void

Raises the FloatingWindow.Minimized event.

OnMouseLeftButtonDown ( System.Windows.Input.MouseButtonEventArgs e ) : void

Executed when mouse left button is down.

OnMouseLeftButtonUp ( System.Windows.Input.MouseButtonEventArgs e ) : void

Executed when mouse left button is up.

OnMouseMove ( System.Windows.Input.MouseEventArgs e ) : void

Executed when mouse moves.

OnOpened ( ) : void

This method is called every time a FloatingWindow is displayed.

OnRestored ( EventArgs e ) : void

Raises the FloatingWindow.Restored event.

Приватные методы

Метод Описание
ActiveWindowChanged ( object sender, ActiveWindowChangedEventArgs e ) : void

Handles the ActiveWindowChanged event of the Host control.

Application_Exit ( object sender, EventArgs e ) : void

Executed when the application is exited.

CaptureMouseCursor ( ) : void

Captures the mouse cursor.

CheckHost ( ) : void

Checks if the floating window was added to the FloatingWindowHost.

CloseButton_Click ( object sender, RoutedEventArgs e ) : void

Executed when the Close button is clicked.

Closing_Completed ( object sender, EventArgs e ) : void

Executed when the Closing storyboard ends.

ContentRoot_SizeChanged ( object sender, System.Windows.SizeChangedEventArgs e ) : void

Handles the SizeChanged event of the ContentRoot control to update window position only once when the window is opened.

EnsureVisible ( ) : void

Ensures the window is visible.

FloatingWindow_MouseLeftButtonDown ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void

Handles the MouseLeftButtonDown event to bring the window to the front.

GetAppSettingsKey ( string key ) : string

Gets the application settings key used to store properties in the IsolatedStorage.

GetCurrentWindowPosition ( ) : Point

Gets current window position taking into account animation effects.

GetStoryboards ( ) : void

Gets the storyboards defined in the FloatingWindow style.

GetThumbnailImage ( ) : ImageSource

Creates a thumbnail of the window.

Host_SizeChanged ( object sender, System.Windows.SizeChangedEventArgs e ) : void

Updates clipping region on host SizeChanged event.

InertialMotion_Completed ( object sender, EventArgs e ) : void

Handles the Completed event of the InertialMotionStoryboard.

InitializeContentRootTransformGroup ( ) : void

Checks the TransformGroup of the content root or creates it if necesary.

IsMouseOverButtons ( Point position, UIElement origin ) : bool

Determines whether the mouse is over buttons in the the specified mouse position.

MaximizeButton_Click ( object sender, RoutedEventArgs e ) : void

Handles the Click event of the MaximizeButton control.

Maximizing_Completed ( object sender, EventArgs e ) : void

Handles the Completed event of the Maximizing animation.

MinimizeButton_Click ( object sender, RoutedEventArgs e ) : void

Handles the Click event of the MinimizeButton control.

MoveWindow ( Point point ) : void

Moves the window to the specified coordinates.

OnCloseButtonStylePropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

CloseButtonStyle PropertyChangedCallback call back static function.

OnMaximizeButtonStylePropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

MaximizeButtonStyle PropertyChangedCallback call back static function.

OnMinimizeButtonStylePropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

CloseButtonStyle PropertyChangedCallback call back static function.

OnPositionPropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

PositionProperty PropertyChangedCallback call back static function.

OnResizingAreaThicknessPropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

ResizingAreaThicknessProperty PropertyChangedCallback call back static function.

OnRestoreButtonStylePropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

RestoreButtonStyle PropertyChangedCallback call back static function.

OnShowCloseButtonPropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

ShowCloseButtonProperty PropertyChangedCallback call back static function.

OnTitleStylePropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

TitleStyle PropertyChangedCallback call back static function.

Opening_Completed ( object sender, EventArgs e ) : void

Executed when the opening storyboard finishes.

RestoreButton_Click ( object sender, RoutedEventArgs e ) : void

Handles the Click event of the RestoreButton control.

RestoreMaximizedWindow ( ) : void

Restores maximized window position and size.

RestoringMaximized_Completed ( object sender, EventArgs e ) : void

Handles the Completed event of the Restoring Maximized window animation.

RestoringMinimized_Completed ( object sender, EventArgs e ) : void

Handles the Completed event of the Restoring Minimized window animation.

SaveActualSize ( ) : void

Saves the actual size if it was not set explicitly set. E.g. the Width can be NaN, that means "Auto".

SaveSizeAndPosition ( ) : void

Saves current size and position of the window in the IsolatedStorage. The key of the settings is the Tag of the window (if not null).

SetInitialRootPosition ( ) : void

Shift the root of the window to compensate its margins.

SetStyles ( ) : void

Sets styles that are applied for different template parts.

SetTopmost ( ) : void

Brings current window to the front.

ShowMaximizeButtonPropertyChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

ShowMaximizeButtonProperty PropertyChangedCallback call back static function.

ShowMinimizeButtonPropertyChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

ShowMinimizeButtonProperty PropertyChangedCallback call back static function.

ShowRestoreButtonPropertyChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

ShowRestoreButtonProperty PropertyChangedCallback call back static function.

ShowWindow ( Point point ) : void

Shows the window in the specified coordinates, relative to the window's Host.

ShowWindow ( Thickness margins ) : void

Shows a FloatingWindow at maximal size taking into account specified margins and current FloatingWindowHost size.

StartMaximizingAnimation ( ) : void

Starts maximizing animation.

StartRestoringAnimation ( ) : void

Starts restoring animation.

StopInertialMotion ( ) : void

Stops current inertial motion.

SubscribeToEvents ( ) : void

Subscribes to events when the window is opened.

SubscribeToStoryBoardEvents ( ) : void

Subscribes to the events on the storyboards.

SubscribeToTemplatePartEvents ( ) : void

Subscribes to the events on the template parts.

UnSubscribeFromEvents ( ) : void

Unsubscribe from events when the ChildWindow is closed.

UnsubscribeFromStoryBoardEvents ( ) : void

Unsubscribe from events that are subscribed on the storyboards.

UnsubscribeFromTemplatePartEvents ( ) : void

Unsubscribe from the events that are subscribed on the template part elements.

Описание методов

Activate() публичный Метод

Makes the window topmost and tries to set focus on it.
public Activate ( ) : void
Результат void

Close() публичный Метод

Closes a FloatingWindow.
public Close ( ) : void
Результат void

Dispose() публичный Метод

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Результат void

FloatingWindow() публичный Метод

Initializes a new instance of the FloatingWindow class.
public FloatingWindow ( ) : System
Результат System

MaximizeWindow() публичный Метод

Maximizes the window.
public MaximizeWindow ( ) : void
Результат void

MinimizeWindow() публичный Метод

Minimizes the window.
public MinimizeWindow ( ) : void
Результат void

OnActivated() защищенный Метод

Raises the FloatingWindow.Activated event.
protected OnActivated ( EventArgs e ) : void
e System.EventArgs The event data.
Результат void

OnApplyTemplate() публичный Метод

Builds the visual tree for the FloatingWindow control when a new template is applied.
public OnApplyTemplate ( ) : void
Результат void

OnClosed() защищенный Метод

Raises the FloatingWindow.Closed event.
protected OnClosed ( EventArgs e ) : void
e System.EventArgs The event data.
Результат void

OnClosing() защищенный Метод

Raises the FloatingWindow.Closing event.
protected OnClosing ( CancelEventArgs e ) : void
e CancelEventArgs The event data.
Результат void

OnDeactivated() защищенный Метод

Raises the FloatingWindow.Deactivated event.
protected OnDeactivated ( EventArgs e ) : void
e System.EventArgs The event data.
Результат void

OnMaximized() защищенный Метод

Raises the FloatingWindow.Maximized event.
protected OnMaximized ( EventArgs e ) : void
e System.EventArgs The event data.
Результат void

OnMinimized() защищенный Метод

Raises the FloatingWindow.Minimized event.
protected OnMinimized ( EventArgs e ) : void
e System.EventArgs The event data.
Результат void

OnMouseLeftButtonDown() защищенный Метод

Executed when mouse left button is down.
protected OnMouseLeftButtonDown ( System.Windows.Input.MouseButtonEventArgs e ) : void
e System.Windows.Input.MouseButtonEventArgs The data for the event.
Результат void

OnMouseLeftButtonUp() защищенный Метод

Executed when mouse left button is up.
protected OnMouseLeftButtonUp ( System.Windows.Input.MouseButtonEventArgs e ) : void
e System.Windows.Input.MouseButtonEventArgs The data for the event.
Результат void

OnMouseMove() защищенный Метод

Executed when mouse moves.
protected OnMouseMove ( System.Windows.Input.MouseEventArgs e ) : void
e System.Windows.Input.MouseEventArgs The data for the event.
Результат void

OnOpened() защищенный Метод

This method is called every time a FloatingWindow is displayed.
protected OnOpened ( ) : void
Результат void

OnRestored() защищенный Метод

Raises the FloatingWindow.Restored event.
protected OnRestored ( EventArgs e ) : void
e System.EventArgs The event data.
Результат void

RestoreSizeAndPosition() публичный Метод

Restores the size and position stored in the IsolatedStorage on closing.
public RestoreSizeAndPosition ( ) : void
Результат void

RestoreWindow() публичный Метод

Restores window state, size and its position.
public RestoreWindow ( ) : void
Результат void

Show() публичный Метод

Opens the FloatingWindow in previously saved position or in the center of the FloatingWindowHost.
public Show ( ) : void
Результат void

Show() публичный Метод

Shows the window in the specified coordinates, relative to the window's Host.
public Show ( Point point ) : void
point Point Coordinates of the upper-left corner of the window.
Результат void

Show() публичный Метод

Shows a FloatingWindow at maximal size taking into account specified margins and current FloatingWindowHost size.
public Show ( Thickness margins ) : void
margins Thickness Window margins.
Результат void

Show() публичный Метод

Shows the window in the specified coordinates, relative to the window's Host.
public Show ( double x, double y ) : void
x double X-coordinate.
y double Y-coordinate.
Результат void

ShowModal() публичный Метод

Shows the window as a modal one.
public ShowModal ( ) : void
Результат void

Описание свойств

CloseButtonStyleProperty публичное статическое свойство

Identifies the FloatingWindow.CloseButtonStyleProperty dependency property.
public static DependencyProperty,System.Windows CloseButtonStyleProperty
Результат System.Windows.DependencyProperty

FlowDirectionProperty публичное статическое свойство

Identifies the FloatingWindow.FlowDirection dependency property.
public static DependencyProperty,System.Windows FlowDirectionProperty
Результат System.Windows.DependencyProperty

IconProperty публичное статическое свойство

Identifies the FloatingWindow.Icon dependency property.
public static DependencyProperty,System.Windows IconProperty
Результат System.Windows.DependencyProperty

IconTextProperty публичное статическое свойство

Identifies the FloatingWindow.IconText dependency property.
public static DependencyProperty,System.Windows IconTextProperty
Результат System.Windows.DependencyProperty

MaximizeButtonStyleProperty публичное статическое свойство

Identifies the FloatingWindow.MaximizeButtonStyleProperty dependency property.
public static DependencyProperty,System.Windows MaximizeButtonStyleProperty
Результат System.Windows.DependencyProperty

MinimizeButtonStyleProperty публичное статическое свойство

Identifies the FloatingWindow.MinimizeButtonStyleProperty dependency property.
public static DependencyProperty,System.Windows MinimizeButtonStyleProperty
Результат System.Windows.DependencyProperty

PositionProperty публичное статическое свойство

Identifies the FloatingWindow.Position dependency property.
public static DependencyProperty,System.Windows PositionProperty
Результат System.Windows.DependencyProperty

ResizeEnabledProperty публичное статическое свойство

Identifies the FloatingWindow.ResizeEnabled dependency property.
public static DependencyProperty,System.Windows ResizeEnabledProperty
Результат System.Windows.DependencyProperty

ResizingAreaThicknessProperty публичное статическое свойство

Identifies the FloatingWindow.ResizingAreaThickness dependency property.
public static DependencyProperty ResizingAreaThicknessProperty
Результат DependencyProperty

RestoreButtonStyleProperty публичное статическое свойство

Identifies the FloatingWindow.RestoreButtonStyleProperty dependency property.
public static DependencyProperty RestoreButtonStyleProperty
Результат DependencyProperty

ShowCloseButtonProperty публичное статическое свойство

Identifies the FloatingWindow.ShowCloseButton dependency property.
public static DependencyProperty ShowCloseButtonProperty
Результат DependencyProperty

ShowInIconbarProperty публичное статическое свойство

Identifies the FloatingWindow.ShowInIconbar dependency property.
public static DependencyProperty ShowInIconbarProperty
Результат DependencyProperty

ShowMaximizeButtonProperty публичное статическое свойство

Identifies the FloatingWindow.ShowMaximizeButton dependency property.
public static DependencyProperty ShowMaximizeButtonProperty
Результат DependencyProperty

ShowMinimizeButtonProperty публичное статическое свойство

Identifies the FloatingWindow.ShowMinimizeButton dependency property.
public static DependencyProperty ShowMinimizeButtonProperty
Результат DependencyProperty

ShowRestoreButtonProperty публичное статическое свойство

Identifies the FloatingWindow.ShowRestoreButton dependency property.
public static DependencyProperty ShowRestoreButtonProperty
Результат DependencyProperty

TitleBackgroundProperty публичное статическое свойство

Identifies the FloatingWindow.TitleBackground dependency property.
public static DependencyProperty TitleBackgroundProperty
Результат DependencyProperty

TitleProperty публичное статическое свойство

Identifies the FloatingWindow.Title dependency property.
public static DependencyProperty TitleProperty
Результат DependencyProperty

TitleStyleProperty публичное статическое свойство

Identifies the FloatingWindow.TitleStyleProperty dependency property.
public static DependencyProperty TitleStyleProperty
Результат DependencyProperty