ClassRadContentControl
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:
public class RadContentControl : ContentControl
Inheritance: objectRadContentControl
Derived Classes:
Constructors
RadContentControl()
Initializes a new instance of the RadContentControl class.
Declaration
public RadContentControl()
Fields
IsFocusedProperty
Defines the IsFocused property.
Declaration
public static readonly DependencyProperty IsFocusedProperty
Field Value
DependencyProperty
Properties
CurrentVisualState
Gets the current visual state of the control.
IsFocused
Gets or sets a value indicating whether the control is currently Focused (has the keyboard input).
IsLoaded
Gets a value indicating whether the control is currently loaded.
IsProperlyTemplated
Gets a value indicating whether the control template parts have been successfully acquired after the OnApplyTemplate call.
Declaration
protected virtual bool IsProperlyTemplated { get; }
Property Value
IsTemplateApplied
Gets a value indicating whether the method has been called for this instance.
Methods
BeginVisualStateUpdate()
Locks any visual state update. Useful when performing batch operations.
Declaration
public void BeginVisualStateUpdate()
CanUpdateVisualState()
Determines whether the current visual state may be updated.
ComposeVisualStateName()
Builds the current visual state for this instance.
EndVisualStateUpdate(bool, bool)
Resumes visual state update and optionally re-evaluates the current visual state.
GetTemplatePart<T>(string, bool)
Gets a template part for the provided name and type and throws an exception if it is missing.
Declaration
protected T GetTemplatePart<T>(string partName, bool throwException = true) where T : class
Parameters
partName
The name of the template part.
throwException
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
protected override void OnApplyTemplate()
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
OnGotFocus(RoutedEventArgs)
Called before the event occurs.
Declaration
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
protected virtual void OnLoaded(object sender, RoutedEventArgs e)
Parameters
sender
e
RoutedEventArgs
OnLostFocus(RoutedEventArgs)
Called before the event occurs.
Declaration
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
protected virtual void OnUnloaded(object sender, RoutedEventArgs e)
Parameters
sender
e
RoutedEventArgs
SetVisualState(string, bool)
Applies the specified visual state as current.
UpdateVisualState(bool)
Re-evaluates the current visual state for the control and updates it if necessary.
Declaration
protected void UpdateVisualState(bool animate)
Parameters
animate
True to use transitions during state update, false otherwise.