file-scoped namespaces and update of modernwpfui

This commit is contained in:
Holger Börchers 2022-10-22 13:26:01 +02:00
parent 02e3af3dcb
commit 644e2628e3
10 changed files with 638 additions and 647 deletions

View File

@ -14,9 +14,9 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="FastMember" Version="1.5.0" /> <PackageReference Include="FastMember" Version="1.5.0" />
<PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="1.1.0" /> <PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="1.1.0" />
<PackageReference Include="ModernWpfUis" Version="1.2.0" /> <PackageReference Include="ModernWpfUI" Version="0.9.7-preview.2" />
<PackageReference Include="MvvmGen" Version="1.1.2" /> <PackageReference Include="MvvmGen" Version="1.1.5" />
<PackageReference Include="YamlDotNet" Version="11.2.1" /> <PackageReference Include="YamlDotNet" Version="12.0.2" />
<PackageReference Include="MahApps.Metro.IconPacks.FontAwesome" Version="4.11.0" /> <PackageReference Include="MahApps.Metro.IconPacks.FontAwesome" Version="4.11.0" />
</ItemGroup> </ItemGroup>

View File

@ -1,8 +1,8 @@
using System; using System;
using System.Windows.Media; using System.Windows.Media;
namespace ModernWpfPlayground.Types namespace ModernWpfPlayground.Types;
{
public enum AccentColors public enum AccentColors
{ {
Green, Green,
@ -27,4 +27,3 @@ namespace ModernWpfPlayground.Types
}; };
} }
} }
}

View File

@ -6,8 +6,8 @@ using System.Linq;
using System.Windows.Data; using System.Windows.Data;
using System.Windows.Markup; using System.Windows.Markup;
namespace Controls namespace Controls;
{
/// <summary> /// <summary>
/// Converts enums to a List with KeyValuePairs. /// Converts enums to a List with KeyValuePairs.
/// </summary> /// </summary>
@ -46,4 +46,3 @@ namespace Controls
public override object ProvideValue(IServiceProvider serviceProvider) => _converter ??= new EnumToItemSourceConverter(); public override object ProvideValue(IServiceProvider serviceProvider) => _converter ??= new EnumToItemSourceConverter();
} }
}

View File

@ -2,8 +2,8 @@
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Markup; using System.Windows.Markup;
namespace Controls namespace Controls;
{
/// <summary> /// <summary>
/// Interaction logic for <see cref="MagicSymbolControl"/> /// Interaction logic for <see cref="MagicSymbolControl"/>
/// </summary> /// </summary>
@ -40,4 +40,3 @@ namespace Controls
Focusable = false; Focusable = false;
} }
} }
}

View File

@ -8,8 +8,8 @@ using System.Windows.Data;
using System.Windows.Documents; using System.Windows.Documents;
using System.Windows.Media; using System.Windows.Media;
namespace Controls namespace Controls;
{
/// <summary> /// <summary>
/// Magically converts a text to /// Magically converts a text to
/// </summary> /// </summary>
@ -149,4 +149,3 @@ namespace Controls
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
=> Binding.DoNothing; => Binding.DoNothing;
} }
}

View File

@ -2,8 +2,8 @@
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
namespace Controls namespace Controls;
{
/// <summary> /// <summary>
/// Selects the right template on base of value-type. /// Selects the right template on base of value-type.
/// </summary> /// </summary>
@ -36,4 +36,3 @@ namespace Controls
}; };
} }
} }
}

View File

@ -3,8 +3,8 @@ using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Markup; using System.Windows.Markup;
namespace Controls namespace Controls;
{
/// <inheritdoc cref="ContentControl" /> /// <inheritdoc cref="ContentControl" />
/// <summary> /// <summary>
/// Interaction logic for PropertyPresenter.xaml /// Interaction logic for PropertyPresenter.xaml
@ -178,4 +178,3 @@ namespace Controls
return $"{base.ToString()} {Value}"; return $"{base.ToString()} {Value}";
} }
} }
}

