Class
VisualStatesItemPresenter

Represents the custom Control implementation used to visualize the hover and selected state over RadRadialMenuItem.

Definition

Namespace:Telerik.Windows.Controls.RadialMenu

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

cs-api-definition
public class VisualStatesItemPresenter : Control

Inheritance: objectVisualStatesItemPresenter

Constructors

VisualStatesItemPresenter()

Initializes a new instance of the VisualStatesItemPresenter class.

Declaration

cs-api-definition
public VisualStatesItemPresenter()

Fields

ArrowThicknessFactorProperty

Identifies the ArrowThicknessFactor dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ArrowThicknessFactorProperty

Field Value

DependencyProperty

ThicknessFactorProperty

Identifies the ThicknessFactor dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ThicknessFactorProperty

Field Value

DependencyProperty

Properties

ArrowThicknessFactor

Gets or sets the factor defining the thickness of the arrow part of the VisualStatesItemPresenter as a fraction of the size of the NavigationItemButton.

Declaration

cs-api-definition
public double ArrowThicknessFactor { get; set; }

Property Value

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.

Example

This example demonstrates how to style the VisualStatesItemPresenter of a RadRadialMenu using an implicit style.

You will need to add the following namespace: xmlns:telerikPrimitivesMenu="using:Telerik.UI.Xaml.Controls.Primitives.Menu"

xaml
<telerikPrimitives:RadRadialMenu.Resources>
    <Style TargetType="telerikPrimitivesMenu:VisualStatesItemPresenter">
        <Setter Property="ArrowThicknessFactor" Value="0.3"/>
    </Style>
</telerikPrimitives:RadRadialMenu.Resources>

IsTemplateApplied

Determines whether the OnApplyTemplate() method and the ApplyTemplateCore() routine is passed.

Declaration

cs-api-definition
protected bool IsTemplateApplied { get; }

Property Value

bool

ThicknessFactor

Gets or sets the factor defining the thickness of the VisualStatesItemPresenter as a fraction of the size of the NavigationItemButton.

Declaration

cs-api-definition
public double ThicknessFactor { get; set; }

Property Value

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.

Example

This example demonstrates how to style the VisualStatesItemPresenter of a RadRadialMenu using an implicit style.

You will need to add the following namespace: xmlns:telerikPrimitivesMenu="using:Telerik.UI.Xaml.Controls.Primitives.Menu"

xaml
<telerikPrimitives:RadRadialMenu.Resources>
    <Style TargetType="telerikPrimitivesMenu:VisualStatesItemPresenter">
        <Setter Property="ThicknessFactor" Value="0.3"/>
    </Style>
</telerikPrimitives:RadRadialMenu.Resources>

Methods

ApplyTemplateCore()

Called when the Framework is called. Inheritors should override this method should they have some custom template-related logic. This is done to ensure that the property is properly initialized.

Declaration

cs-api-definition
protected bool ApplyTemplateCore()

Returns

bool

CanUpdateVisualState()

Determines whether the current visual state may be updated.

Declaration

cs-api-definition
protected virtual bool CanUpdateVisualState()

Returns

bool

ComposeVisualStateName()

Builds the current visual state for this instance.

Declaration

cs-api-definition
protected string ComposeVisualStateName()

Returns

string

ComposeVisualStateNameBase()

Builds the current visual state for this instance.

Declaration

cs-api-definition
protected string ComposeVisualStateNameBase()

Returns

string

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnInitialized(EventArgs)

Raises the event. This method is invoked whenever is set to true internally.

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

OnTemplateApplied()

Occurs when the method has been called and the template is already successfully applied.

Declaration

cs-api-definition
protected void OnTemplateApplied()

ResetTheme()

Resets the theme.

Declaration

cs-api-definition
public void ResetTheme()

SetVisualState(string, bool)

Applies the specified visual state as current.

Declaration

cs-api-definition
protected virtual void SetVisualState(string state, bool animate)

Parameters

state

string

The new visual state.

animate

bool

True to use transitions, false otherwise.

UpdateVisualState(bool)

Re-evaluates the current visual state for the control and updates it if necessary.

Declaration

cs-api-definition
protected virtual void UpdateVisualState(bool animate)

Parameters

animate

bool

True to use transitions during state update, false otherwise.