示例#1
0
 protected void OnImageSelected(ImageSelectedEventArgs e)
 {
     if (ImageSelected != null)
     {
         ImageSelected(this, e);
     }
 }
示例#2
0
        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);
        }