Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bugthesystem/caliburn.metro

A library that combines MahApps.Metro with Caliburn.Micro for Metro UI styled WPF applications.
https://github.com/bugthesystem/caliburn.metro

autofac c-sharp caliburn-micro metro-ui nuget wpf wpf-mahapps

Last synced: 9 days ago
JSON representation

A library that combines MahApps.Metro with Caliburn.Micro for Metro UI styled WPF applications.

Awesome Lists containing this project

README

        

Caliburn.Metro
==============

Library combines [MahApps.Metro](http://mahapps.com/MahApps.Metro/) and [Caliburn.Micro](http://caliburnmicro.codeplex.com/) for Metro UI styled WPF applications

It provides [Caliburn.Micro](http://caliburnmicro.codeplex.com/) **Bootstrapper** and [MahApps.Metro](http://mahapps.com/MahApps.Metro/) **MetroWindow** integrated **WindowManager**. Also project contains [Autofac](http://code.google.com/p/autofac/) **Bootstrapper** integration.

* [Nuget Package - Caliburn.Metro](https://nuget.org/packages/Caliburn.Metro)
* [Nuget Package - Caliburn.Metro.Autofac](https://nuget.org/packages/Caliburn.Metro.Autofac)

**Default Setup**
[Demo application](https://github.com/ziyasal/Caliburn.Metro/tree/master/Caliburn.Metro.Sample)
```csharp
//Basic AppBootstrapper
public class AppBootstrapper : CaliburnMetroCompositionBootstrapper
{

}

//AppWindowManager with custom Main window
[Export(typeof(IWindowManager))]
public class AppWindowManager : MetroWindowManager
{
public override MetroWindow CreateCustomWindow(object view, bool windowIsView)
{
if (windowIsView)
{
return view as MainWindowContainer;
}

return new MainWindowContainer
{
Content = view
};
}
}
```

**Autofac Bootstrapper Setup**
[Demo application](https://github.com/ziyasal/Caliburn.Metro/tree/master/Caliburn.Metro.Autofac.Sample)
```csharp
//Autofac AppBootstrapper
public class AppBootstrapper : CaliburnMetroAutofacBootstrapper
{
protected override void ConfigureContainer(ContainerBuilder builder)
{
builder.RegisterType().As().SingleInstance();
var assembly = typeof(AppViewModel).Assembly;
builder.RegisterAssemblyTypes(assembly)
.Where(item => item.Name.EndsWith("ViewModel") && item.IsAbstract == false)
.AsSelf()
.SingleInstance();
}
}

//AppWindowManager with custom Main window
public class AppWindowManager : MetroWindowManager
{
public override MetroWindow CreateCustomWindow(object view, bool windowIsView)
{
if (windowIsView)
{
return view as MainWindowContainer;
}
return new MainWindowContainer
{
Content = view
};
}
}
```

**License**

Code and documentation are available according to the Unlicense (see [LICENSE](https://github.com/ziyasal/Caliburn.Metro/blob/master/UNLICENSE)).