Class RadSlideViewElement
Represents the main element of the RadSlideView control, providing core functionality for navigation, animation, and data binding with customizable templates.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadSlideViewElement : BaseNavigationElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
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
System.Boolean
|
Overrides
AnimationFrames
Gets or sets the number of frames used for slide transition animations.
Declaration
public override int AnimationFrames { get; set; }
Property Value
System.Int32
|
Overrides
AnimationType
Gets or sets the type of animation that is executed when transitioning between slides.
Declaration
public AnimationType AnimationType { get; set; }
Property Value
AnimationType
|
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
ButtonsVisibility
|
Overrides
ContentElement
Gets or sets the content element. Use the TemplateElement property instead for better functionality.
Declaration
public override LightVisualElement ContentElement { get; protected set; }
Property Value
LightVisualElement
|
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.
Declaration
public List<Mapping> Mappings { get; }
Property Value
System.Collections.Generic.List<Mapping>
|
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.
Declaration
public bool ShowButtonsOverContent { get; set; }
Property Value
System.Boolean
|
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
LightVisualElement
|
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
LightVisualElement
A new LightVisualElement configured as the content template |
Overrides
CreateSnapshot(Int32, Int32)
Creates a snapshot image of the current template element for use during animation transitions.
Declaration
protected virtual Image CreateSnapshot(int newIndex, int oldIndex)
Parameters
System.Int32
newIndex
The index being navigated to |
System.Int32
oldIndex
The index being navigated from |
Returns
System.Drawing.Image
A bitmap image of the current template element |
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
System.Object
dataBoundItem
The data object to extract the value from |
System.String
propertyName
The name of the property to retrieve |
Returns
System.Object
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
AnimationStatusEventArgs
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
MappedPropertyUpdatingEventArgs
args
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
SelectedIndexChangedEventArgs
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
TemplateUpdatedEventArgs
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
IGraphics
graphics
The graphics context used for painting |
Overrides
SelectCore(Int32, Int32, Boolean)
Handles the core selection logic including animation processing and event firing when the selected index changes.
Declaration
protected override void SelectCore(int oldIndex, int newIndex, bool animate)
Parameters
System.Int32
oldIndex
The previously selected index |
System.Int32
newIndex
The newly selected index |
System.Boolean
animate
Whether to animate the transition |
Overrides
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
VisualElement
element
The visual element that will receive the property value |
RadProperty
property
The property of the element to be set |
System.String
propertyName
The name of the property in the data object |
System.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 Type
UpdateMappedPropertyEventHandler
|
SelectedIndexChanged
Occurs when the selected index has changed to a different slide.
Declaration
public event RadSelectedIndexChangedEventHandler SelectedIndexChanged
Event Type
RadSelectedIndexChangedEventHandler
|
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 Type
TemplateUpdatedEventHandler
|