-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
232 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Application x:Class="CardStyleExample.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:CardStyleExample" | ||
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 CardStyleExample | ||
{ | ||
/// <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,130 @@ | ||
<Window x:Class="CardStyleExample.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:ui="http://schemas.inkore.net/lib/ui/wpf/modern" | ||
xmlns:local="clr-namespace:CardStyleExample" | ||
mc:Ignorable="d" | ||
ui:WindowHelper.UseModernWindowStyle="True" | ||
ui:WindowHelper.SystemBackdropType="Mica" | ||
Title="Settings" Height="450" Width="800"> | ||
<FrameworkElement.Resources> | ||
<ResourceDictionary> | ||
|
||
<Style TargetType="Expander" BasedOn="{StaticResource {x:Static ui:ThemeKeys.ExpanderCardStyleKey}}"> | ||
<Setter Property="HorizontalAlignment" Value="Stretch"/> | ||
</Style> | ||
<Style x:Key="Style_SectionBorderStyle" TargetType="Border"> | ||
<Setter Property="Background" Value="{DynamicResource {x:Static ui:ThemeKeys.ExpanderHeaderBackgroundKey}}"/> | ||
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static ui:ThemeKeys.ExpanderHeaderBorderBrushKey}}"/> | ||
<Setter Property="BorderThickness" Value="{DynamicResource {x:Static ui:ThemeKeys.ExpanderHeaderBorderThicknessKey}}"/> | ||
<Setter Property="CornerRadius" Value="4"/> | ||
<Setter Property="Padding" Value="15,0,20,0"/> | ||
</Style> | ||
|
||
<Style TargetType="ComboBox" BasedOn="{StaticResource {x:Static ui:ThemeKeys.DefaultComboBoxStyleKey}}"> | ||
<Setter Property="VerticalAlignment" Value="Center"/> | ||
<Setter Property="HorizontalAlignment" Value="Stretch"/> | ||
</Style> | ||
|
||
<Style TargetType="ui:FontIcon"> | ||
<Setter Property="FontSize" Value="20"/> | ||
</Style> | ||
|
||
<Style TargetType="ui:ToggleSwitch"> | ||
<Setter Property="MinWidth" Value="0"/> | ||
</Style> | ||
|
||
</ResourceDictionary> | ||
</FrameworkElement.Resources> | ||
<ui:ScrollViewerEx> | ||
<ui:SimpleStackPanel Spacing="10" MaxWidth="960" Margin="40" VerticalAlignment="Center"> | ||
|
||
<TextBlock Text="Settings" FontSize="24" FontWeight="Bold"/> | ||
|
||
<TextBlock Text="General" FontSize="16"/> | ||
<Expander x:Name="Expander_Language" IsExpanded="True"> | ||
<Expander.Header> | ||
<Grid VerticalAlignment="Center" Margin="0,10,-10,10"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition/> | ||
<RowDefinition/> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto"/> | ||
<ColumnDefinition/> | ||
<ColumnDefinition Width="200"/> | ||
</Grid.ColumnDefinitions> | ||
<ui:FontIcon Glyph="{x:Static ui:SegoeIcons.LocaleLanguage}" Grid.RowSpan="2" Margin="5,15,20,15"/> | ||
<TextBlock x:Name="TextBlock_Language" Text="Language" Grid.Column="1" VerticalAlignment="Bottom" Margin="0,0,0,2"/> | ||
<TextBlock x:Name="TextBlock_Language_Description" Text="The primary language that displays on the UI" Grid.Column="1" VerticalAlignment="Top" Grid.Row="1" Margin="0,2,20,5" Opacity="0.615" FontSize="12" TextTrimming="CharacterEllipsis" TextWrapping="WrapWithOverflow"/> | ||
|
||
<ComboBox x:Name="ComboBox_Language" DisplayMemberPath="Name" Grid.Column="2" Grid.RowSpan="2"> | ||
</ComboBox> | ||
</Grid> | ||
</Expander.Header> | ||
|
||
<Grid Margin="5,0,5,0"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="Auto"/> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition/> | ||
<ColumnDefinition Width="Auto"/> | ||
</Grid.ColumnDefinitions> | ||
<TextBlock x:Name="TextBlock_Language_Author" Text="Author" Margin="0,5,0,5"/> | ||
<TextBlock x:Name="TextBlock_Language_Version" Text="Version" Grid.Row="1" Margin="0,5,0,5"/> | ||
|
||
<TextBlock x:Name="TextBlock_Language_Author_Value" Text="NotYoojun.!" Margin="0,5,0,5" Grid.Column="1"/> | ||
<TextBlock x:Name="TextBlock_Language_Version_Value" Text="1.0.0" Grid.Row="1" Margin="0,5,0,5" Grid.Column="1"/> | ||
|
||
</Grid> | ||
|
||
</Expander> | ||
<Border Style="{StaticResource Style_SectionBorderStyle}"> | ||
<Grid VerticalAlignment="Center" Margin="0,10,0,10"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition/> | ||
<RowDefinition/> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto"/> | ||
<ColumnDefinition/> | ||
<ColumnDefinition Width="200"/> | ||
</Grid.ColumnDefinitions> | ||
<ui:FontIcon Glyph="{x:Static ui:SegoeIcons.Light}" Grid.RowSpan="2" Margin="5,15,20,15"/> | ||
<TextBlock x:Name="TextBlock_ThemeMode" Text="Theme mode" Grid.Column="1" VerticalAlignment="Bottom" Margin="0,0,0,2"/> | ||
<TextBlock x:Name="TextBlock_ThemeMode_Description" Text="Lorem ipsum dolor sit amet." Grid.Column="1" VerticalAlignment="Top" Grid.Row="1" Margin="0,2,20,5" Opacity="0.615" FontSize="12" TextTrimming="CharacterEllipsis" TextWrapping="WrapWithOverflow"/> | ||
|
||
<ComboBox x:Name="ComboBox_ThemeMode" Grid.Column="2" Grid.RowSpan="2" SelectedIndex="0"> | ||
<ComboBoxItem x:Name="ComboBoxItem_ThemeMode_Default" Content="System Default"/> | ||
<ComboBoxItem x:Name="ComboBoxItem_ThemeMode_Light" Content="Light"/> | ||
<ComboBoxItem x:Name="ComboBoxItem_ThemeMode_Dark" Content="Dark"/> | ||
</ComboBox> | ||
</Grid> | ||
</Border> | ||
|
||
<TextBlock Text="Advanced" FontSize="16" Margin="0,20,0,0"/> | ||
<Border Style="{StaticResource Style_SectionBorderStyle}"> | ||
<Grid VerticalAlignment="Center" Margin="0,10,0,10"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition/> | ||
<RowDefinition/> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto"/> | ||
<ColumnDefinition/> | ||
<ColumnDefinition Width="Auto"/> | ||
</Grid.ColumnDefinitions> | ||
<ui:FontIcon Glyph="{x:Static ui:SegoeIcons.Draw}" Grid.RowSpan="2" Margin="5,15,20,15"/> | ||
<TextBlock x:Name="TextBlock_StylusToDraw" Text="Draw with stylus" Grid.Column="1" VerticalAlignment="Bottom" Margin="0,0,0,2"/> | ||
<TextBlock x:Name="TextBlock_StylusToDraw_Description" Text="Draw with your stylus while using your fingers to move the viewport" Grid.Column="1" VerticalAlignment="Top" Grid.Row="1" Margin="0,2,20,5" Opacity="0.615" FontSize="12" TextTrimming="CharacterEllipsis" TextWrapping="WrapWithOverflow"/> | ||
|
||
<ui:ToggleSwitch x:Name="ToggleSwitch_StylusToDraw_Enabled" Grid.Column="2" Grid.RowSpan="2"/> | ||
</Grid> | ||
</Border> | ||
</ui:SimpleStackPanel> | ||
</ui:ScrollViewerEx> | ||
</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,24 @@ | ||
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 CardStyleExample | ||
{ | ||
/// <summary> | ||
/// Interaction logic for MainWindow.xaml | ||
/// </summary> | ||
public partial class MainWindow : Window | ||
{ | ||
public MainWindow() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
source/samples/SettingsPageExample/SettingsPageExample.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,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<TargetFramework>net6.0-windows</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<UseWPF>true</UseWPF> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="iNKORE.UI.WPF.Modern" Version="0.9.26.3" /> | ||
</ItemGroup> | ||
|
||
</Project> |