I am using Telerik Slide View control and it supports a SelectionChanged event
private void radSlideView_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var addedItems = e.AddedItems;
}
e contains the MainViewModel object which contains the FileName property. How do I "extract" the FileName property from e? addedItems is aSystem.Collection.IList type

You need to cast:
if(e.AddedItems.Length > 0) // make sure there is at least one item..
{
MainViewModel firstItem = e.AddedItems[0] as MainViewModel; // cast..
if(firstItem != null) // if not null..
{
string fileName = firstItem.FileName; // get the file name
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With