Stylet/README.md

82 lines
3.7 KiB
Markdown
Raw Normal View History

2015-10-29 03:15:43 -07:00
![Project Icon](StyletIcon.png) Stylet
======================================
2014-03-21 06:50:27 -07:00
2015-10-29 03:08:50 -07:00
[![NuGet](https://img.shields.io/nuget/v/Stylet.svg)](https://www.nuget.org/packages/Stylet/)
2015-10-24 08:43:50 -07:00
[![Build status](https://ci.appveyor.com/api/projects/status/nqucthach0x6gkil?svg=true)](https://ci.appveyor.com/project/canton7/stylet)
2014-04-19 03:57:24 -07:00
Introduction
------------
2014-03-21 06:50:27 -07:00
2019-09-22 09:11:04 -07:00
Stylet is a small but powerful ViewModel-first MVVM framework for WPF (.NET 4.5+ and .NET Core 3.0+), which allows you to write maintainable and extensible code in a way which is easy to test.
Stylet's aims are to:
2014-05-27 04:53:17 -07:00
2014-05-29 08:06:55 -07:00
- Solve the blockers, niggles, and annoyances which hamper MVVM development without a framework, using simple but powerful concepts.
2014-05-27 04:53:17 -07:00
- Be obvious to people picking up your project for the first time: there's very little magic
- Be easy to verify/validate. The LOC count is low, and it comes with a very comprehensive test suite. The code is well-written and well-documented.
- Be flexible while providing sensible defaults. Almost any part of the framework can be overridden if you wish, but you probably won't want to.
2016-05-10 13:04:31 -07:00
It is inspired by [Caliburn.Micro](http://caliburnmicro.com/), and shares many of its concepts, but removes most of the magic (replacing it with more powerful alternatives), and simplifies parts considerably by targeting only MVVM, WPF and .NET 4.5.
2014-05-27 04:53:17 -07:00
2015-12-21 09:37:54 -08:00
Getting Started
---------------
2014-05-27 04:53:17 -07:00
2019-09-22 09:11:04 -07:00
### .NET Framework
For .NET Framework projects, the quickest way to get started is to create a new "WPF Application" project, then install the NuGet package [Stylet.Start](https://www.nuget.org/packages/Stylet.Start).
2015-12-21 09:37:54 -08:00
This will install Stylet, and set up a simple skeleton project.
2014-04-19 03:57:24 -07:00
2015-12-21 09:37:54 -08:00
See [Quick Start](https://github.com/canton7/Stylet/wiki/Quick-Start) for more details.
2014-04-19 03:57:24 -07:00
2015-12-21 09:37:54 -08:00
If you want to set up your project manually, install the [Stylet](https://www.nuget.org/packages/Stylet) package, then follow the instructions in the [Quick Start](https://github.com/canton7/Stylet/wiki/Quick-Start).
2014-04-19 03:57:24 -07:00
2015-12-21 09:37:54 -08:00
Stylet requires .NET 4.5 (Visual Studio 2012 or higher).
2014-04-19 03:57:24 -07:00
2019-09-22 09:11:04 -07:00
### .NET Core
2019-09-25 04:36:16 -07:00
For .NET Core projects, the quickest way to get started is by using `dotnet new` with Stylet's template.
Open a command window where you want to create your new project, and install the Stylet templates using:
```
dotnet new -i Stylet.Templates
```
Then create a new project with:
```
dotnet new stylet -o MyStyletProject`
```
(changing `MyStyletProject` as appropriate).
If you want to set up your project manually, install the [Stylet](https://www.nuget.org/packages/Stylet) package, then follow the instructions in the [Quick Start](https://github.com/canton7/Stylet/wiki/Quick-Start).
2019-09-22 09:11:04 -07:00
Stylet requires .NET Core 3.0.
2014-04-19 03:57:24 -07:00
2016-01-19 08:16:32 -08:00
Documentation
-------------
[The Wiki is the documentation source](https://github.com/canton7/Stylet/wiki).
There's loads of information there - go and have a look, or start with the [Quick Start](https://github.com/canton7/Stylet/wiki/Quick-Start).
2015-12-21 09:37:54 -08:00
Symbols
------
2014-04-19 03:57:24 -07:00
2019-09-22 09:11:04 -07:00
The source is also available when you are debugging, using [Source Link](https://github.com/dotnet/sourcelink).
2015-06-02 11:47:14 -07:00
Go to Debug -> Options and Settings -> General, and make the following changes:
- Turn **off** "Enable Just My Code"
2019-09-22 09:11:04 -07:00
- Turn **on** "Enable Source Link support"
- Turn **off** "Enable .NET Framework source stepping". Yes, it is misleading, but if you don't, then Visual Studio will ignore your custom server order and only use its own servers.
2014-04-19 03:57:24 -07:00
Contributing
------------
Contributions are always welcome.
If you've got a problem or a question, [raise an issue](https://github.com/canton7/Stylet/issues).
If you've got code you want to contribute, please read [the Contributing guidelines](https://github.com/canton7/Stylet/wiki/Contributing) first of all.
Create a feature branch off the `develop` branch, add your changes there, and submit it as a pull request.