Skip to content

Focus on new folder by default when using ctrl + shift + n (#9704) #9819

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

Closed

Conversation

z3r0tru5tk4l1
Copy link

Resolved / Related Issues
Focus on "Folder" when using shortcut "Ctrl + Shift + N"

Details of Changes

  • Added Method on AddItemDialog.xaml.cs that sets Focus on first ListViewItem which is "Folder"
  • Added Loaded event on AddItemDialog.xaml to execute Focus function.

Validation

  • Built and ran the app
  • Tested the changes for accessibility

@yaira2
Copy link
Member

yaira2 commented Aug 26, 2022

@z3r0tru5tk4l1 can I suggest a different approach where you bind the selected index to a property in the view model (assuming a view model exists)?

@yaira2
Copy link
Member

yaira2 commented Sep 1, 2022

@z3r0tru5tk4l1 I meant to create a property in the ViewModel called SelectedIndex and you could bind the ListView to this property.
Instead of selecting based on the header, you can simply set the value to 0 and it'll automatically select whatever the first item is.

@yaira2
Copy link
Member

yaira2 commented Sep 22, 2022

Merging with #10042

@yaira2 yaira2 closed this Sep 22, 2022
@files-community files-community deleted a comment from z3r0tru5tk4l1 Sep 14, 2023
@files-community files-community deleted a comment from z3r0tru5tk4l1 Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Auto focus first item in the Add Item modal
2 participants