-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/iNKORE-NET/UI.WPF.Modern
- Loading branch information
Showing
18 changed files
with
357 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Application x:Class="NavigationViewExample.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:NavigationViewExample" | ||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" | ||
StartupUri="MainWindow.xaml"> | ||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ui:ThemeResources/> | ||
<ui:XamlControlsResources/> | ||
</ResourceDictionary.MergedDictionaries> | ||
</ResourceDictionary> | ||
|
||
</Application.Resources> | ||
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.Configuration; | ||
using System.Data; | ||
using System.Windows; | ||
|
||
namespace NavigationViewExample | ||
{ | ||
/// <summary> | ||
/// Interaction logic for App.xaml | ||
/// </summary> | ||
public partial class App : Application | ||
{ | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System.Windows; | ||
|
||
[assembly: ThemeInfo( | ||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located | ||
//(used if a resource is not found in the page, | ||
// or application resource dictionaries) | ||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located | ||
//(used if a resource is not found in the page, | ||
// app, or any theme specific resource dictionaries) | ||
)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<Window x:Class="NavigationViewExample.MainWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:local="clr-namespace:NavigationViewExample" | ||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" | ||
mc:Ignorable="d" | ||
ui:WindowHelper.UseModernWindowStyle="True" ui:WindowHelper.SystemBackdropType="Mica" | ||
Title="MainWindow" Height="450" Width="800" | ||
Loaded="Window_Loaded"> | ||
|
||
<ui:NavigationView x:Name="NavigationView_Root" IsPaneOpen="False" | ||
SelectionChanged="NavigationView_SelectionChanged"> | ||
|
||
<ui:NavigationView.MenuItems> | ||
<ui:NavigationViewItem x:Name="NavigationViewItem_Home" Content="Home"> | ||
<ui:NavigationViewItem.Icon> | ||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Home}"/> | ||
</ui:NavigationViewItem.Icon> | ||
</ui:NavigationViewItem> | ||
|
||
<ui:NavigationViewItem x:Name="NavigationViewItem_Apps" Content="Apps"> | ||
<ui:NavigationViewItem.Icon> | ||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.OEM}"/> | ||
</ui:NavigationViewItem.Icon> | ||
</ui:NavigationViewItem> | ||
|
||
<ui:NavigationViewItem x:Name="NavigationViewItem_Games" Content="Games"> | ||
<ui:NavigationViewItem.Icon> | ||
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Game}"/> | ||
</ui:NavigationViewItem.Icon> | ||
</ui:NavigationViewItem> | ||
|
||
|
||
</ui:NavigationView.MenuItems> | ||
|
||
<ui:Frame x:Name="Frame_Main"/> | ||
|
||
</ui:NavigationView> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
using iNKORE.UI.WPF.Modern.Controls; | ||
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; | ||
using Page = iNKORE.UI.WPF.Modern.Controls.Page; | ||
|
||
namespace NavigationViewExample | ||
{ | ||
/// <summary> | ||
/// Interaction logic for MainWindow.xaml | ||
/// </summary> | ||
public partial class MainWindow : Window | ||
{ | ||
public MainWindow() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
public Pages.AppsPage Page_Apps = new Pages.AppsPage(); | ||
public Pages.HomePage Page_Home = new Pages.HomePage(); | ||
public Pages.GamesPage Page_Games = new Pages.GamesPage(); | ||
|
||
private void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args) | ||
{ | ||
var item = sender.SelectedItem; | ||
Page? page = null; | ||
|
||
if(item == NavigationViewItem_Home) | ||
{ | ||
page = Page_Home; | ||
} | ||
else if (item == NavigationViewItem_Games) | ||
{ | ||
page = Page_Games; | ||
} | ||
else if (item == NavigationViewItem_Apps) | ||
{ | ||
page = Page_Apps; | ||
} | ||
|
||
if(page != null) | ||
{ | ||
NavigationView_Root.Header = page.Title; | ||
Frame_Main.Navigate(page); | ||
} | ||
} | ||
|
||
private void Window_Loaded(object sender, RoutedEventArgs e) | ||
{ | ||
NavigationView_Root.SelectedItem = NavigationViewItem_Home; | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
samples/NavigationViewExample/NavigationViewExample.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<TargetFramework>net6.0-windows10.0.18362.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<UseWPF>true</UseWPF> | ||
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="iNKORE.UI.WPF" Version="1.2.5" /> | ||
<PackageReference Include="iNKORE.UI.WPF.Modern" Version="0.9.29" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<ui:Page x:Class="NavigationViewExample.Pages.AppsPage" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:NavigationViewExample.Pages" | ||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" | ||
mc:Ignorable="d" | ||
d:DesignHeight="450" d:DesignWidth="800" | ||
Title="Apps"> | ||
|
||
<Grid> | ||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0.5" FontSize="24">Current Page: Apps</TextBlock> | ||
</Grid> | ||
</ui:Page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
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; | ||
using Page = iNKORE.UI.WPF.Modern.Controls.Page; | ||
|
||
namespace NavigationViewExample.Pages | ||
{ | ||
/// <summary> | ||
/// Interaction logic for AppsPage.xaml | ||
/// </summary> | ||
public partial class AppsPage : Page | ||
{ | ||
public AppsPage() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<ui:Page x:Class="NavigationViewExample.Pages.GamesPage" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:NavigationViewExample.Pages" | ||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" | ||
mc:Ignorable="d" | ||
d:DesignHeight="450" d:DesignWidth="800" | ||
Title="Games"> | ||
|
||
<Grid> | ||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0.5" FontSize="24">Current Page: Games</TextBlock> | ||
|
||
</Grid> | ||
</ui:Page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
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; | ||
using Page = iNKORE.UI.WPF.Modern.Controls.Page; | ||
|
||
|
||
namespace NavigationViewExample.Pages | ||
{ | ||
/// <summary> | ||
/// Interaction logic for GamesPage.xaml | ||
/// </summary> | ||
public partial class GamesPage : Page | ||
{ | ||
public GamesPage() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
Oops, something went wrong.