Class RadRadialMenu
Represents a control that enables a user to visualize a set of RadRadialMenuItem.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Navigation.dll
Syntax
[TelerikToolboxCategory("Navigation")]
public class RadRadialMenu : Control, INotifyPropertyChanged, IThemable
Constructors
RadRadialMenu()
Fields
AutoCalculateStartAngleProperty
Identifies the AutoCalculateStartAngle dependency property.
Declaration
public static readonly DependencyProperty AutoCalculateStartAngleProperty
Field Value
System.Windows.DependencyProperty
|
AutoSizeMenuItemsProperty
Identifies the AutoSizeMenuItems dependency property.
Declaration
public static readonly DependencyProperty AutoSizeMenuItemsProperty
Field Value
System.Windows.DependencyProperty
|
ClosedEvent
Identifies the Closed routed event.
Declaration
public static readonly RoutedEvent ClosedEvent
Field Value
System.Windows.RoutedEvent
|
ContentMenuBackgroundStyleProperty
Identifies the ContentMenuBackgroundStyle dependency property.
Declaration
public static readonly DependencyProperty ContentMenuBackgroundStyleProperty
Field Value
System.Windows.DependencyProperty
|
HideEventNameProperty
Identifies the HideEventName dependency property.
Declaration
public static readonly DependencyProperty HideEventNameProperty
Field Value
System.Windows.DependencyProperty
|
InnerNavigationRadiusFactorProperty
InnerRadiusFactorProperty
Identifies the InnerRadiusFactor dependency property.
Declaration
public static readonly DependencyProperty InnerRadiusFactorProperty
Field Value
System.Windows.DependencyProperty
|
IsOpenProperty
Identifies the IsOpen dependency property.
Declaration
public static readonly DependencyProperty IsOpenProperty
Field Value
System.Windows.DependencyProperty
|
ItemsSourceProperty
Identifies the ItemsSource dependency property.
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
System.Windows.DependencyProperty
|
NavigatedEvent
NavigationMenuBackgroundStyleProperty
OpenedEvent
Identifies the Opened routed event.
Declaration
public static readonly RoutedEvent OpenedEvent
Field Value
System.Windows.RoutedEvent
|
OpeningEvent
Identifies the Opening routed event.
Declaration
public static readonly RoutedEvent OpeningEvent
Field Value
System.Windows.RoutedEvent
|
OuterBorderPaddingProperty
Identifies the PlacementMode dependency property.
Declaration
public static readonly DependencyProperty OuterBorderPaddingProperty
Field Value
System.Windows.DependencyProperty
|
OuterRadiusFactorProperty
Identifies the OuterRadiusFactor dependency property.
Declaration
public static readonly DependencyProperty OuterRadiusFactorProperty
Field Value
System.Windows.DependencyProperty
|
PopupHorizontalOffsetProperty
Identifies the PlacementMode dependency property.
Declaration
public static readonly DependencyProperty PopupHorizontalOffsetProperty
Field Value
System.Windows.DependencyProperty
|
PopupPlacementProperty
Identifies the PlacementMode dependency property.
Declaration
public static readonly DependencyProperty PopupPlacementProperty
Field Value
System.Windows.DependencyProperty
|
PopupVerticalOffsetProperty
Identifies the PlacementMode dependency property.
Declaration
public static readonly DependencyProperty PopupVerticalOffsetProperty
Field Value
System.Windows.DependencyProperty
|
PreviewToolTipOpenEvent
Identifies the PreviewToolTipOpen routed event.
Declaration
public static readonly RoutedEvent PreviewToolTipOpenEvent
Field Value
System.Windows.RoutedEvent
|
RadialContextMenuProperty
Identifies the RadRadialMenu attached property.
Declaration
public static readonly DependencyProperty RadialContextMenuProperty
Field Value
System.Windows.DependencyProperty
|
ShowEventNameProperty
Identifies the ShowEventName dependency property.
Declaration
public static readonly DependencyProperty ShowEventNameProperty
Field Value
System.Windows.DependencyProperty
|
ShowToolTipProperty
Identifies the ShowToolTip dependency property.
Declaration
public static readonly DependencyProperty ShowToolTipProperty
Field Value
System.Windows.DependencyProperty
|
StartAngleProperty
Identifies the StartAngle dependency property.
Declaration
public static readonly DependencyProperty StartAngleProperty
Field Value
System.Windows.DependencyProperty
|
StaysOpenOnShowProperty
Identifies the StaysOpenOnShow dependency property.
Declaration
public static readonly DependencyProperty StaysOpenOnShowProperty
Field Value
System.Windows.DependencyProperty
|
Properties
AnimationSpeedFactor
Gets or sets the speed factor for the animations in RadRadialMenu. The default value is 1.5d. The value is always a positive number. The min value is 0.1d.
Declaration
public static double AnimationSpeedFactor { get; set; }
Property Value
System.Double
|
AutoCalculateStartAngle
Gets or sets a value that indicates whether the start angle of the first menu item should be calculated automatically. If set to false the StartAngle property will be used to determine the starting position of the first menu item. This property only works when AutoSizeMenuItems is set to true.
Declaration
public bool AutoCalculateStartAngle { get; set; }
Property Value
System.Boolean
|
AutoSizeMenuItems
Gets or sets whether the menu items would be auto sized to fill the whole circle of the menu. Setting this property to true allows you to add more than 8 menu items.
Declaration
public bool AutoSizeMenuItems { get; set; }
Property Value
System.Boolean
|
Commands
Gets the collection with all the custom commands registered with the CommandService.
Declaration
public CommandCollection<RadRadialMenu> Commands { get; }
Property Value
CommandCollection<RadRadialMenu>
|
Remarks
Custom commands have higher priority than the built-in (default) ones.
CommandService
Gets the CommandService instance that manages the commanding behavior of this instance.
Declaration
public CommandService CommandService { get; }
Property Value
CommandService
|
ContentMenuBackgroundStyle
Gets or sets the System.Windows.Style value that defines the appearance of the menu items panel.
Declaration
public Style ContentMenuBackgroundStyle { get; set; }
Property Value
System.Windows.Style
|
Remarks
The System.Windows.Style should target the System.Windows.Shapes.Rectangle type.
Examples
<telerikPrimitives:RadRadialMenu>
<telerikPrimitives:RadRadialMenu.ContentMenuBackgroundStyle>
<Style TargetType="Rectangle">
<Setter Property="Fill" Value="LightGreen"/>
</Style>
</telerikPrimitives:RadRadialMenu.ContentMenuBackgroundStyle>
</telerikPrimitives:RadRadialMenu>
EnableQuickMode
Sets or gets whether the RadRadialMenu is in quick mode. If true, the animation is disabled and the control doesn't close when hiding.
Declaration
public static bool EnableQuickMode { get; set; }
Property Value
System.Boolean
|
HideEventName
Gets or sets the name of the event that will hide the context menu.
Declaration
public string HideEventName { get; set; }
Property Value
System.String
The name of the event. |
InnerNavigationRadiusFactor
InnerRadiusFactor
Gets or sets the factor that defines the inner radius of the panel holding the RadRadialMenuItem items as a fraction of the size of the RadRadialMenu control.
Declaration
public double InnerRadiusFactor { get; set; }
Property Value
System.Double
The value should be between 0 and 1. If the passed value lies outside this range, it is automatically set to the nearest boundary value. |
Examples
<telerikPrimitives:RadRadialMenu InnerRadiusFactor="0.3"/>
IsOpen
Gets or sets a value that indicates whether the RadRadialMenu is open.
Declaration
public bool IsOpen { get; set; }
Property Value
System.Boolean
|
Examples
<telerikPrimitives:RadRadialMenu IsOpen="True"/>
IsTemplateApplied
Determines whether the OnApplyTemplate() method and the ApplyTemplateCore() routine is passed.
Declaration
protected bool IsTemplateApplied { get; }
Property Value
System.Boolean
|
ItemContainerGenerator
Gets the RadialMenuItemContainerGenerator of the RadRadialMenu
Declaration
public RadialMenuItemContainerGenerator ItemContainerGenerator { get; }
Property Value
RadialMenuItemContainerGenerator
|
Items
Gets the collection of all RadRadialMenuItem.
Declaration
public ObservableCollection<RadRadialMenuItem> Items { get; }
Property Value
System.Collections.ObjectModel.ObservableCollection<RadRadialMenuItem>
|
Examples
<telerikPrimitives:RadRadialMenu x:Name="radialMenu">
<telerikPrimitives:RadialMenuItem Header="Item 1"/>
<telerikPrimitives:RadialMenuItem Header="Item 2"/>
<telerikPrimitives:RadialMenuItem Header="Item 3"/>
</telerikPrimitives:RadRadialMenu>
var items = this.radialMenu.Items;
ItemsSource
Gets or sets a collection used to generate the content of the RadRadialMenu.
Declaration
public IEnumerable<IRadialMenuItem> ItemsSource { get; set; }
Property Value
System.Collections.Generic.IEnumerable<IRadialMenuItem>
|
NavigationMenuBackgroundStyle
OuterBorderPadding
Gets or sets the distance between the outer ring of the RadRadialMenu and its RadRadialMenuItem.
Declaration
public double OuterBorderPadding { get; set; }
Property Value
System.Double
|
OuterRadiusFactor
Gets or sets the factor that defines the outer radius of the panel holding the NavigationItemButton items as a fraction of the size of the RadRadialMenu control.
Declaration
public double OuterRadiusFactor { get; set; }
Property Value
System.Double
The value should be between 0 and 1. If the passed value lies outside this range, it is automatically set to the nearest boundary value. |
Examples
<telerikPrimitives:RadRadialMenu OuterRadiusFactor="0.9"/>
PopupHorizontalOffset
Gets or sets a PopupHorizontalOffset that determines the horizontal offset of the menu's Popup. This is a dependency property. Only used when PopupPlacement i set to Absolute and AbsolutePoint.
Declaration
public double PopupHorizontalOffset { get; set; }
Property Value
System.Double
|
PopupPlacement
Gets or sets a PopupPlacement that determines where the menu would be position. This is a dependency property.
Declaration
public PlacementMode PopupPlacement { get; set; }
Property Value
System.Windows.Controls.Primitives.PlacementMode
|
PopupVerticalOffset
Gets or sets a PopupVerticalOffset that determines the horizontal offset of the menu's Popup. This is a dependency property. Only used when PopupPlacement i set to Absolute and AbsolutePoint.
Declaration
public double PopupVerticalOffset { get; set; }
Property Value
System.Double
|
ShowEventName
Gets or sets the name of the event that will show the context menu.
Declaration
public string ShowEventName { get; set; }
Property Value
System.String
The name of the event. |
ShowToolTip
Gets or sets a value that indicates whether a tool tip, displaying the current selected RadRadialMenuItem header text, will be displayed.
Declaration
public bool ShowToolTip { get; set; }
Property Value
System.Boolean
|
Examples
<telerikPrimitives:RadRadialMenu ShowToolTip="True"/>
StartAngle
Gets or sets the start angle for ordering the RadRadialMenuItem components.
Declaration
public double StartAngle { get; set; }
Property Value
System.Double
The angle is measured in radians. |
Examples
<telerikPrimitives:RadRadialMenu StartAngle="45"/>
StaysOpenOnShow
Gets or sets whether the RadRadialMenu will be automatically opened when shown as context menu.
Declaration
public bool StaysOpenOnShow { get; set; }
Property Value
System.Boolean
|
TargetElement
Gets the target System.Windows.FrameworkElement instance that RadRadialMenu is assigned to.
Declaration
public FrameworkElement TargetElement { get; }
Property Value
System.Windows.FrameworkElement
|
Remarks
Before the menu is attached to the element this property has null
value.
Examples
<TextBlock Text="Some Text">
<telerikPrimitives:RadRadialContextMenu.Menu>
<telerikPrimitives:RadRadialMenu x:Name="radialMenu"/>
</telerikPrimitives:RadRadialContextMenu.Menu>
</TextBlock>
After you perform the action that will attach the menu to the target element, you can use the TargetElement property:
var textBlock = this.radialMenu.TargetElement;
Methods
add_Closed(RadRoutedEventHandler)
Declaration
public void add_Closed(RadRoutedEventHandler value)
Parameters
RadRoutedEventHandler
value
|
add_Navigated(RadRoutedEventHandler)
add_Opened(RadRoutedEventHandler)
Declaration
public void add_Opened(RadRoutedEventHandler value)
Parameters
RadRoutedEventHandler
value
|
add_Opening(RadRoutedEventHandler)
Declaration
public void add_Opening(RadRoutedEventHandler value)
Parameters
RadRoutedEventHandler
value
|
add_PreviewToolTipOpen(RadRadialMenu.MenuToolTipEventHandler)
Declaration
public void add_PreviewToolTipOpen(RadRadialMenu.MenuToolTipEventHandler value)
Parameters
RadRadialMenu.MenuToolTipEventHandler
value
|
ApplyTemplateCore()
Called when the Framework OnApplyTemplate is called. Inheritors should override this method should they have some custom template-related logic. This is done to ensure that the IsTemplateApplied property is properly initialized.
Declaration
protected bool ApplyTemplateCore()
Returns
System.Boolean
|
CanUpdateVisualState()
Determines whether the current visual state may be updated.
Declaration
protected virtual bool CanUpdateVisualState()
Returns
System.Boolean
|
ComposeVisualStateName()
Builds the current visual state for this instance.
Declaration
protected virtual string ComposeVisualStateName()
Returns
System.String
|
GetRadialContextMenu(DependencyObject)
Returns the instance of current RadRadialMenu that is attached to specific System.Windows.FrameworkElement.
Declaration
public static RadRadialMenu GetRadialContextMenu(DependencyObject obj)
Parameters
System.Windows.DependencyObject
obj
The target System.Windows.FrameworkElement. |
Returns
RadRadialMenu
The attached RadRadialMenu control. |
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate.
Declaration
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Creates a RadRadialMenuAutomationPeer.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer
|
OnInitialized(EventArgs)
Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs
e
The System.Windows.RoutedEventArgs that contains the event data. |
OnMouseLeave(MouseEventArgs)
Called before the System.Windows.UIElement.MouseLeave event occurs.
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
System.Windows.Input.MouseEventArgs
e
The data for the event. |
OnMouseLeftButtonUp(MouseButtonEventArgs)
Called before the System.Windows.UIElement.MouseLeftButtonUp event occurs.
Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
System.Windows.Input.MouseButtonEventArgs
e
The data for the event. |
OnMouseMove(MouseEventArgs)
Called before the System.Windows.UIElement.MouseMove event occurs.
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
System.Windows.Input.MouseEventArgs
e
The data for the event. |
OnNavigating(RadialMenuNavigatingEventArgs)
OnPreviewToolTipOpen(RadRadialMenuItem, PlacementMode, Double, Double, Double)
Creates the MenuToolTipEventArgs and raises the PreviewToolTipOpen routed event.
Declaration
protected virtual MenuToolTipEventArgs OnPreviewToolTipOpen(RadRadialMenuItem menuItem, PlacementMode placement, double horizontalOffset, double verticalOffset, double outerRadius)
Parameters
RadRadialMenuItem
menuItem
|
System.Windows.Controls.Primitives.PlacementMode
placement
|
System.Double
horizontalOffset
|
System.Double
verticalOffset
|
System.Double
outerRadius
|
Returns
MenuToolTipEventArgs
|
OnPropertyChanged(String)
Called when a value of a property is changed.
Declaration
protected void OnPropertyChanged(string name)
Parameters
System.String
name
The name of the property that changes. |
OnSelectionChanged(RadRadialMenuItem)
Called when selection is changed.
Declaration
protected virtual void OnSelectionChanged(RadRadialMenuItem item)
Parameters
RadRadialMenuItem
item
The changed menu item. |
OnTemplateApplied()
Occurs when the OnApplyTemplate method has been called and the template is already successfully applied.
Declaration
protected void OnTemplateApplied()
remove_Closed(RadRoutedEventHandler)
Declaration
public void remove_Closed(RadRoutedEventHandler value)
Parameters
RadRoutedEventHandler
value
|
remove_Navigated(RadRoutedEventHandler)
remove_Opened(RadRoutedEventHandler)
Declaration
public void remove_Opened(RadRoutedEventHandler value)
Parameters
RadRoutedEventHandler
value
|
remove_Opening(RadRoutedEventHandler)
Declaration
public void remove_Opening(RadRoutedEventHandler value)
Parameters
RadRoutedEventHandler
value
|
remove_PreviewToolTipOpen(RadRadialMenu.MenuToolTipEventHandler)
Declaration
public void remove_PreviewToolTipOpen(RadRadialMenu.MenuToolTipEventHandler value)
Parameters
RadRadialMenu.MenuToolTipEventHandler
value
|
ResetTheme()
Resets the theme.
Declaration
public void ResetTheme()
SetRadialContextMenu(DependencyObject, RadRadialMenu)
Attaches an instance of RadRadialMenu to a specific System.Windows.FrameworkElement.
Declaration
public static void SetRadialContextMenu(DependencyObject obj, RadRadialMenu value)
Parameters
System.Windows.DependencyObject
obj
The target System.Windows.FrameworkElement. |
RadRadialMenu
value
The RadRadialMenu instance to be attached to the target element. |
SetVisualState(String, Boolean)
Applies the specified visual state as current.
Declaration
protected virtual void SetVisualState(string state, bool animate)
Parameters
System.String
state
The new visual state. |
System.Boolean
animate
True to use transitions, false otherwise. |
UpdateVisualState(Boolean)
Re-evaluates the current visual state for the control and updates it if necessary.
Declaration
protected virtual void UpdateVisualState(bool animate)
Parameters
System.Boolean
animate
True to use transitions during state update, false otherwise. |
Events
Closed
Occurs when a RadRadialMenu is closed.
Declaration
[SRCategory("Behavior")]
public event RadRoutedEventHandler Closed
Event Type
RadRoutedEventHandler
|
Navigated
Navigating
Opened
Occurs when a RadRadialMenu is opened.
Declaration
[SRCategory("Behavior")]
public event RadRoutedEventHandler Opened
Event Type
RadRoutedEventHandler
|
Opening
Occurs before particular instance of RadRadialMenu opens. If it is handled then RadRadialMenu will not open.
Declaration
[SRCategory("Behavior")]
public event RadRoutedEventHandler Opening
Event Type
RadRoutedEventHandler
|
PreviewToolTipOpen
Occurs before MenuToolTip is shown.
Declaration
public event RadRadialMenu.MenuToolTipEventHandler PreviewToolTipOpen
Event Type
RadRadialMenu.MenuToolTipEventHandler
|
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.ComponentModel.PropertyChangedEventHandler
|
SelectionChanged
Occurs when menu item is selected/deselected.
Declaration
public event EventHandler<MenuSelectionChangedEventArgs> SelectionChanged
Event Type
System.EventHandler<MenuSelectionChangedEventArgs>
|