/// <summary> /// Adds the specified panel. /// </summary> /// <param name="desc">Desc.</param> /// <param name="icon">Icon.</param> /// <param name="pane">Pane.</param> public void AddPanel(IPreferencesVM prefViewModel) { IView view = App.Current.ViewLocator.Retrieve(prefViewModel.View); view.SetViewModel(prefViewModel); prefsStore.AppendValues(prefViewModel, prefViewModel.Name, view as Widget); }
/// <summary> /// Adds a preference panel, by passing a IPreferencesVM ViewModel /// </summary> /// <param name="prefViewModel">Preference view model.</param> void AddPanel(IPreferencesVM prefViewModel) { IView view = App.Current.ViewLocator.Retrieve(prefViewModel.View); view.SetViewModel(prefViewModel); var icon = App.Current.ResourcesLocator.LoadIcon(prefViewModel.Icon); prefsStore.AppendValues(icon, prefViewModel.Name, view as Widget); }