Class
RadContentControl

Extends the base ContentControl. Wraps basic routed events like Loaded and Unloaded in virtual methods and expose common properties like IsLoaded and IsFocused.

Definition

Namespace:Telerik.UI.Xaml.Controls

Assembly:Telerik.WinUI.Controls.dll

Syntax:

cs-api-definition
public class RadContentControl : ContentControl

Inheritance: objectRadContentControl

Derived Classes: ListViewEmptyContentControlListViewGroupHeaderRadListViewItemDataGridColumnDragControlDataGridRowDetailsControlRadRatingItemLoopingListItemRadBadgeRadBadgeViewRadBusyIndicatorRadHeaderedContentControl

Constructors

RadContentControl()

Initializes a new instance of the RadContentControl class.

Declaration

cs-api-definition
public RadContentControl()

Fields

IsFocusedProperty

Defines the IsFocused property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsFocusedProperty

Field Value

DependencyProperty

Properties

CurrentVisualState

Gets the current visual state of the control.

Declaration

cs-api-definition
public string CurrentVisualState { get; }

Property Value

string

IsFocused

Gets or sets a value indicating whether the control is currently Focused (has the keyboard input).

Declaration

cs-api-definition
public bool IsFocused { get; protected set; }

Property Value

bool

IsLoaded

Gets a value indicating whether the control is currently loaded.

Declaration

cs-api-definition
public bool IsLoaded { get; }

Property Value

bool

IsProperlyTemplated

Gets a value indicating whether the control template parts have been successfully acquired after the OnApplyTemplate call.

Declaration

cs-api-definition
protected virtual bool IsProperlyTemplated { get; }

Property Value

bool

IsTemplateApplied

Gets a value indicating whether the method has been called for this instance.

Declaration

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

Property Value

bool

Methods

BeginVisualStateUpdate()

Locks any visual state update. Useful when performing batch operations.

Declaration

cs-api-definition
public void BeginVisualStateUpdate()

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 virtual string ComposeVisualStateName()

Returns

string

EndVisualStateUpdate(bool, bool)

Resumes visual state update and optionally re-evaluates the current visual state.

Declaration

cs-api-definition
public void EndVisualStateUpdate(bool update, bool animate)

Parameters

update

bool

True to re-evaluate the current visual state, false otherwise.

animate

bool

True to use animations when updating visual state, false otherwise.

GetTemplatePart<T>(string, bool)

Gets a template part for the provided name and type and throws an exception if it is missing.

Declaration

cs-api-definition
protected T GetTemplatePart<T>(string partName, bool throwException = true) where T : class

Parameters

partName

string

The name of the template part.

throwException

bool

Determines if the method should throw an exception for a missing part.

Returns

T

Returns the specified template part or throws an exception if it is missing.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call . In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.

Declaration

cs-api-definition
protected override void OnApplyTemplate()

OnCreateAutomationPeer()

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

OnGotFocus(RoutedEventArgs)

Called before the event occurs.

Declaration

cs-api-definition
protected override void OnGotFocus(RoutedEventArgs e)

Parameters

e

RoutedEventArgs

The data for the event.

OnLoaded(object, RoutedEventArgs)

Occurs when a System.Windows.FrameworkElement has been constructed and added to the object tree.

Declaration

cs-api-definition
protected virtual void OnLoaded(object sender, RoutedEventArgs e)

Parameters

sender

object

e

RoutedEventArgs

OnLostFocus(RoutedEventArgs)

Called before the event occurs.

Declaration

cs-api-definition
protected override void OnLostFocus(RoutedEventArgs e)

Parameters

e

RoutedEventArgs

The data for the event.

OnUnloaded(object, RoutedEventArgs)

Occurs when this object is no longer connected to the main object tree.

Declaration

cs-api-definition
protected virtual void OnUnloaded(object sender, RoutedEventArgs e)

Parameters

sender

object

e

RoutedEventArgs

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 void UpdateVisualState(bool animate)

Parameters

animate

bool

True to use transitions during state update, false otherwise.