mirror of
https://github.com/holgerb83/ModernWpfPlayground.git
synced 2025-04-18 22:43:50 +02:00
modified
This commit is contained in:
parent
c507cb5b4d
commit
441d1d2010
3
App.xaml
3
App.xaml
@ -3,13 +3,12 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dryIoc="http://prismlibrary.com/"
|
||||
xmlns:local="clr-namespace:ModernWpfPlayground"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<local:IntellisenseResourceDictionary Source="/ModernWpf;component/DesignTime/DesignTimeResources.xaml" />
|
||||
<ui:ThemeResources />
|
||||
<ui:IntellisenseResources Source="/ModernWpf;component/DesignTime/DesignTimeResources.xaml" />
|
||||
<ui:XamlControlsResources />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
|
@ -6,8 +6,8 @@
|
||||
xmlns:local="clr-namespace:ModernWpfPlayground"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
xmlns:propertyPresenter="clr-namespace:ModernWpfPlayground.PropertyPresenter"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
x:Name="Window"
|
||||
Title="{Binding Title}"
|
||||
Width="{Binding WindowWidth, Mode=TwoWay}"
|
||||
@ -155,47 +155,56 @@
|
||||
<Grid Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="40" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border
|
||||
Grid.Column="0"
|
||||
Background="#2C2C2C"
|
||||
BorderThickness="0">
|
||||
<StackPanel HorizontalAlignment="Center">
|
||||
<ui:SimpleStackPanel HorizontalAlignment="Center" Spacing="10">
|
||||
<ui:SimpleStackPanel.Resources>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="LayoutTransform">
|
||||
<Setter.Value>
|
||||
<RotateTransform Angle="-90" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="ui:ToggleSwitch">
|
||||
<Setter Property="LayoutTransform">
|
||||
<Setter.Value>
|
||||
<RotateTransform Angle="-90" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ui:SimpleStackPanel.Resources>
|
||||
<ui:ToggleSwitch Margin="0,5,0,0" IsOn="{Binding IsPaneOpen}" />
|
||||
<TextBlock
|
||||
Margin="0,10"
|
||||
Cursor="Hand"
|
||||
FontSize="20"
|
||||
Foreground="#F4F4F4"
|
||||
Text="Dummy active">
|
||||
<TextBlock.LayoutTransform>
|
||||
<RotateTransform Angle="270" />
|
||||
</TextBlock.LayoutTransform>
|
||||
</TextBlock>
|
||||
Text="Dummy active" />
|
||||
<TextBlock
|
||||
Margin="0,10"
|
||||
Cursor="Hand"
|
||||
FontSize="20"
|
||||
Foreground="#808080"
|
||||
Text="Dummy inactive">
|
||||
<TextBlock.LayoutTransform>
|
||||
<RotateTransform Angle="270" />
|
||||
</TextBlock.LayoutTransform>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
Text="Dummy inactive" />
|
||||
</ui:SimpleStackPanel>
|
||||
</Border>
|
||||
<TreeView
|
||||
<ui:SplitView
|
||||
Grid.Column="1"
|
||||
MinWidth="180"
|
||||
BorderThickness="0">
|
||||
BorderThickness="0"
|
||||
DisplayMode="Inline"
|
||||
IsPaneOpen="{Binding IsPaneOpen}"
|
||||
PanePlacement="Left">
|
||||
<ui:SplitView.Pane>
|
||||
<TreeViewItem Header="Root" IsExpanded="True">
|
||||
<TreeViewItem Header="Child1" />
|
||||
<TreeViewItem Header="Child2" />
|
||||
<TreeViewItem Header="Child3" />
|
||||
</TreeViewItem>
|
||||
</TreeView>
|
||||
<TabControl Grid.Column="2">
|
||||
</ui:SplitView.Pane>
|
||||
<TabControl>
|
||||
<TabItem Header="Bolt">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -254,10 +263,10 @@
|
||||
IsActive="{Binding BooleanValue}"
|
||||
Visibility="{Binding VisibilityEnumTest}" />
|
||||
<propertyPresenter:PropertyPresenter Label="Visi" Value="{Binding VisibilityEnumTest}" />
|
||||
<TextBox Text="Dummy" />
|
||||
</ui:SimpleStackPanel>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</ui:SplitView>
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</Window>
|
@ -18,6 +18,7 @@ namespace ModernWpfPlayground
|
||||
private string _title = AppName;
|
||||
private readonly ISerializer _serializer;
|
||||
private readonly IDeserializer _deserializer;
|
||||
private bool _isPaneOpen = true;
|
||||
|
||||
public MainWindowViewModel()
|
||||
{
|
||||
@ -105,6 +106,12 @@ namespace ModernWpfPlayground
|
||||
set => SetProperty(value);
|
||||
}
|
||||
|
||||
public bool IsPaneOpen
|
||||
{
|
||||
get => _isPaneOpen;
|
||||
set => SetProperty(ref _isPaneOpen, value);
|
||||
}
|
||||
|
||||
private static void SetTheme(ThemeMode themeMode)
|
||||
{
|
||||
ThemeManager.Current.ApplicationTheme = themeMode switch
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FastMember" Version="1.5.0" />
|
||||
<PackageReference Include="ModernWpfUI" Version="0.8.2" />
|
||||
<PackageReference Include="ModernWpfUI" Version="0.8.3" />
|
||||
<PackageReference Include="Prism.DryIoc" Version="7.2.0.1422" />
|
||||
<PackageReference Include="Prism.Wpf" Version="7.2.0.1422" />
|
||||
<PackageReference Include="YamlDotNet" Version="8.1.0" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user