RadSlideViewElement
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
Initializes a new instance of the RadSlideViewElement class.
public RadSlideViewElement()
Properties
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.
public override bool AllowAnimation { get; set; }
Overrides:
Gets or sets the number of frames used for slide transition animations.
public override int AnimationFrames { get; set; }
Overrides:
Gets or sets the type of animation that is executed when transitioning between slides.
public AnimationType AnimationType { get; set; }
Gets or sets how the navigation buttons are displayed - whether they are always visible, hidden, or visible only on mouse over.
public override ButtonsVisibility ButtonsVisibility { get; set; }
Overrides:
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.
public List<Mapping> Mappings { get; }
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.
public bool ShowButtonsOverContent { get; set; }
Gets or sets the template element that is responsible for displaying the content of each slide.
public LightVisualElement TemplateElement { get; set; }
Methods
Creates and configures the child elements including navigation buttons and content area.
protected override void CreateChildElements()
Overrides:
Creates and returns a new content element that serves as the template container.
protected override LightVisualElement CreateContentElement()
A new LightVisualElement configured as the content template
Overrides:
Creates a snapshot image of the current template element for use during animation transitions.
Disposes of managed resources and cleans up event handlers and collections.
protected override void DisposeManagedResources()
Overrides:
Retrieves the value of a property from the data bound item using reflection and type descriptors, with caching for performance.
Initializes the default field values for the RadSlideViewElement instance.
protected override void InitializeFields()
Overrides:
Handles the completion of animation by resetting element properties and clearing animation settings.
protected override void OnAnimationFinished(AnimationStatusEventArgs e)
The animation status event arguments
Overrides:
Handles changes to the binding source by resetting bound item type and properties, then updating the template.
protected override void OnBindingSourceChanged()
Overrides:
Raises the MappedPropertyUpdating event to allow customization of mapped property values during data binding.
protected virtual void OnMappedPropertyUpdating(MappedPropertyUpdatingEventArgs args)
The event arguments containing mapping information and allowing value modification
Raises the SelectedIndexChanged event when the selected slide index changes.
protected virtual void OnSelectedIndexChanged(SelectedIndexChangedEventArgs args)
The event arguments containing old and new index information
Raises the TemplateUpdated event to allow final customization of the template after mappings have been applied.
protected virtual void OnTemplateUpdated(TemplateUpdatedEventArgs args)
The event arguments containing template and data object information
Paints the background image used during animation transitions, positioning it based on the current animation state.
protected override void PaintBackgroundImage(IGraphics graphics)
The graphics context used for painting
Overrides:
Handles the core selection logic including animation processing and event firing when the selected index changes.
Sets a mapped property value from the data object to the specified visual element property, with optional type conversion through the MappedPropertyUpdating event.
protected virtual void SetMappedProperty(VisualElement element, RadProperty property, string propertyName, object dataObject)
The visual element that will receive the property value
propertyRadPropertyThe property of the element to be set
propertyNamestringThe name of the property in the data object
dataObjectobjectThe data object containing the source value
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.
public virtual void UpdateTemplate()
Updates the visual items by refreshing the template with current data.
protected override void UpdateVisualItems()
Overrides:
Events
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.
public event UpdateMappedPropertyEventHandler MappedPropertyUpdating
Occurs when the selected index has changed to a different slide.
public event RadSelectedIndexChangedEventHandler SelectedIndexChanged
Occurs when all mappings have been applied, just before the slide is changed. This event is suitable for changing template styles or properties.
public event TemplateUpdatedEventHandler TemplateUpdated