xtone.ExtPackage
1.1.3
dotnet add package xtone.ExtPackage --version 1.1.3
NuGet\Install-Package xtone.ExtPackage -Version 1.1.3
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="xtone.ExtPackage" Version="1.1.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="xtone.ExtPackage" Version="1.1.3" />
<PackageReference Include="xtone.ExtPackage" />
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 xtone.ExtPackage --version 1.1.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: xtone.ExtPackage, 1.1.3"
#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 xtone.ExtPackage@1.1.3
#: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=xtone.ExtPackage&version=1.1.3
#tool nuget:?package=xtone.ExtPackage&version=1.1.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ExtPackage
个人积累常用WPF扩展功能包.
Installation
To install this package, run the following command in the Package Manager Console:
Install-Package xtone.ExtPackage
Features
- Styles 扩展标记, 可设置多个样式合并
- Ext.Triggers 事件触发器, 设置路由事件绑定命令触发器
- EventTrigger 绑定路由事件触发命令
- EventName 事件名称
- Command 绑定命令
- CommandParameter 命令参数
- PassEventArgsToCommand 是否传递路由参数到命令参数
- EventTrigger 绑定路由事件触发命令
Usage
- Styles 标记扩展
- Triggers 附加属性, 自定义事件触发器 ==EventTrigger== 集合容器
- EventTrigger 事件触发器实例
<Window.Resources>
<Style x:Key="btn" TargetType="{x:Type Button}">
<Setter Property="Padding" Value="12 6" />
<Setter Property="Margin" Value="0 5" />
<Setter Property="FontSize" Value="14" />
<Setter Property="BorderThickness" Value="1" />
</Style>
<Style x:Key="btn-success" TargetType="{x:Type Button}">
<Setter Property="BorderBrush" Value="#FF498E28"/>
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0, 0" EndPoint="0, 1">
<GradientStop Color="#FF5CCA42" Offset="0" />
<GradientStop Color="#FF39A22D" Offset="1" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="btn-lg" TargetType="{x:Type Button}">
<Setter Property="Padding" Value="16 10" />
<Setter Property="FontSize" Value="18" />
</Style>
</Window.Resources>
<StackPanel>
<WrapPanel>
<Button Style="{my:Styles btn btn-success btn-lg}" Content="Button - btn lg"/>
</WrapPanel>
<WrapPanel>
<Button Style="{StaticResource btn-success}" Content="Test-Triggers MouseDown">
<my:Ext.Triggers>
<my:EventTrigger EventName="TouchDown" Command="ApplicationCommands.Delete" PassEventArgsToCommand="True"/>
</my:Ext.Triggers>
</Button>
</WrapPanel>
</StackPanel>
| 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. net9.0-windows was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.