View File

@ -2,8 +2,8 @@
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
namespace Controls namespace Controls;
{
/// <inheritdoc /> /// <inheritdoc />
/// <summary> /// <summary>
/// Represents a TextBox that can update the binding on enter. /// Represents a TextBox that can update the binding on enter.
@ -15,26 +15,26 @@ namespace Controls
/// </summary> /// </summary>
public static readonly DependencyProperty MoveFocusOnEnterProperty = public static readonly DependencyProperty MoveFocusOnEnterProperty =
DependencyProperty.Register( DependencyProperty.Register(
"MoveFocusOnEnter", typeof(bool), typeof(TextBoxEx), new UIPropertyMetadata(true)); nameof(MoveFocusOnEnter), typeof(bool), typeof(TextBoxEx), new UIPropertyMetadata(true));
/// <summary> /// <summary>
/// Identifies the <see cref="UpdateBindingOnEnter"/> dependency property. /// Identifies the <see cref="UpdateBindingOnEnter"/> dependency property.
/// </summary> /// </summary>
public static readonly DependencyProperty UpdateBindingOnEnterProperty = public static readonly DependencyProperty UpdateBindingOnEnterProperty =
DependencyProperty.Register( DependencyProperty.Register(
"UpdateBindingOnEnter", typeof(bool), typeof(TextBoxEx), new UIPropertyMetadata(true)); nameof(UpdateBindingOnEnter), typeof(bool), typeof(TextBoxEx), new UIPropertyMetadata(true));
/// <summary> /// <summary>
/// Identifies the <see cref="ScrollToHomeOnFocus"/> dependency property. /// Identifies the <see cref="ScrollToHomeOnFocus"/> dependency property.
/// </summary> /// </summary>
public static readonly DependencyProperty ScrollToHomeOnFocusProperty = public static readonly DependencyProperty ScrollToHomeOnFocusProperty =
DependencyProperty.Register("ScrollToHomeOnFocus", typeof(bool), typeof(TextBoxEx), new PropertyMetadata(true)); DependencyProperty.Register(nameof(ScrollToHomeOnFocus), typeof(bool), typeof(TextBoxEx), new PropertyMetadata(true));
/// <summary> /// <summary>
/// Identifies the <see cref="SelectAllOnFocus"/> dependency property. /// Identifies the <see cref="SelectAllOnFocus"/> dependency property.
/// </summary> /// </summary>
public static readonly DependencyProperty SelectAllOnFocusProperty = public static readonly DependencyProperty SelectAllOnFocusProperty =
DependencyProperty.Register("SelectAllOnFocus", typeof(bool), typeof(TextBoxEx), new PropertyMetadata(true)); DependencyProperty.Register(nameof(SelectAllOnFocus), typeof(bool), typeof(TextBoxEx), new PropertyMetadata(true));
/// <inheritdoc /> /// <inheritdoc />
/// <summary> /// <summary>
@ -162,4 +162,3 @@ namespace Controls
e.Handled = true; e.Handled = true;
} }
} }
}

View File

@ -1,7 +1,7 @@
using System.Windows; using System.Windows;
namespace Controls namespace Controls;
{
/// <summary> /// <summary>
/// A component of the symbol /// A component of the symbol
/// </summary> /// </summary>
@ -28,4 +28,3 @@ namespace Controls
/// </summary> /// </summary>
public readonly BaselineAlignment Style; public readonly BaselineAlignment Style;
} }
}

View File

@ -11,8 +11,8 @@ 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 Controls namespace Controls;
{
/// <summary> /// <summary>
/// Makes an Bitmap from every Imageformat. /// Makes an Bitmap from every Imageformat.
/// </summary> /// </summary>
@ -97,4 +97,3 @@ namespace Controls
/// <inheritdoc /> /// <inheritdoc />
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => Binding.DoNothing; public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => Binding.DoNothing;
} }
}