nullable reference types

This commit is contained in:
Holger Börchers 2020-08-31 20:37:32 +02:00
parent 8cd47a0252
commit ea1f34a39c
3 changed files with 12 additions and 9 deletions

View File

@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="FastMember" Version="1.5.0" />
<PackageReference Include="ModernWpfUI" Version="0.9.2-preview.200803.0" />
<PackageReference Include="ModernWpfUI" Version="0.9.2-preview.200831.1" />
<PackageReference Include="Prism.DryIoc" Version="8.0.0.1850-pre" />
<PackageReference Include="Prism.Wpf" Version="8.0.0.1850-pre" />
<PackageReference Include="YamlDotNet" Version="8.1.2" />

View File

@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ModernWpfUI" Version="0.9.2-preview.200803.0" />
<PackageReference Include="ModernWpfUI" Version="0.9.2-preview.200831.1" />
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
</ItemGroup>

View File

@ -85,7 +85,7 @@ namespace Controls
/// <summary>
/// Command.
/// </summary>
public ICommand Command
public ICommand? Command
{
get => (ICommand)GetValue(CommandProperty);
set => SetValue(CommandProperty, value);
@ -94,7 +94,7 @@ namespace Controls
/// <summary>
/// Command content.
/// </summary>
public object CommandContent
public object? CommandContent
{
get => GetValue(CommandContentProperty);
set => SetValue(CommandContentProperty, value);
@ -103,7 +103,7 @@ namespace Controls
/// <summary>
/// Command parameter.
/// </summary>
public object CommandParameter
public object? CommandParameter
{
get => GetValue(CommandParameterProperty);
set => SetValue(CommandParameterProperty, value);
@ -130,7 +130,7 @@ namespace Controls
/// <summary>
/// Label.
/// </summary>
public string Label
public string? Label
{
get => (string)GetValue(LabelProperty);
set => SetValue(LabelProperty, value);
@ -148,7 +148,7 @@ namespace Controls
/// <summary>
/// Symbol.
/// </summary>
public object Symbol
public object? Symbol
{
get => GetValue(SymbolProperty);
set => SetValue(SymbolProperty, value);
@ -157,7 +157,7 @@ namespace Controls
/// <summary>
/// Value.
/// </summary>
public object Value
public object? Value
{
get => GetValue(ValueProperty);
set => SetValue(ValueProperty, value);
@ -173,6 +173,9 @@ namespace Controls
}
/// <inheritdoc />
public override string ToString() => Value != null ? base.ToString() + " " + Value : base.ToString();
public override string ToString()
{
return $"{base.ToString()} {Value}";
}
}
}