Mar.Controls 0.7.1

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" />
                    
Directory.Packages.props
<PackageReference Include="Mar.Controls" />
                    
Project file
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
                    
#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
                    
Install as a Cake Addin
#tool nuget:?package=Mar.Controls&version=0.7.1
                    
Install as a Cake Tool

Mar.Controls

latest version downloads

演示各种控件效果

水印

alternate text is missing from this package README image

在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>

环形进度

alternate text is missing from this package README image

Don't forget to add a percent value resources in ViewModel:

    <Grid>
        ...
        <mar:CircularProgressBar Value="{Binding Percent}" />
        ...
    </Grid>

调试窗口

将调试信息输出到窗口中,方便调试。

alternate text is missing from this package README image

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 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.

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左侧