Articles in this section
Category / Section

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

2 mins read

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

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied