C# Class Yuhan.WPF.Controls.AdornedControl

A content control that allows an adorner for the content to be defined in XAML.
Inheritance: System.Windows.Controls.ContentControl
Afficher le fichier Open project: hansuky/Yuhan Class Usage Examples

Méthodes publiques

Свойство Type Description
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

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

FadeInAdorner() public méthode

Fade the adorner in and make it visible.
public FadeInAdorner ( ) : void
Résultat void

FadeOutAdorner() public méthode

Fade the adorner out and make it visible.
public FadeOutAdorner ( ) : void
Résultat void

FindNamedChild() public static méthode

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
Résultat System.Windows.FrameworkElement

HideAdorner() public méthode

Hide the adorner.
public HideAdorner ( ) : void
Résultat void

OnApplyTemplate() public méthode

Called to build the visual tree.
public OnApplyTemplate ( ) : void
Résultat void

OnMouseEnter() protected méthode

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
Résultat void

OnMouseLeave() protected méthode

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
Résultat void

ShowAdorner() public méthode

Show the adorner.
public ShowAdorner ( ) : void
Résultat void

Property Details

AdornedTemplatePartNameProperty public_oe static_oe property

public static DependencyProperty,System.Windows AdornedTemplatePartNameProperty
Résultat System.Windows.DependencyProperty

AdornerContentProperty public_oe static_oe property

public static DependencyProperty,System.Windows AdornerContentProperty
Résultat System.Windows.DependencyProperty

AdornerOffsetXProperty public_oe static_oe property

public static DependencyProperty,System.Windows AdornerOffsetXProperty
Résultat System.Windows.DependencyProperty

AdornerOffsetYProperty public_oe static_oe property

public static DependencyProperty,System.Windows AdornerOffsetYProperty
Résultat System.Windows.DependencyProperty

CloseAdornerTimeOutProperty public_oe static_oe property

public static DependencyProperty,System.Windows CloseAdornerTimeOutProperty
Résultat System.Windows.DependencyProperty

FadeInAdornerCommand public_oe static_oe property

public static RoutedCommand,System.Windows.Input FadeInAdornerCommand
Résultat System.Windows.Input.RoutedCommand

FadeInTimeProperty public_oe static_oe property

public static DependencyProperty,System.Windows FadeInTimeProperty
Résultat System.Windows.DependencyProperty

FadeOutAdornerCommand public_oe static_oe property

public static RoutedCommand,System.Windows.Input FadeOutAdornerCommand
Résultat System.Windows.Input.RoutedCommand

FadeOutTimeProperty public_oe static_oe property

public static DependencyProperty,System.Windows FadeOutTimeProperty
Résultat System.Windows.DependencyProperty

HideAdornerCommand public_oe static_oe property

public static RoutedCommand,System.Windows.Input HideAdornerCommand
Résultat System.Windows.Input.RoutedCommand

HorizontalAdornerPlacementProperty public_oe static_oe property

public static DependencyProperty,System.Windows HorizontalAdornerPlacementProperty
Résultat System.Windows.DependencyProperty

IsAdornerVisibleProperty public_oe static_oe property

Dependency properties.
public static DependencyProperty,System.Windows IsAdornerVisibleProperty
Résultat System.Windows.DependencyProperty

IsMouseOverShowEnabledProperty public_oe static_oe property

public static DependencyProperty,System.Windows IsMouseOverShowEnabledProperty
Résultat System.Windows.DependencyProperty

ShowAdornerCommand public_oe static_oe property

Commands.
public static RoutedCommand,System.Windows.Input ShowAdornerCommand
Résultat System.Windows.Input.RoutedCommand

VerticalAdornerPlacementProperty public_oe static_oe property

public static DependencyProperty,System.Windows VerticalAdornerPlacementProperty
Résultat System.Windows.DependencyProperty