C# Класс Yuhan.WPF.Controls.AdornedControl

A content control that allows an adorner for the content to be defined in XAML.
Наследование: System.Windows.Controls.ContentControl
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
AdornedTemplatePartNameProperty System.Windows.DependencyProperty
AdornerContentProperty System.Windows.DependencyProperty
AdornerOffsetXProperty System.Windows.DependencyProperty
AdornerOffsetYProperty System.Windows.DependencyProperty
CloseAdornerTimeOutProperty System.Windows.DependencyProperty
FadeInAdornerCommand System.Windows.Input.RoutedCommand
FadeInTimeProperty System.Windows.DependencyProperty
FadeOutAdornerCommand System.Windows.Input.RoutedCommand
FadeOutTimeProperty System.Windows.DependencyProperty
HideAdornerCommand System.Windows.Input.RoutedCommand
HorizontalAdornerPlacementProperty System.Windows.DependencyProperty
IsAdornerVisibleProperty System.Windows.DependencyProperty
IsMouseOverShowEnabledProperty System.Windows.DependencyProperty
ShowAdornerCommand System.Windows.Input.RoutedCommand
VerticalAdornerPlacementProperty System.Windows.DependencyProperty

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

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

Fade the adorner in and make it visible.

FadeOutAdorner ( ) : void

Fade the adorner out and make it visible.

FindNamedChild ( FrameworkElement rootElement, string childName ) : FrameworkElement

Finds a child element in the visual tree that has the specified name. Returns null if no child with that name exists.

HideAdorner ( ) : void

Hide the adorner.

OnApplyTemplate ( ) : void

Called to build the visual tree.

ShowAdorner ( ) : void

Show the adorner.

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

Метод Описание
OnMouseEnter ( System.Windows.Input.MouseEventArgs e ) : void

Called when the mouse cursor enters the area of the adorned control.

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

Called when the mouse cursor leaves the area of the adorned control.

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

Метод Описание
AdornedControl ( ) : System

Static constructor to register command bindings.

AdornedControl_DataContextChanged ( object sender, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Event raised when the DataContext of the adorned control changes.

AdornerContent_PropertyChanged ( DependencyObject o, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Event raised when the value of AdornerContent has changed.

CloseAdornerTimeOut_PropertyChanged ( DependencyObject o, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Event raised when the CloseAdornerTimeOut property has change.

FadeInAdornerCommand_Executed ( object target, System.Windows.Input.ExecutedRoutedEventArgs e ) : void

Event raised when the FadeIn command is executed.

FadeOutAdornerCommand_Executed ( object target, System.Windows.Input.ExecutedRoutedEventArgs e ) : void

Event raised when the FadeOut command is executed.

HideAdornerCommand_Executed ( object target, System.Windows.Input.ExecutedRoutedEventArgs e ) : void

Event raised when the Hide command is executed.

HideAdornerInternal ( ) : void

Internal method to hide the adorner.

IsAdornerVisible_PropertyChanged ( DependencyObject o, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Event raised when the value of IsAdornerVisible has changed.

IsMouseOverShowEnabled_PropertyChanged ( DependencyObject o, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Event raised when the IsMouseOverShowEnabled property has changed.

MouseEnterLogic ( ) : void

Shared mouse enter code.

MouseLeaveLogic ( ) : void

Shared mouse leave code.

ShowAdornerCommand_Executed ( object target, System.Windows.Input.ExecutedRoutedEventArgs e ) : void

Event raised when the Show command is executed.

ShowAdornerInternal ( ) : void

Internal method to show the adorner.

ShowOrHideAdornerInternal ( ) : void

Internal method to show or hide the adorner based on the value of IsAdornerVisible.

UpdateAdornerDataContext ( ) : void

Update the DataContext of the adorner from the adorned control.

adornerContent_MouseEnter ( object sender, System.Windows.Input.MouseEventArgs e ) : void

Event raised when the mouse cursor enters the area of the adorner.

adornerContent_MouseLeave ( object sender, System.Windows.Input.MouseEventArgs e ) : void

Event raised when the mouse cursor leaves the area of the adorner.

closeAdornerTimer_Tick ( object sender, EventArgs e ) : void

Called when the close adorner time-out has ellapsed, the mouse has moved away from the adorned control and the adorner and it is time to close the adorner.

fadeInAnimation_Completed ( object sender, EventArgs e ) : void

Event raised when the fade in animation has completed.

fadeOutAnimation_Completed ( object sender, EventArgs e ) : void

Event raised when the fade-out animation has completed.

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

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

Fade the adorner in and make it visible.
public FadeInAdorner ( ) : void
Результат void

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

Fade the adorner out and make it visible.
public FadeOutAdorner ( ) : void
Результат void

FindNamedChild() публичный статический Метод

Finds a child element in the visual tree that has the specified name. Returns null if no child with that name exists.
public static FindNamedChild ( FrameworkElement rootElement, string childName ) : FrameworkElement
rootElement System.Windows.FrameworkElement
childName string
Результат System.Windows.FrameworkElement

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

Hide the adorner.
public HideAdorner ( ) : void
Результат void

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

Called to build the visual tree.
public OnApplyTemplate ( ) : void
Результат void

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

Called when the mouse cursor enters the area of the adorned control.
protected OnMouseEnter ( System.Windows.Input.MouseEventArgs e ) : void
e System.Windows.Input.MouseEventArgs
Результат void

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

Called when the mouse cursor leaves the area of the adorned control.
protected OnMouseLeave ( System.Windows.Input.MouseEventArgs e ) : void
e System.Windows.Input.MouseEventArgs
Результат void

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

Show the adorner.
public ShowAdorner ( ) : void
Результат void

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

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

public static DependencyProperty,System.Windows AdornedTemplatePartNameProperty
Результат System.Windows.DependencyProperty

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

public static DependencyProperty,System.Windows AdornerContentProperty
Результат System.Windows.DependencyProperty

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

public static DependencyProperty,System.Windows AdornerOffsetXProperty
Результат System.Windows.DependencyProperty

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

public static DependencyProperty,System.Windows AdornerOffsetYProperty
Результат System.Windows.DependencyProperty

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

public static DependencyProperty,System.Windows CloseAdornerTimeOutProperty
Результат System.Windows.DependencyProperty

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

public static RoutedCommand,System.Windows.Input FadeInAdornerCommand
Результат System.Windows.Input.RoutedCommand

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

public static DependencyProperty,System.Windows FadeInTimeProperty
Результат System.Windows.DependencyProperty

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

public static RoutedCommand,System.Windows.Input FadeOutAdornerCommand
Результат System.Windows.Input.RoutedCommand

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

public static DependencyProperty,System.Windows FadeOutTimeProperty
Результат System.Windows.DependencyProperty

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

public static RoutedCommand,System.Windows.Input HideAdornerCommand
Результат System.Windows.Input.RoutedCommand

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

public static DependencyProperty,System.Windows HorizontalAdornerPlacementProperty
Результат System.Windows.DependencyProperty

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

Dependency properties.
public static DependencyProperty,System.Windows IsAdornerVisibleProperty
Результат System.Windows.DependencyProperty

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

public static DependencyProperty,System.Windows IsMouseOverShowEnabledProperty
Результат System.Windows.DependencyProperty

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

Commands.
public static RoutedCommand,System.Windows.Input ShowAdornerCommand
Результат System.Windows.Input.RoutedCommand

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

public static DependencyProperty,System.Windows VerticalAdornerPlacementProperty
Результат System.Windows.DependencyProperty