Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bblanchon/wpfbindingerrors
:boom: Turn WPF Binding errors into exception
https://github.com/bblanchon/wpfbindingerrors
c-sharp mvvm wpf xaml
Last synced: 8 days ago
JSON representation
:boom: Turn WPF Binding errors into exception
- Host: GitHub
- URL: https://github.com/bblanchon/wpfbindingerrors
- Owner: bblanchon
- License: mit
- Created: 2013-10-25T21:24:38.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2020-08-21T18:02:54.000Z (about 4 years ago)
- Last Synced: 2024-10-04T13:05:37.959Z (about 1 month ago)
- Topics: c-sharp, mvvm, wpf, xaml
- Language: C#
- Homepage:
- Size: 840 KB
- Stars: 78
- Watchers: 11
- Forks: 17
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Turn WPF binding errors into exceptions
=======================================A lightweight library that converts WPF binding errors into exceptions, so you can quickly spot errors in the XAML markup and detect them unit tests.
![Exception shown in Visual Studio](SampleWpfApplication/Pictures/XamlParseException.png)All it requires is a single line in your existing code:
```csharp
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs args)
{
base.OnStartup(args);
// Start listening for WPF binding error.
// After that line, a BindingException will be thrown each time
// a binding error occurs.
BindingExceptionThrower.Attach();
}
}
```Installing:
-----------With .NET CLI
> dotnet add package WpfBindingErrors
With Package Manager:
PM> Install-Package WpfBindingErrors
https://www.nuget.org/packages/WpfBindingErrors
Content
-------1. [Project WpfBindingError](WpfBindingErrors) is a reusable assembly that listens for binding errors.
2. [Project SampleWpfApplication](SampleWpfApplication) shows how to throw `BindingException` at **runtime**.
3. [Project SampleWpfApplicationTests](SampleWpfApplicationTests) shows how to check binding errors in a **unit test project**.
Each project contains a dedicated README with more detail.Supported frameworks
--------------------* .NET Core 3.0 🆕
* .NET Framework 4.6
* .NET Framework 4.5.2
* .NET Framework 4.5.1
* .NET Framework 4.5
* .NET Framework 4.0Contributors
------------* [Gareth Brown](https://github.com/wonea)
* [Bruno Juchli](https://github.com/jongleur1983)