I am trying to find out how MouseLeftButtonDown works, but still not seccuss.
When I click on the button, nothing happens.
<Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Grid> <StackPanel Name="sss"> <Button x:Name="b1" Height="213" MouseLeftButtonDown="sss_MouseDown"/> </StackPanel> </Grid> </Window>
Code behind:
private void sss_MouseDown(object sender, MouseButtonEventArgs e) { MessageBox.Show("3 ->>>>>" + ((Control)sender).Name); }
c # wpf
Stav alfi
source share