Class
RadialMenuTriggerBehavior

Behavior class that is used to control the triggers caused by the target element will attach and display the menu.

Definition

Namespace:Telerik.UI.Xaml.Controls.Navigation

Assembly:Telerik.WinUI.Controls.dll

Syntax:

cs-api-definition
public class RadialMenuTriggerBehavior : AttachableObject<FrameworkElement>

Inheritance: objectRadDependencyObjectAttachableObject<FrameworkElement>RadialMenuTriggerBehavior

Inherited Members AttachableObject<FrameworkElement>.Owner

Constructors

RadialMenuTriggerBehavior()

Declaration

cs-api-definition
public RadialMenuTriggerBehavior()

Properties

AttachTriggers

Gets or sets the attach triggers that will attach and display the menu.

Declaration

cs-api-definition
public RadialMenuAttachTriggers AttachTriggers { get; set; }

Property Value

RadialMenuAttachTriggers

Example

xaml
<TextBlock Text="Some Text">
    <telerikPrimitives:RadRadialContextMenu.Behavior>
        <telerikPrimitives:RadialMenuTriggerBehavior AttachTriggers="PointerOver"/>
    </telerikPrimitives:RadRadialContextMenu.Behavior>
    <telerikPrimitives:RadRadialContextMenu.Menu>
        <telerikPrimitives:RadRadialMenu/>
    </telerikPrimitives:RadRadialContextMenu.Menu>
</TextBlock>

Methods

AttachToTargetElement()

It is used to position the RadRadialMenu and initiate menu position logic.

Declaration

cs-api-definition
protected virtual void AttachToTargetElement()

DetachFromTargetElement()

It is used to clear the RadRadialMenu from the visual scene and detach it from the target element.

Declaration

cs-api-definition
protected virtual void DetachFromTargetElement()

GetMenuPosition(RadRadialMenu)

Gets the desired menu position in global coordinates.

Declaration

cs-api-definition
protected virtual Point GetMenuPosition(RadRadialMenu menu)

Parameters

menu

RadRadialMenu

The context menu.

Returns

Point

OnAttached()

Performs the core logic behind the Attach routine. Allows inheritors to provide additional implementation.

Declaration

cs-api-definition
protected override void OnAttached()

Overrides AttachableObject<FrameworkElement>.OnAttached()

OnDetached(FrameworkElement)

It is used to detach the previous RadRadialMenu owner control.

Declaration

cs-api-definition
protected override void OnDetached(FrameworkElement previousOwner)

Parameters

previousOwner

FrameworkElement

Overrides AttachableObject<FrameworkElement>.OnDetached(FrameworkElement)

SubscribeToTargetEvents(FrameworkElement)

Called when RadRadialMenu get its target element. It is used to subscribe the desired event action that will open the RadRadialMenu control.

Declaration

cs-api-definition
protected virtual void SubscribeToTargetEvents(FrameworkElement element)

Parameters

element

FrameworkElement

UnsubscribeFromTargetEvents(FrameworkElement)

Called when RadRadialMenu get its target element. It is used to unsubscribe the event actions that open the RadRadialMenu control.

Declaration

cs-api-definition
protected virtual void UnsubscribeFromTargetEvents(FrameworkElement element)

Parameters

element

FrameworkElement