WPF Mouse Hooking and Display the time, mouse position as occurring a mouse left click event


- MainWindow.xaml

<Window x:Class="Macro.MainWindow"

        Title="MainWindow" Height="350" Width="525">

    <Grid>

        <ListView x:Name="lvControl" HorizontalAlignment="Left" Height="271" Margin="25,29,0,0" VerticalAlignment="Top" Width="473">

            <ListView.View>

                <GridView>

                    <GridViewColumn Header="Time" Width="100" DisplayMemberBinding="{Binding Time}"/>

                    <GridViewColumn Header="Control" Width="100" DisplayMemberBinding="{Binding Control}"/>

                    <GridViewColumn Header="Key" Width="100" DisplayMemberBinding="{Binding Key}"/>

                    <GridViewColumn Header="Event" Width="100" DisplayMemberBinding="{Binding Event}"/>

                </GridView>

            </ListView.View>

        </ListView>

    </Grid>

</Window>


- MainWindow.xaml.cs


- Result


WPF ListView Binding


- MainWindow.xaml

<Window x:Class="Macro.MainWindow"

        Title="MainWindow" Height="350" Width="525">

    <Grid>

        <ListView x:Name="lvControl" HorizontalAlignment="Left" Height="271" Margin="25,29,0,0" VerticalAlignment="Top" Width="473">

            <ListView.View>

                <GridView>

                    <GridViewColumn Header="Time" Width="100" DisplayMemberBinding="{Binding Time}"/>

                    <GridViewColumn Header="Control" Width="100" DisplayMemberBinding="{Binding Control}"/>

                    <GridViewColumn Header="Key" Width="100" DisplayMemberBinding="{Binding Key}"/>

                </GridView>

            </ListView.View>

        </ListView>

    </Grid>

</Window>


- MainWindow.xaml.cs




+ Recent posts