Reorganization of files

This commit is contained in:
Holger Börchers 2020-04-21 20:52:55 +02:00
parent 441d1d2010
commit a21110fba9
28 changed files with 79 additions and 48 deletions

View File

@ -2,11 +2,11 @@
x:Class="ModernWpfPlayground.MainWindow" x:Class="ModernWpfPlayground.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="http://wpflib.de/"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ModernWpfPlayground" xmlns:local="clr-namespace:ModernWpfPlayground"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/" xmlns:prism="http://prismlibrary.com/"
xmlns:propertyPresenter="clr-namespace:ModernWpfPlayground.PropertyPresenter"
xmlns:ui="http://schemas.modernwpf.com/2019" xmlns:ui="http://schemas.modernwpf.com/2019"
x:Name="Window" x:Name="Window"
Title="{Binding Title}" Title="{Binding Title}"
@ -159,6 +159,7 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border <Border
Grid.Column="0" Grid.Column="0"
Panel.ZIndex="1"
Background="#2C2C2C" Background="#2C2C2C"
BorderThickness="0"> BorderThickness="0">
<ui:SimpleStackPanel HorizontalAlignment="Center" Spacing="10"> <ui:SimpleStackPanel HorizontalAlignment="Center" Spacing="10">
@ -178,7 +179,10 @@
</Setter> </Setter>
</Style> </Style>
</ui:SimpleStackPanel.Resources> </ui:SimpleStackPanel.Resources>
<ui:ToggleSwitch Margin="0,5,0,0" IsOn="{Binding IsPaneOpen}" /> <ui:ToggleSwitch
Margin="0,5,0,0"
IsOn="{Binding IsPaneOpen}"
ToolTip="Show/hide element tree" />
<TextBlock <TextBlock
Cursor="Hand" Cursor="Hand"
FontSize="20" FontSize="20"
@ -193,6 +197,7 @@
</Border> </Border>
<ui:SplitView <ui:SplitView
Grid.Column="1" Grid.Column="1"
Panel.ZIndex="0"
BorderThickness="0" BorderThickness="0"
DisplayMode="Inline" DisplayMode="Inline"
IsPaneOpen="{Binding IsPaneOpen}" IsPaneOpen="{Binding IsPaneOpen}"
@ -230,23 +235,23 @@
</TabItem> </TabItem>
<TabItem Header="General" IsSelected="True"> <TabItem Header="General" IsSelected="True">
<ui:SimpleStackPanel Margin="5" Spacing="10"> <ui:SimpleStackPanel Margin="5" Spacing="10">
<propertyPresenter:PropertyPresenter Label="Theme Mode" Value="{Binding ThemeMode}" /> <controls:PropertyPresenter Label="Theme Mode" Value="{Binding ThemeMode}" />
<propertyPresenter:PropertyPresenter <controls:PropertyPresenter
Command="{Binding ShowDialogCommand}" Command="{Binding ShowDialogCommand}"
Label="Hello" Label="Hello"
Symbol="x³" Symbol="x³"
Value="{Binding WelcomeMessage}" /> Value="{Binding WelcomeMessage}" />
<propertyPresenter:PropertyPresenter <controls:PropertyPresenter
IsReadOnly="True" IsReadOnly="True"
Label="Hallo" Label="Hallo"
Symbol="x²" Symbol="x²"
Value="{Binding ValidationTest, UpdateSourceTrigger=PropertyChanged}" /> Value="{Binding ValidationTest, UpdateSourceTrigger=PropertyChanged}" />
<propertyPresenter:PropertyPresenter <controls:PropertyPresenter
Label="Good bye" Label="Good bye"
Symbol="x²" Symbol="x²"
Value="{Binding ValidationTest, UpdateSourceTrigger=PropertyChanged}" /> Value="{Binding ValidationTest, UpdateSourceTrigger=PropertyChanged}" />
<propertyPresenter:PropertyPresenter Label="Hello" Value="{Binding BooleanValue}" /> <controls:PropertyPresenter Label="Hello" Value="{Binding BooleanValue}" />
<propertyPresenter:PropertyPresenter Label="Hello"> <controls:PropertyPresenter Label="Hello">
<Slider <Slider
AutoToolTipPlacement="TopLeft" AutoToolTipPlacement="TopLeft"
Interval="1" Interval="1"
@ -256,13 +261,13 @@
TickFrequency="10" TickFrequency="10"
TickPlacement="BottomRight" TickPlacement="BottomRight"
Value="{Binding SliderTest}" /> Value="{Binding SliderTest}" />
</propertyPresenter:PropertyPresenter> </controls:PropertyPresenter>
<ui:ProgressRing <ui:ProgressRing
Width="{Binding SliderTest}" Width="{Binding SliderTest}"
Height="{Binding SliderTest}" Height="{Binding SliderTest}"
IsActive="{Binding BooleanValue}" IsActive="{Binding BooleanValue}"
Visibility="{Binding VisibilityEnumTest}" /> Visibility="{Binding VisibilityEnumTest}" />
<propertyPresenter:PropertyPresenter Label="Visi" Value="{Binding VisibilityEnumTest}" /> <controls:PropertyPresenter Label="Visi" Value="{Binding VisibilityEnumTest}" />
</ui:SimpleStackPanel> </ui:SimpleStackPanel>
</TabItem> </TabItem>
</TabControl> </TabControl>

