Livet Based OreOre Framework
(参考にして自分でアプリケーションが作りやすそうなフレームワークを作ってみましたの意)
MVVM is so great. But so difficult and complex to build application.
Eleve is WPF Framwork not fussy about MVVM.
Livet is a very powerful MVVM Infrastructure for WPF
ProjectTemplate
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
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 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);
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>
zlib/libpngライセンスで提供しています。zlib/libpng ライセンスでは、ライブラリとしての利用に留めるのであれば再配布時にも著作権表示などの義務はありません。しかし、ソースコードを改変しての再配布にはその旨の明示が義務付けられます。
Eleve include Livet's code.
- Broken English
- Is License ok?
- Input Validation