Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Image_MouseDown(object sender, MouseButtonEventArgs e)
- {
- MessageBox.Show(e.Source.ToString());
- }
- Image image = new Image { Height = 225, Width = 236, Source = logo, Stretch = Stretch.Fill };
- image.MouseDown += (s, e) => MyMethod(myId); // MyMethod — ваш метод для отправки, myId — ваш id или любой другой параметр
- stack.Children.Add(image);
- <ItemsControl ItemsSource="{Binding MyItems}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Button Command="{Binding SendCommand}" CommandParameter="{Binding Id}"
- Template="{StaticResource MySendButtonTemplate}"/>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
Add Comment
Please, Sign In to add comment