View File

@ -16,4 +16,8 @@
<PackageReference Include="System.Drawing.Common" Version="4.7.0" /> <PackageReference Include="System.Drawing.Common" Version="4.7.0" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Controls\Controls.csproj" />
</ItemGroup>
</Project> </Project>

13
Controls/Controls.csproj Normal file
View File

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWPF>true</UseWPF>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,9 @@
using System;
using System.Runtime.InteropServices;
using System.Windows.Markup;
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]
[assembly: XmlnsDefinition("http://wpflib.de/", "Controls")]

View File

@ -5,7 +5,7 @@ using System.Globalization;
using System.Linq; using System.Linq;
using System.Windows.Data; using System.Windows.Data;
namespace ModernWpfPlayground.PropertyPresenter2 namespace Controls
{ {
/// <summary> /// <summary>
/// Converts enums to a List with KeyValuePairs. /// Converts enums to a List with KeyValuePairs.

View File

@ -2,7 +2,7 @@
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Markup; using System.Windows.Markup;
namespace ModernWpfPlayground.PropertyPresenter2 namespace Controls
{ {
/// <summary> /// <summary>
/// Interaction logic for <see cref="MagicSymbolControl"/> /// Interaction logic for <see cref="MagicSymbolControl"/>

View File

@ -7,8 +7,7 @@ using System.Windows.Controls;
using System.Windows.Data; using System.Windows.Data;
using System.Windows.Documents; using System.Windows.Documents;
using System.Windows.Media; using System.Windows.Media;
namespace Controls
namespace ModernWpfPlayground.PropertyPresenter2
{ {
/// <summary> /// <summary>
/// Magically converts a text to /// Magically converts a text to

View File

@ -2,7 +2,7 @@
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
namespace ModernWpfPlayground.PropertyPresenter2 namespace Controls
{ {
/// <summary> /// <summary>
/// Selects the right template on base of value-type. /// Selects the right template on base of value-type.

View File

@ -1,10 +1,10 @@
<ContentControl <ContentControl
x:Class="ModernWpfPlayground.PropertyPresenter.PropertyPresenter" x:Class="Controls.PropertyPresenter"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:propertyPresenter2="clr-namespace:ModernWpfPlayground.PropertyPresenter2" xmlns:controls="clr-namespace:Controls"
x:Name="LayoutRoot" x:Name="LayoutRoot"
d:DesignHeight="300" d:DesignHeight="300"
d:DesignWidth="300" d:DesignWidth="300"
@ -16,13 +16,13 @@
<ContentControl.Resources> <ContentControl.Resources>
<DataTemplate x:Key="DefaultDataTemplate"> <DataTemplate x:Key="DefaultDataTemplate">
<Grid> <Grid>
<propertyPresenter2:TextBoxEx <controls:TextBoxEx
x:Name="InputTextBox" x:Name="InputTextBox"
Text="{Binding Value, ElementName=LayoutRoot}" Text="{Binding Value, ElementName=LayoutRoot}"
Validation.ErrorTemplate="{DynamicResource ValidationErrorTemplate}" Validation.ErrorTemplate="{DynamicResource ValidationErrorTemplate}"
Validation.ValidationAdornerSiteFor="{Binding ElementName=LayoutRoot}"> Validation.ValidationAdornerSiteFor="{Binding ElementName=LayoutRoot}">
<TextBox.Style> <TextBox.Style>
<Style BasedOn="{StaticResource {x:Type TextBox}}" TargetType="{x:Type propertyPresenter2:TextBoxEx}"> <Style BasedOn="{StaticResource {x:Type TextBox}}" TargetType="{x:Type controls:TextBoxEx}">
<Setter Property="IsReadOnly" Value="True" /> <Setter Property="IsReadOnly" Value="True" />
<Setter Property="UpdateBindingOnEnter" Value="False" /> <Setter Property="UpdateBindingOnEnter" Value="False" />
<Style.Triggers> <Style.Triggers>
@ -38,7 +38,7 @@
</Style.Triggers> </Style.Triggers>
</Style> </Style>
</TextBox.Style> </TextBox.Style>
</propertyPresenter2:TextBoxEx> </controls:TextBoxEx>
<TextBlock <TextBlock
Margin="6,0,0,0" Margin="6,0,0,0"
Padding="2,2,2,2" Padding="2,2,2,2"
@ -86,7 +86,7 @@
</CheckBox.Style> </CheckBox.Style>
</CheckBox> </CheckBox>
</DataTemplate> </DataTemplate>
<propertyPresenter2:EnumToKeyValueListConverter x:Key="EnumToKeyValuePairConverter" /> <controls:EnumToKeyValueListConverter x:Key="EnumToKeyValuePairConverter" />
<DataTemplate x:Key="EnumComboBoxDataTemplate"> <DataTemplate x:Key="EnumComboBoxDataTemplate">
<ComboBox <ComboBox
DisplayMemberPath="Key" DisplayMemberPath="Key"
@ -112,7 +112,7 @@
</ComboBox.Style> </ComboBox.Style>
</ComboBox> </ComboBox>
</DataTemplate> </DataTemplate>
<propertyPresenter2:PropertyDataTemplateSelector <controls:PropertyDataTemplateSelector
x:Key="DataTemplateSelector" x:Key="DataTemplateSelector"
BooleanDataTemplate="{StaticResource BooleanDataTemplate}" BooleanDataTemplate="{StaticResource BooleanDataTemplate}"
DefaultDataTemplate="{StaticResource DefaultDataTemplate}" DefaultDataTemplate="{StaticResource DefaultDataTemplate}"
@ -152,7 +152,7 @@
VerticalAlignment="Center" VerticalAlignment="Center"
Focusable="False" Focusable="False"
Text="{Binding Label, ElementName=LayoutRoot}" /> Text="{Binding Label, ElementName=LayoutRoot}" />
<propertyPresenter2:MagicSymbolControl <controls:MagicSymbolControl
x:Name="PartSymbol" x:Name="PartSymbol"
Grid.Column="2" Grid.Column="2"
Margin="5,0" Margin="5,0"

View File

@ -3,7 +3,7 @@ using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Markup; using System.Windows.Markup;
namespace ModernWpfPlayground.PropertyPresenter namespace Controls
{ {
/// <inheritdoc cref="ContentControl" /> /// <inheritdoc cref="ContentControl" />
/// <summary> /// <summary>

View File

@ -2,7 +2,7 @@
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
namespace ModernWpfPlayground.PropertyPresenter2 namespace Controls
{ {
/// <inheritdoc /> /// <inheritdoc />
/// <summary> /// <summary>
@ -38,7 +38,7 @@ namespace ModernWpfPlayground.PropertyPresenter2
/// <inheritdoc /> /// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="T:ModernWpfPlayground.PropertyPresenter2.TextBoxEx" /> class. /// Initializes a new instance of the <see cref="T:Controls.TextBoxEx" /> class.
/// </summary> /// </summary>
public TextBoxEx() public TextBoxEx()
{ {

View File

@ -1,6 +1,6 @@
using System.Windows; using System.Windows;
namespace ModernWpfPlayground.PropertyPresenter2 namespace Controls
{ {
/// <summary> /// <summary>
/// A component of the symbol /// A component of the symbol

View File

@ -11,7 +11,7 @@ using Brushes = System.Windows.Media.Brushes;
using FontFamily = System.Windows.Media.FontFamily; using FontFamily = System.Windows.Media.FontFamily;
using Point = System.Windows.Point; using Point = System.Windows.Point;
namespace ModernWpfPlayground.PropertyPresenter2 namespace Controls
{ {
/// <summary> /// <summary>
/// Makes an Bitmap from every Imageformat. /// Makes an Bitmap from every Imageformat.

View File

@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=propertypresenter/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=controls_005Cpropertypresenter/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@ -1,34 +1,31 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio Version 16
VisualStudioVersion = 15.0.26124.0 VisualStudioVersion = 16.0.30002.166
MinimumVisualStudioVersion = 15.0.26124.0 MinimumVisualStudioVersion = 15.0.26124.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModernWpfPlayground", "ModernWpfPlayground.csproj", "{A3B7B9FC-947D-4FFD-9793-6779086F550D}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ModernWpfPlayground", "App\ModernWpfPlayground.csproj", "{E090F4BD-69CD-4D8B-A3A2-620DCE22AE29}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls", "Controls\Controls.csproj", "{3884FD41-5A46-4A67-A147-57C36F0059DC}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64 EndGlobalSection
Release|x86 = Release|x86 GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E090F4BD-69CD-4D8B-A3A2-620DCE22AE29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E090F4BD-69CD-4D8B-A3A2-620DCE22AE29}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E090F4BD-69CD-4D8B-A3A2-620DCE22AE29}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E090F4BD-69CD-4D8B-A3A2-620DCE22AE29}.Release|Any CPU.Build.0 = Release|Any CPU
{3884FD41-5A46-4A67-A147-57C36F0059DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3884FD41-5A46-4A67-A147-57C36F0059DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3884FD41-5A46-4A67-A147-57C36F0059DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3884FD41-5A46-4A67-A147-57C36F0059DC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
{A3B7B9FC-947D-4FFD-9793-6779086F550D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU SolutionGuid = {21075E5E-39D9-4681-91A0-D9E7E0BDBB85}
{A3B7B9FC-947D-4FFD-9793-6779086F550D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A3B7B9FC-947D-4FFD-9793-6779086F550D}.Debug|x64.ActiveCfg = Debug|Any CPU
{A3B7B9FC-947D-4FFD-9793-6779086F550D}.Debug|x64.Build.0 = Debug|Any CPU
{A3B7B9FC-947D-4FFD-9793-6779086F550D}.Debug|x86.ActiveCfg = Debug|Any CPU
{A3B7B9FC-947D-4FFD-9793-6779086F550D}.Debug|x86.Build.0 = Debug|Any CPU
{A3B7B9FC-947D-4FFD-9793-6779086F550D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A3B7B9FC-947D-4FFD-9793-6779086F550D}.Release|Any CPU.Build.0 = Release|Any CPU
{A3B7B9FC-947D-4FFD-9793-6779086F550D}.Release|x64.ActiveCfg = Release|Any CPU
{A3B7B9FC-947D-4FFD-9793-6779086F550D}.Release|x64.Build.0 = Release|Any CPU
{A3B7B9FC-947D-4FFD-9793-6779086F550D}.Release|x86.ActiveCfg = Release|Any CPU
{A3B7B9FC-947D-4FFD-9793-6779086F550D}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal