-
Notifications
You must be signed in to change notification settings - Fork 713
FileDialog in OpenMode Directory #4095
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You are using 2 month old nuget package. Try switching to one of these more recent ones. Nuget.org shows this old package as 'latest' despite it being very old because of the naming. It's a recurring problem see also: The bug you seeing was Was fixed in |
Ok thank you, I've updated to Version="2.0.0-develop.4425" and it has cured the "Up" button closing the FileDialog. But it has been replaced with an effect where "Accepting" on a Button is called 3 times. |
So currently any event handler for Accepting needs Please try adding this to all button event handlers. If you already have it can you share more info about what button is affected. Note it might be called |
Brilliant, thank you. It seems I had a variety of handlers, some of which set the e.Handled and some of which didn't. They are all consistent now and the app works properly. Thank you very much for the support. |
Actually, However, it is old. I'm waiting for #4062 before i do another pre-alpha release given the amount of churn in that PR. |
Uh oh!
There was an error while loading. Please reload this page.
I'm using Version="2.0.0-prealpha.1895"
I construct a FileDialog view as follows:
`
var dlg = new FileDialog()
{
Path = Environment.CurrentDirectory,
OpenMode = OpenMode.Directory,
AllowsMultipleSelection = false,
MustExist = true,
Title = "Select location to store backups",
};
Application.Run(dlg, ErrorHandler);
bool canceled = dlg.Canceled;
var folderName = dlg.Path;
dlg.Dispose();
`
When I run the app and open the dialog.
When hitting the "Up" button, the dialog closes and the dlg.Path is filled with the upper path. I don't want the dialog to close in this case. Is that possible?
When hitting the cancel button, the dialog is closed, but dlg.Canceled is set to false; This just seems wrong.
Is there something I haven't set? There doesn't appear to be any obvious properties to avoid these situations.
Also, in the same application I use a FileDialog to select files, and in that case, the dialog behaves as expected so it seems like it is only in OpenMode.DIrectory where these things occur.
This app is cross compiled onto Windows, Linux 64bit and Linux Arm 32 and 64 bit. The behaviour is consistent across all OSs
Again, if I am doing something wrong, please let me know.
Cheers,
Dan
The text was updated successfully, but these errors were encountered: