-
Notifications
You must be signed in to change notification settings - Fork 81
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
Feat: add a new control PathPicker, add PathPickerDemo #533
Conversation
…hanged`SelectedPath`to`SelectedPathsText`and supported two-way conversion with`SelectedPaths`;modified the parsing method of`FileFilter`so that it can override the`Name`parameter of the`FilePickerFileType`constructor and can define multiple`FilePickerFileType`instances;added support for`FilePickerFileTypes`in`FileFilter`;and added a new PathPicker style`PathPickerForMultipleText`.
Command is still processed before picking finished... |
I didn't fully understand what you meant. Was the Command triggered incorrectly? |
Unable to reproduce the issue; more information is needed. |
Sorry I was using github cli and it's not updating from source.... |
</Setter> | ||
</ControlTheme> | ||
|
||
<ControlTheme x:Key="PathPickerForListView" TargetType="ursa:PathPicker"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow, I think triggering command with expander header leads to a lot of mis-clicking here... After this PR I will try to redesign this theme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about redesigning it to enhance its visual prominence? This way, you would only need to modify the style of the Expander.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments.
One more thing, we should add a property to control what to do when user cancelled a selection. Sometimes I just want to keep the original selection. |
Agreed. It has been added. |
add:Maybe we can add a command demo here to show how to trigger the bound command. change:I think these two themes should be merged, and the "AcceptReturn" should just be controlled by "AllowMultiple" add:One more thing, we should add a property to control what to do when user cancelled a selection. Sometimes I just want to keep the original selection.
feat:add property ClearSelectionOnCancel. support for not clearing the selection if the file picker is canceled.
PathPicker
aggregates file selection functionality and provides aCommand
property. When a button is pressed or Enter is pressed while the focus is onPathPicker
, theCommand
is triggered and aTask<IReadOnlyList>
is passed to theCommand
.