You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After triggering a MouseDown event on a Panel/Button and showing an OpenFileDialog/SelectFolderDialog, the same event will be triggered no matter where I click. If I use Click it works fine, but there is no Click event for panels I'm afraid
Sample:
class TestWindow : Form
{
public TestWindow()
{
MovableByWindowBackground = true;
var layout = new StackLayout() { Orientation = Orientation.Vertical };
layout.Items.Add(new Label() { Text = "Label" });
layout.Items.Add(new TextBox() { Text = "TextBox" });
Panel button = new Panel() { Size = new Size(100, 100), BackgroundColor = Colors.Red };
button.MouseDown += ButtonClicked;
layout.Items.Add(button);
Content = layout;
}
private void ButtonClicked(object sender, MouseEventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.ShowDialog(null);
//If the following line is commented, it throws exception "InvalidaOperationException: Can only call DragMove when primary mouse button is down", otherwise, it captures all clicks from that moment onward
//e.Handled = true;
}
}
Version: Eto 2.5.10
Platform(s): WPF
Operating System(s): Windows 10
The text was updated successfully, but these errors were encountered:
Just looking at this again, as a workaround if you use the MouseUp event then this shouldn't happen. A "Click" event would also be fired at this time as well.
After triggering a MouseDown event on a Panel/Button and showing an OpenFileDialog/SelectFolderDialog, the same event will be triggered no matter where I click. If I use Click it works fine, but there is no Click event for panels I'm afraid
Sample:
The text was updated successfully, but these errors were encountered: