HubTile and purpose of the Events in WinForms Hub Tile

28 Apr 20214 minutes to read

This page explains HubTile and purpose of the Events in WinForms Hub Tile and more details.

What are the Events available in HubTile and purpose of the Events in Windows Forms Hub Tile

The Events available in HubTile are as follows,

BeforeTransition event

This BeforeTransition Event is triggered before the Image and Rotation Transition occur in HubTile.

Event data

BeforeTransitionEventArgs contain the members that provide information specific to this Event.

private void HubTile1_BeforeTransition(object sender, BeforeTransitionEventArgs e)
{
    e.ImageIndex = 1;
    e.SlideTransition = TransitionDirection.TopToBottom;
    e.TileType = HubTileType.DefaultTile;
    e.RotateTransition = TileFlipDirection.Horizontal;
}
Private Sub HubTile1_BeforeTransition(sender As System.Object, e As BeforeTransitionEventArgs) Handles HubTile1.BeforeTransition
    e.ImageIndex = 1
    e.RotateTransition = TileFlipDirection.Horizontal
    e.SlideTransition = TransitionDirection.BottomToTop
    e.TileType = HubTileType.PulsingTile
End Sub

TransitionCompleted event

This TransitionCompleted Event is triggered after the image Transition and Rotation Transition are completed in HubTile.

Event data

TransitionCompletedEventArgs contain the members that provide information specific to this Event.

private void HubTile1_TransitionCompleted (object sender, TransitionCompletedEventArgs e)
{
    e.ImageIndex = 1;
    e.SlideTransition = TransitionDirection.TopToBottom;
    e.TileType = HubTileType.DefaultTile;
    e.RotateTransition = TileFlipDirection.Horizontal;
}
Private Sub HubTile1_TransitionCompleted(sender As System.Object, e As TransitionCompletedEventArgs) Handles HubTile1.TransitionComplete      e.ImageIndex = 1
    e.SlideTransition = TransitionDirection.TopToBottom
    e.TileType = HubTileType.DefaultTile
    e.RotateTransition = TileFlipDirection.Horizontal
End Sub

SelectionMarked event

This SelectionMarked Event is triggered once the HubTile is Selection marked.

Event data

The event handler of this event receives an argument of type SelectionMarkedEventArgs.

private void HubTile1_HubTileSelectionMarked(object sender, SelectionMarkedEventArgs e)
{
    bool isSelectionMarked = e.IsSelected;
}
Private Sub HubTile1_SelectionMarked(sender As System.Object, e As SelectionMarkedEventArgs) Handles HubTile1.SelectionMarked
  Dim isSelectionMarked As Boolean = e.IsSelected
End Sub

ZoomCompleted event

This ZoomCompleted Event is triggered after the HubTile image content is Zoomed In and Out.

Event data

The event handler of this event receives an argument of type ZoomCompletedEventArgs.

private void HubTile1_ZoomCompleted(object sender, ZoomCompletedEventArgs e)
{
    e.PulseDuration = 1;
    e.PulseScale = 3;
}
Private Sub HubTile1_ZoomCompleted(sender As System.Object, e As ZoomCompletedEventArgs) Handles HubTile1.ZoomCompleted
    e.PulseDuration = 1
    e.PulseScale = 3
End Sub

TextChanged event

This TextChanged Event raises when HubTile Title, Body, Footer, Banner Text are changed.

private void  HubTile1_TextChanged(object sender, EventArgs e)
{
    string TitleText = this.HubTile.Title.Text;
}
Private Sub HubTile1_TextChanged(sender As System.Object, e As System.EventArgs) Handles HubTile1.TextChanged
    Dim TitleText As String = Me.HubTile1.Title.Text
End Sub