ActionBehavior.Livet
0.2.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package ActionBehavior.Livet --version 0.2.0
NuGet\Install-Package ActionBehavior.Livet -Version 0.2.0
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="ActionBehavior.Livet" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ActionBehavior.Livet --version 0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ActionBehavior.Livet, 0.2.0"
#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.
// Install ActionBehavior.Livet as a Cake Addin #addin nuget:?package=ActionBehavior.Livet&version=0.2.0 // Install ActionBehavior.Livet as a Cake Tool #tool nuget:?package=ActionBehavior.Livet&version=0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ActionBehavior.Livet
https://github.com/basyura/ActionBehavior.Livet
Action Behavior for Livet.
Provides a function to easily call an action class from View (xaml).
License
MIT-License
NuGet
https://www.nuget.org/packages/ActionBehavior.Livet/
SetUp
- Install LivetCask.Mvvm and ActionBehavior.Livet by NuGet.
- Add an action resolver in your project.
using System.ComponentModel.Composition;
using ActionBehavior.Livet;
using Livet;
namespace Hoge
{
[Export(typeof(IActionResolver))]
public class ActionResolver : IActionResolver
{
public string Resolve(ViewModel vm, string action);
{
return $"Hoge.Actions.{action}"
}
}
}
- Add an action class.
using System;
using System.Threading.Tasks;
using Livet;
namespace Hoge
{
public class Hello : ActionCommand<ViewModel>
{
public override Task<bool> Execute(object sender, EventArgs evnt, object parameter)
{
System.Windows.MessageBox.Show("hello");
return OK;
}
}
}
- Call Excute on view (xaml)
<Window
・・・(略)・・・
xmlns:ab="clr-namespace:ActionBehavior.Livet;assembly=ActionBehavior.Livet"
<Button Content="Hello">
<i:Interactions.Triggers>
<i:EventTrigger EventName="Click">
<ab:Execute Action="Hello" />
</i:EventTrigger>
</i:Interactions.Triggers>
</Button>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8
- LivetCask.Mvvm (>= 4.0.2)
- Microsoft.Xaml.Behaviors.Wpf (>= 1.1.39)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.