Eleve 0.4.0

Ore Ore MVVM Framework

Install-Package Eleve -Version 0.4.0
dotnet add package Eleve --version 0.4.0
<PackageReference Include="Eleve" Version="0.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Eleve --version 0.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Eleve, 0.4.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Eleve as a Cake Addin
#addin nuget:?package=Eleve&version=0.4.0

// Install Eleve as a Cake Tool
#tool nuget:?package=Eleve&version=0.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Eleve

Livet Based OreOre Framework

(参考にして自分でアプリケーションが作りやすそうなフレームワークを作ってみましたの意)

Description

MVVM is so great. But so difficult and complex to build application.
Eleve is WPF Framwork not fussy about MVVM.

Livet

Livet is a very powerful MVVM Infrastructure for WPF

Install

ProjectTemplate

Files

EleveSample
├── Actions
│   ├── EleveSample
│   │   ├── EleveSampleActionBase.cs
│   │   ├── Initialize.cs
│   │   └── OpenItemSelector.cs
│   └── ItemSelector
│       ├── Initialize.cs
│       ├── ItemSelectorActionBase.cs
│       └── Notify.cs
├── Models
│   └── Person.cs
├── ViewModels
│   ├── EleveSampleViewModel.cs
│   └── ItemSelectorViewModel.cs
└── Views
    ├── EleveSampleView.xaml
    ├── EleveSampleView.xaml.cs
    ├── ItemSelectorView.xaml
    └── ItemSelectorView.xaml.cs

Call Action

Determined by ViewModel's name, namespace and Action name.

<Button Content="Open">
  <i:Interaction.Triggers>
    <i:EventTrigger EventName="Click">
      <ev:Execute Action="OpenItemSelector" />
    </i:EventTrigger>
  </i:Interaction.Triggers>
</Button>

Open Window

Open ItemSelectorView with param and callback.

OpenDialogWindow<ItemSelectorView>(param, (type, ret) => {
  ViewModel.Message = type.ToString() + " - " + ret;
});
 

Open ItemSelectorView with param and await.

WindowCloseResult ret = await OpenDialogWindowAsync<ItemSelectorView>(param);
ViewModel.Message = ret.Type.ToString() + " - " + ret.Result;

Close ItemSlectorView and notify param.

CloseWindow(WindowCloseType.OK, ViewModel.ID);

ThreadMode

Default mode is Foreground (in UI Thread). You can change to Background by class attribute.

[ThreadMode(ThreadMode.Background)]
public class Initialize : EleveSampleActionBase
{

If you want to change default mode from Foreground to Background in app, add setting to App.config.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  ・・・
  <appSettings>
    <add key= "Eleve.ThreadMode" value="Background"/>
  </appSettings>
 ・・・
</configuration>

License

zlib/libpngライセンスで提供しています。zlib/libpng ライセンスでは、ライブラリとしての利用に留めるのであれば再配布時にも著作権表示などの義務はありません。しかし、ソースコードを改変しての再配布にはその旨の明示が義務付けられます。

Eleve include Livet's code.

TODO

  • Broken English
  • Is License ok?
  • Input Validation

Eleve

Livet Based OreOre Framework

(参考にして自分でアプリケーションが作りやすそうなフレームワークを作ってみましたの意)

Description

MVVM is so great. But so difficult and complex to build application.
Eleve is WPF Framwork not fussy about MVVM.

Livet

Livet is a very powerful MVVM Infrastructure for WPF

Install

ProjectTemplate

Files

EleveSample
├── Actions
│   ├── EleveSample
│   │   ├── EleveSampleActionBase.cs
│   │   ├── Initialize.cs
│   │   └── OpenItemSelector.cs
│   └── ItemSelector
│       ├── Initialize.cs
│       ├── ItemSelectorActionBase.cs
│       └── Notify.cs
├── Models
│   └── Person.cs
├── ViewModels
│   ├── EleveSampleViewModel.cs
│   └── ItemSelectorViewModel.cs
└── Views
    ├── EleveSampleView.xaml
    ├── EleveSampleView.xaml.cs
    ├── ItemSelectorView.xaml
    └── ItemSelectorView.xaml.cs

Call Action

Determined by ViewModel's name, namespace and Action name.

<Button Content="Open">
  <i:Interaction.Triggers>
    <i:EventTrigger EventName="Click">
      <ev:Execute Action="OpenItemSelector" />
    </i:EventTrigger>
  </i:Interaction.Triggers>
</Button>

Open Window

Open ItemSelectorView with param and callback.

OpenDialogWindow<ItemSelectorView>(param, (type, ret) => {
  ViewModel.Message = type.ToString() + " - " + ret;
});
 

Open ItemSelectorView with param and await.

WindowCloseResult ret = await OpenDialogWindowAsync<ItemSelectorView>(param);
ViewModel.Message = ret.Type.ToString() + " - " + ret.Result;

Close ItemSlectorView and notify param.

CloseWindow(WindowCloseType.OK, ViewModel.ID);

ThreadMode

Default mode is Foreground (in UI Thread). You can change to Background by class attribute.

[ThreadMode(ThreadMode.Background)]
public class Initialize : EleveSampleActionBase
{

If you want to change default mode from Foreground to Background in app, add setting to App.config.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  ・・・
  <appSettings>
    <add key= "Eleve.ThreadMode" value="Background"/>
  </appSettings>
 ・・・
</configuration>

License

zlib/libpngライセンスで提供しています。zlib/libpng ライセンスでは、ライブラリとしての利用に留めるのであれば再配布時にも著作権表示などの義務はありません。しかし、ソースコードを改変しての再配布にはその旨の明示が義務付けられます。

Eleve include Livet's code.

TODO

  • Broken English
  • Is License ok?
  • Input Validation

Release Notes

beta version

Dependencies

This package has 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.

Version History

Version Downloads Last updated
0.4.0 318 5/15/2019
0.3.1 306 5/1/2019
0.3.0 308 4/29/2019
0.2.0 306 4/27/2019
0.1.4 325 4/13/2019
0.1.3 303 3/30/2019
0.1.2 306 3/24/2019
0.1.0 299 3/23/2019