diff --git a/DynamicMenu/Pages/MainView.xaml b/DynamicMenu/Pages/MainView.xaml new file mode 100644 index 0000000..5999f6e --- /dev/null +++ b/DynamicMenu/Pages/MainView.xaml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + diff --git a/DynamicMenu/Pages/MainView.xaml.cs b/DynamicMenu/Pages/MainView.xaml.cs new file mode 100644 index 0000000..dc717af --- /dev/null +++ b/DynamicMenu/Pages/MainView.xaml.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace DynamicMenu.Pages +{ + /// + /// Interaction logic for MainView.xaml + /// + public partial class MainView : UserControl + { + public MainView() + { + InitializeComponent(); + } + } +} diff --git a/DynamicMenu/Pages/MainViewModel.cs b/DynamicMenu/Pages/MainViewModel.cs new file mode 100644 index 0000000..624247f --- /dev/null +++ b/DynamicMenu/Pages/MainViewModel.cs @@ -0,0 +1,9 @@ +using System; +using Stylet; + +namespace DynamicMenu.Pages +{ + public class MainViewModel : Conductor.StackNavigation + { + } +} diff --git a/DynamicMenu/Pages/ShellView.xaml b/DynamicMenu/Pages/ShellView.xaml index 6e4faae..02ee90a 100644 --- a/DynamicMenu/Pages/ShellView.xaml +++ b/DynamicMenu/Pages/ShellView.xaml @@ -7,10 +7,6 @@ xmlns:local="clr-namespace:Company.WpfApplication1.Pages" mc:Ignorable="d" d:DataContext="{d:DesignInstance local:ShellViewModel}" - Title="Stylet Project" Height="450" Width="800"> - - - Hello Stylet! - - + Title="Stylet Dynamic Menu" Height="600" Width="1200"> + diff --git a/DynamicMenu/Pages/ShellViewModel.cs b/DynamicMenu/Pages/ShellViewModel.cs index ee58c0b..71b25b8 100644 --- a/DynamicMenu/Pages/ShellViewModel.cs +++ b/DynamicMenu/Pages/ShellViewModel.cs @@ -1,8 +1,16 @@ -using Stylet; +using DynamicMenu.Pages; +using Stylet; namespace Company.WpfApplication1.Pages { - public class ShellViewModel : Screen + public class ShellViewModel : Conductor { + public MainViewModel MainVM { get; set; } + + public ShellViewModel() + { + MainVM = new MainViewModel(); + this.ActivateItem(MainVM); + } } }