S
ScCrow2
Guest
In c# UWP VS 2019, I can't find a MouseDown event. I am using the Pointer which is somewhat working. I can click on the grid and display the coordinates in a textbox Those are used to calculate a grid coordinate painting an image.
The problem is, I want to continue painting so long as the mouseKey is held down and within the grid. What is happening for me, the PointerReleased is firing after every PointerPressed event occurs, even with the mouse key still being held down. Without that working, I am going to have to click on every individual grid position instead of moving across the grid drawing an image.
There events declarations and setup is done. I defined a PointerMoved event to capture the current coordinates and write them to a Xaml textbox. Works.
Then (some test stuff)
private void canBoard_PointerPressed(object sender, PointerRoutedEventArgs e)
{
tbRowGot.Text = "P:" + tbRow.Text;
tbColGot.Text = "P:" + tbCol.Text;
}
private void canBoard_PointerReleased(object sender, PointerRoutedEventArgs e)
{
tbRowGot.Text = "R:" + tbRow.Text;
tbColGot.Text = "R:" + tbCol.Text;
}
Continue reading...
The problem is, I want to continue painting so long as the mouseKey is held down and within the grid. What is happening for me, the PointerReleased is firing after every PointerPressed event occurs, even with the mouse key still being held down. Without that working, I am going to have to click on every individual grid position instead of moving across the grid drawing an image.
There events declarations and setup is done. I defined a PointerMoved event to capture the current coordinates and write them to a Xaml textbox. Works.
Then (some test stuff)
private void canBoard_PointerPressed(object sender, PointerRoutedEventArgs e)
{
tbRowGot.Text = "P:" + tbRow.Text;
tbColGot.Text = "P:" + tbCol.Text;
}
private void canBoard_PointerReleased(object sender, PointerRoutedEventArgs e)
{
tbRowGot.Text = "R:" + tbRow.Text;
tbColGot.Text = "R:" + tbCol.Text;
}
Continue reading...