C# Class Microsoft.Phone.Controls.ContextMenu

Inheritance: MenuBase
Afficher le fichier Open project: Kinnara/WPToolkit Class Usage Examples

Méthodes publiques

Свойство Type Description
IsFadeEnabledProperty System.Windows.DependencyProperty
IsOpenProperty System.Windows.DependencyProperty
IsZoomEnabledProperty System.Windows.DependencyProperty
RegionOfInterestProperty System.Windows.DependencyProperty
VerticalOffsetProperty System.Windows.DependencyProperty

Private Properties

Свойство Type Description
AdjustContextMenuPositionForPortraitMode double
ChildMenuItemClicked void
ClosePopup void
FocusNextItem void
InitializePage void
InitializeRootVisual void
OnApplicationBarMirrorChanged void
OnApplicationBarMirrorChanged void
OnContextMenuOrRootVisualSizeChanged void
OnEventThatClosesContextMenu void
OnIsOpenChanged void
OnIsOpenChanged void
OnLayoutUpdated void
OnOverlayMouseButtonUp void
OnOwnerHold void
OnOwnerUnloaded void
OnPageBackKeyPress void
OnRootVisualManipulationCompleted void
OnStoryboardCompleted void
OnVerticalOffsetChanged void
OpenPopup void
PositionIsOnScreenRight bool
SafeTransformToVisual System.Windows.Media.GeneralTransform
SetDefaultStyle void
SetRenderTransform void
UpdateContextMenuPlacement void
UpdateVisualStates void

Méthodes publiques

Méthode Description
ContextMenu ( ) : System

Initializes a new instance of the ContextMenu class.

OnApplyTemplate ( ) : void

Called when a new Template is applied.

Méthodes protégées

Méthode Description
OnClosed ( RoutedEventArgs e ) : void

Called when the Closed event occurs.

OnKeyDown ( System.Windows.Input.KeyEventArgs e ) : void

Responds to the KeyDown event.

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

Called when the left mouse button is pressed.

OnOpened ( RoutedEventArgs e ) : void

Called when the Opened event occurs.

Private Methods

Méthode Description
AdjustContextMenuPositionForPortraitMode ( Rect bounds, double roiY, double roiHeight, bool &reversed ) : double

Adjust the position (Y) of ContextMenu for Portrait Mode.

ChildMenuItemClicked ( ) : void

Called when a child MenuItem is clicked.

ClosePopup ( ) : void

Closes the Popup.

FocusNextItem ( bool down ) : void

Sets focus to the next item in the ContextMenu.

InitializePage ( ) : void

Attaches the ContxtMenu's BackKeyPress handler to properly enfore dismissal on back key press.

InitializeRootVisual ( ) : void

Initialize the _rootVisual property (if possible and not already done).

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

Handles changes to the ApplicationBarMirror DependencyProperty.

OnApplicationBarMirrorChanged ( IApplicationBar oldValue, IApplicationBar newValue ) : void

Handles changes to the ApplicationBarMirror property.

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

Handles the SizeChanged event for the ContextMenu or RootVisual.

OnEventThatClosesContextMenu ( object sender, EventArgs e ) : void

Handles an event which should close an open ContextMenu.

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

Handles changes to the IsOpen DependencyProperty.

OnIsOpenChanged ( bool newValue ) : void

Handles changes to the IsOpen property.

OnLayoutUpdated ( object sender, EventArgs e ) : void

Handles the LayoutUpdated event to capture Application.Current.RootVisual.

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

Handles the MouseButtonUp events for the overlay.

OnOwnerHold ( object sender, System e ) : void

Handles the Hold event for the owning element.

OnOwnerUnloaded ( object sender, RoutedEventArgs e ) : void

Handles the Unloaded event of the Owner.

OnPageBackKeyPress ( object sender, CancelEventArgs e ) : void

Handles the BackKeyPress of the containing PhoneApplicationPage.

OnRootVisualManipulationCompleted ( object sender, System.Windows.Input.ManipulationCompletedEventArgs e ) : void

Handles the ManipulationCompleted event for the RootVisual.

OnStoryboardCompleted ( object sender, EventArgs e ) : void

Handles the Completed event of the opening Storyboard.

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

Handles changes to the VerticalOffset DependencyProperty.

OpenPopup ( Point position ) : void
PositionIsOnScreenRight ( double position ) : bool

Whether the position is on the right half of the screen. Only supports landscape mode. This is used to determine which side of the screen the context menu will display on.

SafeTransformToVisual ( UIElement element, UIElement visual ) : System.Windows.Media.GeneralTransform

Calls TransformToVisual on the specified element for the specified visual, suppressing the ArgumentException that can occur in some cases.

SetDefaultStyle ( ) : void

Set up the background and border default styles

SetRenderTransform ( ) : void
UpdateContextMenuPlacement ( ) : void

Updates the location and size of the Popup and overlay.

UpdateVisualStates ( bool useTransitions ) : void

Uses VisualStateManager to go to the appropriate visual state.

Method Details

ContextMenu() public méthode

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

OnApplyTemplate() public méthode

Called when a new Template is applied.
public OnApplyTemplate ( ) : void
Résultat void

OnClosed() protected méthode

Called when the Closed event occurs.
protected OnClosed ( RoutedEventArgs e ) : void
e System.Windows.RoutedEventArgs Event arguments.
Résultat void

OnKeyDown() protected méthode

Responds to the KeyDown event.
protected OnKeyDown ( System.Windows.Input.KeyEventArgs e ) : void
e System.Windows.Input.KeyEventArgs The event data for the KeyDown event.
Résultat void

OnMouseLeftButtonDown() protected méthode

Called when the left mouse button is pressed.
protected OnMouseLeftButtonDown ( System.Windows.Input.MouseButtonEventArgs e ) : void
e System.Windows.Input.MouseButtonEventArgs The event data for the MouseLeftButtonDown event.
Résultat void

OnOpened() protected méthode

Called when the Opened event occurs.
protected OnOpened ( RoutedEventArgs e ) : void
e System.Windows.RoutedEventArgs Event arguments.
Résultat void

Property Details

IsFadeEnabledProperty public_oe static_oe property

Identifies the IsFadeEnabled dependency property.
public static DependencyProperty,System.Windows IsFadeEnabledProperty
Résultat System.Windows.DependencyProperty

IsOpenProperty public_oe static_oe property

Identifies the IsOpen dependency property.
public static DependencyProperty,System.Windows IsOpenProperty
Résultat System.Windows.DependencyProperty

IsZoomEnabledProperty public_oe static_oe property

Identifies the IsZoomEnabled dependency property.
public static DependencyProperty,System.Windows IsZoomEnabledProperty
Résultat System.Windows.DependencyProperty

RegionOfInterestProperty public_oe static_oe property

Identifies the RegionOfInterest dependency property.
public static DependencyProperty,System.Windows RegionOfInterestProperty
Résultat System.Windows.DependencyProperty

VerticalOffsetProperty public_oe static_oe property

Identifies the VerticalOffset dependency property.
public static DependencyProperty,System.Windows VerticalOffsetProperty
Résultat System.Windows.DependencyProperty