skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class ItemStateManagerBase

Provides a base implementation for managing visual states of RadControl items. Handles state transitions, validation, and fallback mechanisms for theming.

Inheritance
System.Object
ItemStateManagerBase
ItemStateManager
RadCheckmarkStateManager
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls.Styles
Assembly: Telerik.WinControls.dll

Syntax

public abstract class ItemStateManagerBase

Constructors

ItemStateManagerBase()

Initializes a new instance of the ItemStateManagerBase class.

Declaration
public ItemStateManagerBase()

Fields

stateDelimiter

The delimiter character used to separate state names.

Declaration
public const char stateDelimiter = '.'
Field Value
System.Char

Properties

DefaultVisibleStates

Gets the collection of default visible states for this state manager.

Declaration
public IEnumerable<string> DefaultVisibleStates { get; }
Property Value
System.Collections.Generic.IEnumerable<System.String>

An enumerable collection of default visible state names.

Methods

AddDefaultVisibleState(String)

Adds a state to the default visible states collection.

Declaration
public void AddDefaultVisibleState(string state)
Parameters
System.String state

The state name to add.

Exceptions
System.InvalidOperationException

Thrown if the state is not recognized by the state manager.

AttachToItem(RadObject)

Attaches this state manager to the specified item, enabling state management.

Declaration
public virtual StateManagerAttachmentData AttachToItem(RadObject item)
Parameters
RadObject item

The RadObject item to attach to.

Returns
StateManagerAttachmentData

Attachment data for the state manager connection.

AttachToItemOverride(StateManagerAttachmentData, RadObject)

Provides derived classes with the opportunity to perform custom attachment logic.

Declaration
protected abstract void AttachToItemOverride(StateManagerAttachmentData attachData, RadObject item)
Parameters
StateManagerAttachmentData attachData

The attachment data for the state manager connection.

RadObject item

The RadObject item being attached to.

CombineStateNames(String, String)

Combines state names, using stateDelimiter Character.

Declaration
public static string CombineStateNames(string stateName, string stateName1)
Parameters
System.String stateName

The first state name.

System.String stateName1

The second state name to combine.

Returns
System.String

The combined state name using the delimiter.

Remarks

E.g. combining "Selected" and "MouseOver" gives "Selected.MouseOver"; combining "" and "MouseOver" gives "MouseOver"

Detach(StateManagerAttachmentData)

Detaches the state manager from an item, cleaning up resources.

Declaration
public virtual void Detach(StateManagerAttachmentData data)
Parameters
StateManagerAttachmentData data

The attachment data to detach.

GetAvailableStates(String)

Gets the available states for the specified theme role. Must be implemented by derived classes.

Declaration
public abstract StateDescriptionNode GetAvailableStates(string themeRoleName)
Parameters
System.String themeRoleName

The theme role name to get states for.

Returns
StateDescriptionNode

The root state description node containing all available states.

GetInitialState(RadObject)

Gets the initial state for the specified RadObject item. Uses the ThemeRole if the item is stylable, otherwise uses the type name.

Declaration
public virtual string GetInitialState(RadObject item)
Parameters
RadObject item

The item to get the initial state for.

Returns
System.String

The initial state string for the item.

GetStateFallbackList(RadItem)

Gets a fallback list of states for the specified item, providing progressively less specific states.

Declaration
public IEnumerable<string> GetStateFallbackList(RadItem item)
Parameters
RadItem item

The RadItem to get state fallbacks for.

Returns
System.Collections.Generic.IEnumerable<System.String>

An enumerable collection of fallback state names.

GetStateFullName(String, String)

Gets the full state name by combining the item theme role with the state name.

Declaration
public string GetStateFullName(string itemThemeRole, string stateName)
Parameters
System.String itemThemeRole

The theme role of the item.

System.String stateName

The state name to combine.

Returns
System.String

The full state name combining theme role and state.

ItemStateChanged(RadObject, RadPropertyChangedEventArgs)

Handles item state changes. Must be implemented by derived classes.

Declaration
public abstract void ItemStateChanged(RadObject senderItem, RadPropertyChangedEventArgs changeArgs)
Parameters
RadObject senderItem

The RadObject item that changed state.

RadPropertyChangedEventArgs changeArgs

The property change event arguments.

RemoveDefaultVisibleState(String)

Removes a state from the default visible states collection.

Declaration
public void RemoveDefaultVisibleState(string state)
Parameters
System.String state

The state name to remove.

Exceptions
System.InvalidOperationException

Thrown if the state is not recognized by the state manager.

SetItemState(RadObject, String[])

Combines ThemeRoleName with state names using "." as delimiter and sets the result to AttachedElement.Class

Declaration
protected void SetItemState(RadObject item, params string[] stateNames)
Parameters
RadObject item

The RadObject item to set state for.

System.String[] stateNames

Array of state names to combine.

VerifyState(String)

Verifies if the specified state is valid for this state manager.

Declaration
public bool VerifyState(string state)
Parameters
System.String state

The state string to verify.

Returns
System.Boolean

True if the state is valid; otherwise, false.

VerifyState(String, String)

Verifies if the specified state is valid for the given theme role.

Declaration
public virtual bool VerifyState(string themeRoleName, string key)
Parameters
System.String themeRoleName

The theme role name to validate against.

System.String key

The state key to verify.

Returns
System.Boolean

True if the state is valid; otherwise, false.

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.