feat(01-07): add SettingsView and wire into MainWindow Settings tab
- Create Views/Tabs/SettingsView.xaml (UserControl with language ComboBox en/fr, DataFolder TextBox and Browse button using TranslationSource) - Create Views/Tabs/SettingsView.xaml.cs (DI constructor injection of SettingsViewModel, LoadAsync on Loaded) - Update MainWindow.xaml to add xmlns:views namespace and clear placeholder TextBlock from SettingsTabItem - Register SettingsView as Transient in DI; resolve and set as SettingsTabItem.Content from MainWindow constructor - All 42 unit tests pass, 0 build errors
This commit is contained in:
14
SharepointToolbox/Views/Tabs/SettingsView.xaml.cs
Normal file
14
SharepointToolbox/Views/Tabs/SettingsView.xaml.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Windows.Controls;
|
||||
using SharepointToolbox.ViewModels.Tabs;
|
||||
|
||||
namespace SharepointToolbox.Views.Tabs;
|
||||
|
||||
public partial class SettingsView : UserControl
|
||||
{
|
||||
public SettingsView(SettingsViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = viewModel;
|
||||
Loaded += async (_, _) => await viewModel.LoadAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user