protected void OnImageSelected(ImageSelectedEventArgs e) { if (ImageSelected != null) { ImageSelected(this, e); } }
void OnImgClicked(object sender, MouseButtonEventArgs e) { if (SelectedIndex >= realLength || SelectedIndex < 0) { return; } ImageSelectedEventArgs args = new ImageSelectedEventArgs(); //args.Source = (BitmapImage)((ImageBrush)((System.Windows.Shapes.Path)sender).Fill).ImageSource; args.SelectedIndex = SelectedIndex; args.SelectedItem = SelectedItem; SelectedIndex = -1; OnImageSelected(args); //ClickedPositionParent = e.GetPosition(_parent); }