ClassRadSlideViewElement
Represents the main element of the RadSlideView control, providing core functionality for navigation, animation, and data binding with customizable templates.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadSlideViewElement : BaseNavigationElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementBaseNavigationElementRadSlideViewElement
Implements:
Inherited Members
Constructors
RadSlideViewElement()
Initializes a new instance of the RadSlideViewElement class.
Declaration
public RadSlideViewElement()
Properties
AllowAnimation
Gets or sets a value indicating whether to use animation when transitioning between slides. Returns false when AnimationType is set to None in non-design mode.
Declaration
public override bool AllowAnimation { get; set; }
Property Value
Overrides
AnimationFrames
Gets or sets the number of frames used for slide transition animations.
Declaration
public override int AnimationFrames { get; set; }
Property Value
Overrides
AnimationType
Gets or sets the type of animation that is executed when transitioning between slides.
Declaration
public AnimationType AnimationType { get; set; }
Property Value
ButtonsVisibility
Gets or sets how the navigation buttons are displayed - whether they are always visible, hidden, or visible only on mouse over.
Declaration
public override ButtonsVisibility ButtonsVisibility { get; set; }
Property Value
Overrides
Mappings
Gets the mappings collection that provides options to map properties from the TemplateElement to the data bound object. Mappings are used only in bound mode.
ShowButtonsOverContent
Gets or sets a value indicating whether the navigation buttons will be displayed over the content or outside it. The default value is true, which displays the buttons over the content.
TemplateElement
Gets or sets the template element that is responsible for displaying the content of each slide.
Declaration
public LightVisualElement TemplateElement { get; set; }
Property Value
Methods
CreateChildElements()
Creates and configures the child elements including navigation buttons and content area.
Declaration
protected override void CreateChildElements()
Overrides
CreateContentElement()
Creates and returns a new content element that serves as the template container.
Declaration
protected override LightVisualElement CreateContentElement()
Returns
A new LightVisualElement configured as the content template
Overrides
CreateSnapshot(int, int)
Creates a snapshot image of the current template element for use during animation transitions.
DisposeManagedResources()
Disposes of managed resources and cleans up event handlers and collections.
Declaration
protected override void DisposeManagedResources()
Overrides
GetBoundValue(object, string)
Retrieves the value of a property from the data bound item using reflection and type descriptors, with caching for performance.
Declaration
protected virtual object GetBoundValue(object dataBoundItem, string propertyName)
Parameters
dataBoundItem
The data object to extract the value from
propertyName
The name of the property to retrieve
Returns
The value of the specified property, or null if not found
InitializeFields()
Initializes the default field values for the RadSlideViewElement instance.
Declaration
protected override void InitializeFields()
Overrides
OnAnimationFinished(AnimationStatusEventArgs)
Handles the completion of animation by resetting element properties and clearing animation settings.
Declaration
protected override void OnAnimationFinished(AnimationStatusEventArgs e)
Parameters
e
The animation status event arguments
Overrides
OnBindingSourceChanged()
Handles changes to the binding source by resetting bound item type and properties, then updating the template.
Declaration
protected override void OnBindingSourceChanged()
Overrides
OnMappedPropertyUpdating(MappedPropertyUpdatingEventArgs)
Raises the MappedPropertyUpdating event to allow customization of mapped property values during data binding.
Declaration
protected virtual void OnMappedPropertyUpdating(MappedPropertyUpdatingEventArgs args)
Parameters
args
MappedPropertyUpdatingEventArgs
The event arguments containing mapping information and allowing value modification
OnSelectedIndexChanged(SelectedIndexChangedEventArgs)
Raises the SelectedIndexChanged event when the selected slide index changes.
Declaration
protected virtual void OnSelectedIndexChanged(SelectedIndexChangedEventArgs args)
Parameters
args
The event arguments containing old and new index information
OnTemplateUpdated(TemplateUpdatedEventArgs)
Raises the TemplateUpdated event to allow final customization of the template after mappings have been applied.
Declaration
protected virtual void OnTemplateUpdated(TemplateUpdatedEventArgs args)
Parameters
args
The event arguments containing template and data object information
PaintBackgroundImage(IGraphics)
Paints the background image used during animation transitions, positioning it based on the current animation state.
Declaration
protected override void PaintBackgroundImage(IGraphics graphics)
Parameters
graphics
The graphics context used for painting
Overrides
SelectCore(int, int, bool)
Handles the core selection logic including animation processing and event firing when the selected index changes.
SetMappedProperty(VisualElement, RadProperty, string, object)
Sets a mapped property value from the data object to the specified visual element property, with optional type conversion through the MappedPropertyUpdating event.
Declaration
protected virtual void SetMappedProperty(VisualElement element, RadProperty property, string propertyName, object dataObject)
Parameters
element
The visual element that will receive the property value
property
The property of the element to be set
propertyName
The name of the property in the data object
dataObject
The data object containing the source value
UpdateTemplate()
Updates the TemplateElement by applying mappings in bound mode and firing the TemplateUpdated event. In bound mode, applies the Mappings to the TemplateElement and fires the MappedPropertyUpdating event for each mapping. Always fires the TemplateUpdated event to enable customization in unbound mode and final touches in bound mode.
Declaration
public virtual void UpdateTemplate()
UpdateVisualItems()
Updates the visual items by refreshing the template with current data.
Declaration
protected override void UpdateVisualItems()
Overrides
Events
MappedPropertyUpdating
Occurs when a mapped property value is extracted from the data object and is about to be applied to the mapped template property. This event allows synchronization of value data types to match the destination template property type. For example if the mapped property is of type integer and the template property is of type string, this event allows to synchronize value data type to the mapped template property data type. NOTE that, if the value data type does not match the template property type, the property value will be reset. This event is fired only in bound mode when BindingSource is set. For unbound mode(when NumberOfPages is used) handle the TemplateUpdated event.
Declaration
public event UpdateMappedPropertyEventHandler MappedPropertyUpdating
Event Value
SelectedIndexChanged
Occurs when the selected index has changed to a different slide.
Declaration
public event RadSelectedIndexChangedEventHandler SelectedIndexChanged
Event Value
TemplateUpdated
Occurs when all mappings have been applied, just before the slide is changed. This event is suitable for changing template styles or properties.
Declaration
public event TemplateUpdatedEventHandler TemplateUpdated
Event Value