24 lines
681 B
C#
24 lines
681 B
C#
namespace Common.UI.Controls
|
|
{
|
|
using System;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Navigation;
|
|
|
|
public partial class MainMenu : Menu
|
|
{
|
|
public MainMenu() => this.InitializeComponent();
|
|
|
|
private void MenuItem_Click(object sender, RoutedEventArgs args)
|
|
{
|
|
if (sender is MenuItem menuItem && menuItem.CommandParameter is string page)
|
|
{
|
|
if (App.Current.MainWindow is NavigationWindow navigationWindow)
|
|
{
|
|
navigationWindow.Navigate(new Uri(page, UriKind.RelativeOrAbsolute));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|