tibel / caliburn.light Goto Github PK
View Code? Open in Web Editor NEWThe magic-free Caliburn.Light, a powerful framework designed for building applications across current XAML platforms.
License: MIT License
The magic-free Caliburn.Light, a powerful framework designed for building applications across current XAML platforms.
License: MIT License
object GetInstance(Type service, string key);
TService GetInstance<TService>(string key);
IEnumerable<object> GetAllInstances(Type service);
IEnumerable<TService> GetAllInstances<TService>();
object GetInstanceOrDefault(Type service, string key);
TService GetInstanceOrDefault<TService>(string key);
The WindowConductor
should be extended to handle activate/deactivate from view.
Window:
Activated
event should activate ViewModelDeactivated
event should deactivate ViewModel (when Window is closing this should be skipped)When work is outsourced to an async Task it should be possible:
Also it should be possible to add Tasks to this list by the user.
Wich means, no RootFrame gets set, and no INavigationService gets registered with the IoC container.
Features:
Similar to Caliburn.Micro ActionMessage
like Caliburn.Micro.ActionMessage uses MessageBinder.SpecialValues
Features:
Similar to Prism 5.0
ViewHelper.HasBinding(control, UIElement.IsEnabledProperty)
After switching from VS 2013 to VS 2015 my WP app begins to throw exceptions during runtime.
Here is a simplified code sample:
public class FooViewModel
{
private ICommand _barCommand;
public ICommand BarCommand
{
get
{
if (_BarCommand == null)
{
_barCommand = DelegateCommand
.For(this)
.Execute(viewModel => viewModel.Bar())
.Build();
}
return _fooCommand;
}
}
private void Bar()
{
}
}
Execute
method from the code above throws ArgumentException
with the message An instance method or closure cannot be used
in process of command building.
How to avoid of this issue?
only support WPA81 from now on
We need at max as many tasks as ThreadOptions and not one task per handler.
put into doc
folder
differentiate methods: not everything should be named AsCoTask
e.g.
/// <summary>
/// Dispatches exceptions to the UI context when the task threw an unhandled exception.
/// </summary>
/// <param name="task">The Task to be monitored.</param>
public static void DispatchExceptions(Task task)
{
task.ContinueWith(t => t.PropagateExceptionsTo(_synchronizationContext),
CancellationToken.None,
TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.OnlyOnFaulted,
TaskScheduler.Default);
}
As there is still an issue in Caliburn.Micro, implementing the same code makes no sense.
What happens when an exception is thrown in a handler method:
this should not be needed in most cases
Set IsInDesignTool and don't depend on TaskScheduler.FromCurrentSynchronisationContext()
Allow to react on multiple property change events
There has to be a better way than:
private static async void PropagateExceptions(Task task)
{
await task.ConfigureAwait(false);
}
used in:
DelegateCommand
EventAggregator
CallMethodAction
framework | symbols |
---|---|
net40 | NET |
sl5 | SILVERLIGHT;SL5 |
win8 | NETFX_CORE;WinRT |
net45 | NET;NET45 |
win81 | NETFX_CORE;WinRT;WinRT81 |
wp8 | SILVERLIGHT;WINDOWS_PHONE;WP8 |
wpa81 | NETFX_CORE;WinRT;WinRT81;WP81 |
framework | symbols |
---|---|
net45 | |
win81 | NETFX_CORE;WINDOWS_APP |
wp8 | SILVERLIGHT;WINDOWS_PHONE |
wpa81 | NETFX_CORE;WINDOWS_PHONE_APP |
when CanCloseAsync() takes more time the user can click on close button or or in task bar.
Then CanCloseAsync() should not be called a second time.
e.g. Bind
and ViewLocator
should directly use the XAML platform properties
see http://blog.galasoft.ch/posts/2009/09/detecting-design-time-mode-in-wpf-and-silverlight/
Following is missing:
The Weakly.MVVM
namespace contains some basic classes that are needed when building an MVVM framework. But it is not complete at all.
The most central part missing is:
How to attach some logic in the ViewModel to an event on a View elements (control)?
The Blend SDK includes:
ICommand
to an eventCaliburn.Micro extends the idea of CallMethodAction with its ActionMessage
. Similar did MVVM Light for InvokeCommandAction in EventToCommand
.
TODO:
A lambda expressen (closure with empty capture) is now an instance method on a compiler generated class. The class is decorated with [CompilerGenerated]
and [Serializable]
. But there is no guaranty that this will always be the case.
How to distinguis lambdas and closures now?
Features:
Similar to what Prism 5.0 does.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.