Class
PictureHubTile

An abstract class that provides a PictureNeeded event and a method to raise it.

Definition

Namespace:Telerik.UI.Xaml.Controls.Primitives

Assembly:Telerik.WinUI.Controls.dll

Syntax:

cs-api-definition
public abstract class PictureHubTile : HubTileBase, IWeakEventListener

Inheritance: objectRadControlHubTileBasePictureHubTile

Derived Classes: RadMosaicHubTileRadPictureRotatorHubTile

Implements: IWeakEventListener

Inherited Members HubTileBase.TitlePropertyHubTileBase.TitleTemplatePropertyHubTileBase.UpdateIntervalPropertyHubTileBase.IsFrozenPropertyHubTileBase.BackContentPropertyHubTileBase.BackContentTemplatePropertyHubTileBase.CommandPropertyHubTileBase.IsFlippedPropertyHubTileBase.CommandParameterPropertyHubTileBase.OnPointerEntered(PointerRoutedEventArgs)HubTileBase.OnPointerExited(PointerRoutedEventArgs)HubTileBase.ComposeVisualStateName()HubTileBase.Update(bool, bool)HubTileBase.UpdateIsFlipped(bool)HubTileBase.ApplyTemplateCore()HubTileBase.OnTemplateApplied()HubTileBase.OnTapped(TappedRoutedEventArgs)HubTileBase.LoadCore()HubTileBase.UnloadCore()HubTileBase.OnCreateAutomationPeer()HubTileBase.ResetTimer()HubTileBase.OnBackContentChanged(object, object)HubTileBase.OnBackStateActivated()HubTileBase.OnBackStateDeactivated()HubTileBase.OnIsFlippedChanged(bool, bool)HubTileBase.UpdateTimerState()HubTileBase.IsFlippedHubTileBase.CommandHubTileBase.CommandParameterHubTileBase.TitleHubTileBase.TitleTemplateHubTileBase.IsFrozenHubTileBase.UpdateIntervalHubTileBase.BackContentHubTileBase.BackContentTemplateHubTileBase.IsPointerOverHubTileBase.LayoutRootHubTileBase.ShouldClipRadControl.EndVisualStateUpdate(bool, bool)RadControl.UpdateVisualState(bool)RadControl.BeginVisualStateUpdate()RadControl.SetVisualState(string, bool)RadControl.CanUpdateVisualState()RadControl.MeasureOverride(Size)RadControl.ArrangeOverride(Size)RadControl.OnApplyTemplate()RadControl.UnapplyTemplateCore()RadControl.OnIsEnabledChanged(bool, bool)RadControl.OnLoaded()RadControl.CurrentVisualStateRadControl.IsLoadedRadControl.IsLoadingRadControl.IsUnloadedRadControl.WasUnloadedRadControl.IsTemplateApplied

Constructors

PictureHubTile()

Initializes a new instance of the PictureHubTile class.

Declaration

cs-api-definition
protected PictureHubTile()

Fields

PictureSourceProviderProperty

Identifies the PictureSourceProvider dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PictureSourceProviderProperty

Field Value

DependencyProperty

PicturesSourceProperty

Identifies the PicturesSource dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PicturesSourceProperty

Field Value

DependencyProperty

Properties

IsUpdateTimerNeeded

Determines whether the update timer used to update the tile's VisualState needs to be started.

Declaration

cs-api-definition
protected override bool IsUpdateTimerNeeded { get; }

Property Value

bool

Overrides HubTileBase.IsUpdateTimerNeeded

PictureSourceProvider

Gets or sets the IImageSourceProvider implementation that is used to provide custom image source resolution routine.

Declaration

cs-api-definition
public IImageSourceProvider PictureSourceProvider { get; set; }

Property Value

IImageSourceProvider

PicturesSource

Gets or sets the source that contains all the pictures. Pictures are randomly chosen from this collection when an image needs to be displayed.

Declaration

cs-api-definition
public IEnumerable PicturesSource { get; set; }

Property Value

IEnumerable

Remarks

To translate the objects from this collection to an actual ImageSource, use the PictureSourceProvider property. If the objects are string uris or ImageSource instances, no translation is necessary.

Methods

Finalize()

Finalizes an instance of the PictureHubTile class.

Declaration

cs-api-definition
protected override void Finalize()

Overrides HubTileBase.Finalize()

GetNewIndex(int)

Should be overridden in descendant classes to generate the new index from the picture collection.

Declaration

cs-api-definition
protected virtual int GetNewIndex(int count)

Parameters

count

int

The length of the collection.

Returns

int

Returns new index different from previous.

GetRandomImageSource()

Creates an ImageSource from a randomly chosen URI from the ImageSources collection and returns it.

Declaration

cs-api-definition
protected ImageSource GetRandomImageSource()

Returns

ImageSource

Returns an ImageSource with a randomly chosen URI from the ImageSources collection.

IsNewIndexValid(int)

Should be overridden in descendant classes to indicate if the same image can be displayed. many times in a row.

Declaration

cs-api-definition
protected virtual bool IsNewIndexValid(int index)

Parameters

index

int

The index of the new image.

Returns

bool

Returns true if the image can be repeated and false otherwise.