chore: Make several control dependency properties public.

Add VSCode debug/tasks configs for running/building the demo across multiple .NET frameworks (.vscode/launch.json, .vscode/tasks.json). Update HandyControl_Net_GE45.csproj PreBuild target to run only for cross-targeting builds. Change access modifiers on multiple dependency properties and related CLR properties across shared controls (ColorPicker, ImageViewer, NumericUpDown, TimeBar, PopupWindow) to expose the DP fields publicly while making setters internal where appropriate to restrict external mutation. Also make SideMenuItem.Role setter public. These changes expose select properties for external use and adjust build/debug convenience for development.
This commit is contained in:
NaBian committed 2026-05-27 22:46:31 +08:00
1 parent 1c2e1848b5
commit 2ea451fe82
9 files changed
+501 -36

No files matched your search

+195
View File
@@ -0,0 +1,195 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run HandyControlDemo (netcoreapp3.0)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "netcoreapp3.0"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (netcoreapp3.1)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "netcoreapp3.1"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net45)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net45"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net451)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net451"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net452)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net452"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net46)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net46"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net461)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net461"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net462)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net462"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net47)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net47"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net471)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net471"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net472)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net472"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net48)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net48"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net481)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net481"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net5.0-windows)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net5.0-windows"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net6.0-windows)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net6.0-windows"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net7.0-windows)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net7.0-windows"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net8.0-windows)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net8.0-windows"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net9.0-windows)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net9.0-windows"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Run HandyControlDemo (net10.0-windows)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run", "--project", "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj", "-f", "net10.0-windows"],
"cwd": "${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45",
"console": "integratedTerminal",
"stopAtEntry": false
}
]
}
+270
View File
@@ -0,0 +1,270 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build-hcdemo-all-frameworks",
"type": "shell",
"command": "dotnet",
"args": [
"build",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-c",
"Debug",
"-v",
"minimal"
],
"problemMatcher": "$msCompile",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "run-hcdemo-net10.0-windows",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net10.0-windows"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-netcoreapp3.0",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"netcoreapp3.0"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-netcoreapp3.1",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"netcoreapp3.1"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-net45",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net45"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-net451",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net451"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-net452",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net452"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-net46",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net46"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-net461",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net461"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-net462",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net462"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-net47",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net47"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-net471",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net471"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-net472",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net472"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-net48",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net48"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-net481",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net481"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-net5.0-windows",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net5.0-windows"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-net6.0-windows",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net6.0-windows"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-net7.0-windows",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net7.0-windows"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-net8.0-windows",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net8.0-windows"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-hcdemo-net9.0-windows",
"type": "shell",
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj",
"-f",
"net9.0-windows"
],
"problemMatcher": "$msCompile"
}
]
}
@@ -167,7 +167,7 @@
<Link>Resources\Images\GlowWindow\topright.png</Link>
</Resource>
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Target Name="PreBuild" BeforeTargets="Build" Condition="'$(IsCrossTargetingBuild)' == 'true'">
<Exec Command="..\..\Shared\HandyControl_Shared\Themes\XamlCombine.exe ..\..\Shared\HandyControl_Shared\Themes\Theme_GE45.txt Theme.xaml" />
</Target>
</Project>
@@ -299,22 +299,22 @@ public class ColorPicker : Control, ISingleOpen
set => SetValue(SelectedBrushProperty, value);
}
internal static readonly DependencyProperty SelectedBrushWithoutOpacityProperty = DependencyProperty.Register(
public static readonly DependencyProperty SelectedBrushWithoutOpacityProperty = DependencyProperty.Register(
nameof(SelectedBrushWithoutOpacity), typeof(SolidColorBrush), typeof(ColorPicker), new PropertyMetadata(Brushes.White));
internal SolidColorBrush SelectedBrushWithoutOpacity
public SolidColorBrush SelectedBrushWithoutOpacity
{
get => (SolidColorBrush) GetValue(SelectedBrushWithoutOpacityProperty);
set => SetValue(SelectedBrushWithoutOpacityProperty, value);
internal set => SetValue(SelectedBrushWithoutOpacityProperty, value);
}
internal static readonly DependencyProperty BackColorProperty = DependencyProperty.Register(
public static readonly DependencyProperty BackColorProperty = DependencyProperty.Register(
nameof(BackColor), typeof(SolidColorBrush), typeof(ColorPicker), new PropertyMetadata(Brushes.Red));
internal SolidColorBrush BackColor
public SolidColorBrush BackColor
{
get => (SolidColorBrush) GetValue(BackColorProperty);
set => SetValue(BackColorProperty, value);
internal set => SetValue(BackColorProperty, value);
}
internal static readonly DependencyProperty ShowListProperty = DependencyProperty.Register(
@@ -237,7 +237,7 @@ public class ImageViewer : Control, IDisposable
internal static readonly DependencyProperty ImgSizeProperty = DependencyProperty.Register(
nameof(ImgSize), typeof(long), typeof(ImageViewer), new PropertyMetadata(-1L));
internal static readonly DependencyProperty ShowFullScreenButtonProperty = DependencyProperty.Register(
public static readonly DependencyProperty ShowFullScreenButtonProperty = DependencyProperty.Register(
nameof(ShowFullScreenButton), typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
internal static readonly DependencyProperty ShowCloseButtonProperty = DependencyProperty.Register(
@@ -246,25 +246,25 @@ public class ImageViewer : Control, IDisposable
internal static readonly DependencyProperty ImageContentProperty = DependencyProperty.Register(
nameof(ImageContent), typeof(object), typeof(ImageViewer), new PropertyMetadata(default(object)));
internal static readonly DependencyProperty ImageMarginProperty = DependencyProperty.Register(
public static readonly DependencyProperty ImageMarginProperty = DependencyProperty.Register(
nameof(ImageMargin), typeof(Thickness), typeof(ImageViewer), new PropertyMetadata(default(Thickness)));
internal static readonly DependencyProperty ImageWidthProperty = DependencyProperty.Register(
public static readonly DependencyProperty ImageWidthProperty = DependencyProperty.Register(
nameof(ImageWidth), typeof(double), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.Double0Box));
internal static readonly DependencyProperty ImageHeightProperty = DependencyProperty.Register(
public static readonly DependencyProperty ImageHeightProperty = DependencyProperty.Register(
nameof(ImageHeight), typeof(double), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.Double0Box));
internal static readonly DependencyProperty ImageScaleProperty = DependencyProperty.Register(
nameof(ImageScale), typeof(double), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.Double1Box, OnImageScaleChanged));
internal static readonly DependencyProperty ScaleStrProperty = DependencyProperty.Register(
public static readonly DependencyProperty ScaleStrProperty = DependencyProperty.Register(
nameof(ScaleStr), typeof(string), typeof(ImageViewer), new PropertyMetadata("100%"));
internal static readonly DependencyProperty ImageRotateProperty = DependencyProperty.Register(
nameof(ImageRotate), typeof(double), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.Double0Box));
internal static readonly DependencyProperty ShowSmallImgInternalProperty = DependencyProperty.Register(
public static readonly DependencyProperty ShowSmallImgInternalProperty = DependencyProperty.Register(
nameof(ShowSmallImgInternal), typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
public bool IsFullScreen
@@ -326,28 +326,28 @@ public class ImageViewer : Control, IDisposable
/// <summary>
/// 是否显示全屏按钮
/// </summary>
internal bool ShowFullScreenButton
public bool ShowFullScreenButton
{
get => (bool) GetValue(ShowFullScreenButtonProperty);
set => SetValue(ShowFullScreenButtonProperty, ValueBoxes.BooleanBox(value));
internal set => SetValue(ShowFullScreenButtonProperty, ValueBoxes.BooleanBox(value));
}
internal Thickness ImageMargin
public Thickness ImageMargin
{
get => (Thickness) GetValue(ImageMarginProperty);
set => SetValue(ImageMarginProperty, value);
internal set => SetValue(ImageMarginProperty, value);
}
internal double ImageWidth
public double ImageWidth
{
get => (double) GetValue(ImageWidthProperty);
set => SetValue(ImageWidthProperty, value);
internal set => SetValue(ImageWidthProperty, value);
}
internal double ImageHeight
public double ImageHeight
{
get => (double) GetValue(ImageHeightProperty);
set => SetValue(ImageHeightProperty, value);
internal set => SetValue(ImageHeightProperty, value);
}
internal double ImageScale
@@ -356,10 +356,10 @@ public class ImageViewer : Control, IDisposable
set => SetValue(ImageScaleProperty, value);
}
internal string ScaleStr
public string ScaleStr
{
get => (string) GetValue(ScaleStrProperty);
set => SetValue(ScaleStrProperty, value);
internal set => SetValue(ScaleStrProperty, value);
}
internal double ImageRotate
@@ -368,10 +368,10 @@ public class ImageViewer : Control, IDisposable
set => SetValue(ImageRotateProperty, value);
}
internal bool ShowSmallImgInternal
public bool ShowSmallImgInternal
{
get => (bool) GetValue(ShowSmallImgInternalProperty);
set => SetValue(ShowSmallImgInternalProperty, ValueBoxes.BooleanBox(value));
internal set => SetValue(ShowSmallImgInternalProperty, ValueBoxes.BooleanBox(value));
}
/// <summary>
@@ -387,10 +387,10 @@ public class ImageViewer : Control, IDisposable
/// <summary>
/// 关闭按钮是否显示中
/// </summary>
internal bool ShowCloseButton
public bool ShowCloseButton
{
get => (bool) GetValue(ShowCloseButtonProperty);
set => SetValue(ShowCloseButtonProperty, ValueBoxes.BooleanBox(value));
internal set => SetValue(ShowCloseButtonProperty, ValueBoxes.BooleanBox(value));
}
/// <summary>
@@ -312,13 +312,13 @@ public class NumericUpDown : Control
/// <summary>
/// 是否显示上下调值按钮
/// </summary>
internal static readonly DependencyProperty ShowUpDownButtonProperty = DependencyProperty.Register(
public static readonly DependencyProperty ShowUpDownButtonProperty = DependencyProperty.Register(
nameof(ShowUpDownButton), typeof(bool), typeof(NumericUpDown), new PropertyMetadata(ValueBoxes.TrueBox));
/// <summary>
/// 是否显示上下调值按钮
/// </summary>
internal bool ShowUpDownButton
public bool ShowUpDownButton
{
get => (bool) GetValue(ShowUpDownButtonProperty);
set => SetValue(ShowUpDownButtonProperty, ValueBoxes.BooleanBox(value));
@@ -111,7 +111,7 @@ public class SideMenuItem : HeaderedSimpleItemsControl, ISelectable, ICommandSou
public SideMenuItemRole Role
{
get => (SideMenuItemRole) GetValue(RoleProperty);
internal set => SetValue(RoleProperty, value);
set => SetValue(RoleProperty, value);
}
protected override DependencyObject GetContainerForItemOverride() => new SideMenuItem();
@@ -94,16 +94,16 @@ public class TimeBar : Control
/// <summary>
/// 刻度字符串
/// </summary>
internal static readonly DependencyProperty SpeStrProperty = DependencyProperty.Register(
public static readonly DependencyProperty SpeStrProperty = DependencyProperty.Register(
nameof(SpeStr), typeof(string), typeof(TimeBar), new PropertyMetadata(Properties.Langs.Lang.Interval1h));
/// <summary>
/// 刻度字符串
/// </summary>
internal string SpeStr
public string SpeStr
{
get => (string) GetValue(SpeStrProperty);
set => SetValue(SpeStrProperty, value);
internal set => SetValue(SpeStrProperty, value);
}
/// <summary>
@@ -55,13 +55,13 @@ public class PopupWindow : System.Windows.Window
}
}
internal static readonly DependencyProperty ContentStrProperty = DependencyProperty.Register(
public static readonly DependencyProperty ContentStrProperty = DependencyProperty.Register(
nameof(ContentStr), typeof(string), typeof(PopupWindow), new PropertyMetadata(default(string)));
internal string ContentStr
public string ContentStr
{
get => (string) GetValue(ContentStrProperty);
set => SetValue(ContentStrProperty, value);
internal set => SetValue(ContentStrProperty, value);
}
private bool IsDialog { get; set; }