mirror of
https://github.com/Tichau/FileConverter.git
synced 2026-11-29 09:44:56 +01:00
Focus element after importing it
This commit is contained in:
1 parent
e6fef86e66
commit
2b11ba10d7
1 file changed
+11
@@ -35,6 +35,17 @@ namespace FileConverter.Views
|
||||
this.InitializeComponent();
|
||||
|
||||
Messenger.Default.Register<string>(this, "DoFocus", this.DoFocus);
|
||||
|
||||
(this.DataContext as SettingsViewModel).PropertyChanged += this.SettingsWindow_PropertyChanged;
|
||||
}
|
||||
|
||||
private void SettingsWindow_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs args)
|
||||
{
|
||||
if (args.PropertyName == "SelectedItem")
|
||||
{
|
||||
TreeViewItem selectedItem = this.GetTreeViewItem(this.PresetTreeView, this.PresetTreeView.SelectedItem);
|
||||
selectedItem?.BringIntoView();
|
||||
}
|
||||
}
|
||||
|
||||
public void DoFocus(string message)
|
||||
|
||||
Reference in new issue
Block a user