Mar.Controls
0.7.1
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Framework 4.6.2
This package targets .NET Framework 4.6.2. The package is compatible with this framework or higher.
dotnet add package Mar.Controls --version 0.7.1
NuGet\Install-Package Mar.Controls -Version 0.7.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Mar.Controls" Version="0.7.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Mar.Controls" Version="0.7.1" />
<PackageReference Include="Mar.Controls" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Mar.Controls --version 0.7.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Mar.Controls, 0.7.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Mar.Controls@0.7.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Mar.Controls&version=0.7.1
#tool nuget:?package=Mar.Controls&version=0.7.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Mar.Controls
演示各种控件效果
水印

在App.xaml中引用资源字典:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Mar.Controls;component/Themes/Generic.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
在布局文件中使用:
<Grid>
...
<mar:Watermark Mark="Mar.Controls" FontSize="30" Angle="45" MarkMargin="10" MarkBrush="{DynamicResource SystemAccentColorLight3Brush}">
<Border BorderThickness="1" CornerRadius="4" />
</mar:Watermark>
...
</Grid>
环形进度

Don't forget to add a percent value resources in ViewModel:
<Grid>
...
<mar:CircularProgressBar Value="{Binding Percent}" />
...
</Grid>
调试窗口
将调试信息输出到窗口中,方便调试。

You should reference the following packages in your project:
<ItemGroup>
...
<PackageReference Include="Serilog" Version="3.0.1"/>
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0"/>
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0"/>
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0"/>
</ItemGroup>
Don't forget to config Serilog in App.cs:
private readonly string _file = Path.Combine("Log", "log.txt");
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Debug()
.WriteTo.Debug(outputTemplate: "{Timestamp:HH:mm:ss.fff} [{Level:u3}] {Message:l}{NewLine}{Exception}")
.WriteTo.Console(outputTemplate: "{Timestamp:HH:mm:ss.fff} [{Level:u3}] {Message:l}{NewLine}{Exception}")
.WriteTo.File(_file,
rollingInterval: RollingInterval.Day,
rollOnFileSizeLimit: true,
outputTemplate: "{Timestamp:HH:mm:ss.fff} [{Level:u3}] {Message:l}{NewLine}{Exception}")
.CreateLogger();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net8.0-windows was computed. net8.0-windows7.0 is compatible. net9.0-windows was computed. net9.0-windows7.0 is compatible. net10.0-windows was computed. |
| .NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.6.2
- Mar.Console (>= 0.9.0)
- System.Management (>= 9.0.8)
-
.NETFramework 4.7.2
- Mar.Console (>= 0.9.0)
- System.Management (>= 9.0.8)
-
.NETFramework 4.8.1
- Mar.Console (>= 0.9.0)
- System.Management (>= 9.0.8)
-
net6.0-windows7.0
- Mar.Console (>= 0.9.0)
- System.Management (>= 9.0.8)
-
net8.0-windows7.0
- Mar.Console (>= 0.9.0)
- System.Management (>= 9.0.8)
-
net9.0-windows7.0
- Mar.Console (>= 0.9.0)
- System.Management (>= 9.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.7.1 | 254 | 8/30/2025 |
| 0.7.0 | 232 | 8/29/2025 |
| 0.6.1 | 183 | 2/28/2025 |
| 0.6.0 | 169 | 2/28/2025 |
| 0.5.1 | 195 | 10/14/2024 |
| 0.5.0 | 159 | 7/29/2024 |
| 0.5.0-pre2 | 122 | 7/19/2024 |
| 0.5.0-pre1 | 134 | 7/19/2024 |
| 0.4.2 | 208 | 6/18/2024 |
| 0.4.1 | 223 | 4/5/2024 |
| 0.4.1-pre1 | 147 | 3/25/2024 |
| 0.4.0 | 228 | 2/29/2024 |
| 0.4.0-pre1 | 140 | 2/29/2024 |
| 0.3.8 | 264 | 1/4/2024 |
| 0.3.7 | 262 | 11/17/2023 |
| 0.3.6 | 184 | 11/15/2023 |
| 0.3.5 | 174 | 11/14/2023 |
| 0.3.4 | 211 | 10/27/2023 |
| 0.3.3 | 196 | 10/12/2023 |
| 0.3.2 | 191 | 10/12/2023 |
| 0.3.1 | 200 | 10/12/2023 |
| 0.3.0 | 198 | 10/12/2023 |
| 0.2.1 | 274 | 8/18/2023 |
| 0.2.0 | 260 | 7/28/2023 |
| 0.1.0 | 386 | 4/25/2022 |
1恢复ConsoleWindow初始出现在Owner左侧