mirror of
https://github.com/holgerb83/ModernWpfPlayground.git
synced 2025-04-19 23:03:49 +02:00
removed warnings
This commit is contained in:
parent
ca000aac74
commit
d130364643
@ -21,6 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE. */
|
||||
|
||||
using System;
|
||||
|
||||
// ReSharper disable InheritdocConsiderUsage
|
||||
|
||||
#pragma warning disable 1591
|
||||
@ -31,7 +32,7 @@ using System;
|
||||
// ReSharper disable MemberCanBeProtected.Global
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace ModernWpfPlayground.Annotations
|
||||
namespace ModernWpfPlayground
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates that the value of the marked element could be <c>null</c> sometimes,
|
||||
|
@ -7,7 +7,6 @@ using System.Runtime.CompilerServices;
|
||||
using System.Text.Json;
|
||||
using System.Windows;
|
||||
using Microsoft.Win32;
|
||||
using ModernWpfPlayground.Annotations;
|
||||
|
||||
namespace ModernWpfPlayground
|
||||
{
|
||||
|
@ -2,11 +2,11 @@
|
||||
x:Class="ModernWpfPlayground.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:LsBricks.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:ModernWpfPlayground"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
xmlns:propertyPresenter2="clr-namespace:ModernWpfPlayground.PropertyPresenter2"
|
||||
x:Name="Window"
|
||||
Title="TaBEA 3.0.0"
|
||||
Width="1200"
|
||||
@ -210,17 +210,17 @@
|
||||
</TabItem>
|
||||
<TabItem Header="General" IsSelected="True">
|
||||
<ui:SimpleStackPanel Margin="5" Spacing="10">
|
||||
<controls:PropertyPresenter2
|
||||
<propertyPresenter2:PropertyPresenter2
|
||||
Command="{Binding ShowDialogCommand}"
|
||||
Label="Hello"
|
||||
Symbol="x³"
|
||||
Value="{Binding WelcomeMessage}" />
|
||||
<controls:PropertyPresenter2
|
||||
<propertyPresenter2:PropertyPresenter2
|
||||
Label="Hallo"
|
||||
Symbol="x²"
|
||||
Value="{Binding ValidationTest}" />
|
||||
<controls:PropertyPresenter2 Label="Hello" Value="{Binding BooleanValue}" />
|
||||
<controls:PropertyPresenter2 Label="Hello">
|
||||
<propertyPresenter2:PropertyPresenter2 Label="Hello" Value="{Binding BooleanValue}" />
|
||||
<propertyPresenter2:PropertyPresenter2 Label="Hello">
|
||||
<Slider
|
||||
AutoToolTipPlacement="TopLeft"
|
||||
Interval="1"
|
||||
@ -230,13 +230,13 @@
|
||||
TickFrequency="10"
|
||||
TickPlacement="BottomRight"
|
||||
Value="{Binding SliderTest}" />
|
||||
</controls:PropertyPresenter2>
|
||||
</propertyPresenter2:PropertyPresenter2>
|
||||
<ui:ProgressRing
|
||||
Width="{Binding SliderTest}"
|
||||
Height="{Binding SliderTest}"
|
||||
IsActive="{Binding BooleanValue}"
|
||||
Visibility="{Binding VisibilityEnumTest}" />
|
||||
<controls:PropertyPresenter2 Label="Visi" Value="{Binding VisibilityEnumTest}" />
|
||||
<propertyPresenter2:PropertyPresenter2 Label="Visi" Value="{Binding VisibilityEnumTest}" />
|
||||
</ui:SimpleStackPanel>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
@ -1,24 +1,9 @@
|
||||
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;
|
||||
|
||||
namespace ModernWpfPlayground
|
||||
namespace ModernWpfPlayground
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
public partial class MainWindow
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace LsBricks.Controls
|
||||
namespace ModernWpfPlayground.PropertyPresenter2
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts enums to a List with KeyValuePairs.
|
||||
|
@ -2,7 +2,7 @@
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace LsBricks.Controls
|
||||
namespace ModernWpfPlayground.PropertyPresenter2
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for <see cref="MagicSymbolControl"/>
|
||||
|
@ -1,5 +1,4 @@
|
||||
using LsBricks.ElementMVVM.Types;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
@ -9,7 +8,7 @@ using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace LsBricks.Controls
|
||||
namespace ModernWpfPlayground.PropertyPresenter2
|
||||
{
|
||||
/// <summary>
|
||||
/// Magically converts a text to
|
||||
|
@ -2,7 +2,7 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace LsBricks.Controls
|
||||
namespace ModernWpfPlayground.PropertyPresenter2
|
||||
{
|
||||
/// <summary>
|
||||
/// Selects the right template on base of value-type.
|
||||
|
@ -1,10 +1,10 @@
|
||||
<ContentControl
|
||||
x:Class="LsBricks.Controls.PropertyPresenter2"
|
||||
x:Class="ModernWpfPlayground.PropertyPresenter2.PropertyPresenter2"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:LsBricks.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:propertyPresenter2="clr-namespace:ModernWpfPlayground.PropertyPresenter2"
|
||||
x:Name="LayoutRoot"
|
||||
d:DesignHeight="300"
|
||||
d:DesignWidth="300"
|
||||
@ -16,13 +16,13 @@
|
||||
<ContentControl.Resources>
|
||||
<DataTemplate x:Key="DefaultDataTemplate">
|
||||
<Grid>
|
||||
<controls:TextBoxEx
|
||||
<propertyPresenter2:TextBoxEx
|
||||
x:Name="InputTextBox"
|
||||
Text="{Binding Value, ElementName=LayoutRoot}"
|
||||
Validation.ErrorTemplate="{DynamicResource ValidationErrorTemplate}"
|
||||
Validation.ValidationAdornerSiteFor="{Binding ElementName=LayoutRoot}">
|
||||
<TextBox.Style>
|
||||
<Style BasedOn="{StaticResource {x:Type TextBox}}" TargetType="{x:Type controls:TextBoxEx}">
|
||||
<Style BasedOn="{StaticResource {x:Type TextBox}}" TargetType="{x:Type propertyPresenter2:TextBoxEx}">
|
||||
<Setter Property="IsReadOnly" Value="True" />
|
||||
<Setter Property="UpdateBindingOnEnter" Value="False" />
|
||||
<Style.Triggers>
|
||||
@ -38,7 +38,7 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBox.Style>
|
||||
</controls:TextBoxEx>
|
||||
</propertyPresenter2:TextBoxEx>
|
||||
<TextBlock
|
||||
Margin="6,0,0,0"
|
||||
Padding="2,2,2,2"
|
||||
@ -86,7 +86,7 @@
|
||||
</CheckBox.Style>
|
||||
</CheckBox>
|
||||
</DataTemplate>
|
||||
<controls:EnumToKeyValueListConverter x:Key="EnumToKeyValuePairConverter" />
|
||||
<propertyPresenter2:EnumToKeyValueListConverter x:Key="EnumToKeyValuePairConverter" />
|
||||
<DataTemplate x:Key="EnumComboBoxDataTemplate">
|
||||
<ComboBox
|
||||
DisplayMemberPath="Key"
|
||||
@ -112,7 +112,7 @@
|
||||
</ComboBox.Style>
|
||||
</ComboBox>
|
||||
</DataTemplate>
|
||||
<controls:PropertyDataTemplateSelector
|
||||
<propertyPresenter2:PropertyDataTemplateSelector
|
||||
x:Key="DataTemplateSelector"
|
||||
BooleanDataTemplate="{StaticResource BooleanDataTemplate}"
|
||||
DefaultDataTemplate="{StaticResource DefaultDataTemplate}"
|
||||
@ -152,7 +152,7 @@
|
||||
VerticalAlignment="Center"
|
||||
Focusable="False"
|
||||
Text="{Binding Label, ElementName=LayoutRoot}" />
|
||||
<controls:MagicSymbolControl
|
||||
<propertyPresenter2:MagicSymbolControl
|
||||
x:Name="PartSymbol"
|
||||
Grid.Column="2"
|
||||
Margin="5,0"
|
||||
|
@ -3,7 +3,7 @@ using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace LsBricks.Controls
|
||||
namespace ModernWpfPlayground.PropertyPresenter2
|
||||
{
|
||||
/// <inheritdoc cref="ContentControl" />
|
||||
/// <summary>
|
||||
|
@ -2,7 +2,7 @@
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace LsBricks.Controls
|
||||
namespace ModernWpfPlayground.PropertyPresenter2
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
@ -38,7 +38,7 @@ namespace LsBricks.Controls
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="T:LsBricks.Controls.TextBoxEx" /> class.
|
||||
/// Initializes a new instance of the <see cref="T:ModernWpfPlayground.PropertyPresenter2.TextBoxEx" /> class.
|
||||
/// </summary>
|
||||
public TextBoxEx()
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace LsBricks.ElementMVVM.Types
|
||||
namespace ModernWpfPlayground.PropertyPresenter2
|
||||
{
|
||||
/// <summary>
|
||||
/// A component of the symbol
|
||||
|
@ -11,7 +11,7 @@ using Brushes = System.Windows.Media.Brushes;
|
||||
using FontFamily = System.Windows.Media.FontFamily;
|
||||
using Point = System.Windows.Point;
|
||||
|
||||
namespace LsBricks.Controls
|
||||
namespace ModernWpfPlayground.PropertyPresenter2
|
||||
{
|
||||
/// <summary>
|
||||
/// Makes an Bitmap from every Imageformat.
|
||||
@ -97,28 +97,4 @@ namespace LsBricks.Controls
|
||||
/// <inheritdoc />
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => Binding.DoNothing;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// negate double converter
|
||||
/// </summary>
|
||||
[ValueConversion(typeof(double), typeof(double))]
|
||||
public class NegateDoubleConverter : IValueConverter
|
||||
{
|
||||
/// <summary>Converts a value. </summary>
|
||||
/// <returns>A converted value. If the method returns null, the valid null value is used.</returns>
|
||||
/// <param name="value">The value produced by the binding source.</param>
|
||||
/// <param name="targetType">The type of the binding target property.</param>
|
||||
/// <param name="parameter">The converter parameter to use.</param>
|
||||
/// <param name="culture">The culture to use in the converter.</param>
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) =>
|
||||
value is double d ? -d : throw new ArgumentException(nameof(value) + " is not a doubles");
|
||||
|
||||
/// <summary>Converts a value. </summary>
|
||||
/// <returns>A converted value. If the method returns null, the valid null value is used.</returns>
|
||||
/// <param name="value">The value that is produced by the binding target.</param>
|
||||
/// <param name="targetType">The type to convert to.</param>
|
||||
/// <param name="parameter">The converter parameter to use.</param>
|
||||
/// <param name="culture">The culture to use in the converter.</param>
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => Binding.DoNothing;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user