We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to retrieve the index of currently streaming image in ImageStreamer in the WinForms TileLayout?

Platform: WinForms |
Control: TileLayout |
Published Date: September 19, 2018 |
Last Revised Date: February 4, 2020 |
.NET Framework: 4

Retrieve the index of streaming image

In ImageStreamer, it possible to retrieve currently streaming image index by handling its BeforeSliding event and using its property named StartImageIndex. The following code demonstrates the same. 

C#

//This raising event helps to get the displayed image index
imageStreamer1.BeforeSliding += ImageStreamer1_BeforeSliding;
private void ImageStreamer1_BeforeSliding(object sender, EventArgs e)
{
  textBox1.Text = imageStreamer1.StartImageIndex.ToString();
}
private void button1_Click(object sender, EventArgs e)
{
  this.imageStreamer1.SlideShow = true;
}

VB

'This raising event helps to get the displayed image index
AddHandler imageStreamer1.BeforeSliding, AddressOf ImageStreamer1_BeforeSliding
Private Sub ImageStreamer1_BeforeSliding(ByVal sender As Object, ByVal e As EventArgs)
  textBox1.Text = imageStreamer1.StartImageIndex.ToString()
End Sub
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles button1.Click
  Me.imageStreamer1.SlideShow = True
End Sub

 

Screenshot

 

Show the image in tile

Samples:

C#: ImageStreamerSample

VB: ImageStreamerSample

Reference link: https://help.syncfusion.com/windowsforms/tile-layout/hosting-imagestreamer-as-tile-items

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile