Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ProtectionLevelToBrush.cs
2using System;
3using System.Globalization;
4using System.Windows.Data;
5using System.Windows.Markup;
7
9{
13 public class ProtectionLevelToBrush : MarkupExtension, IValueConverter
14 {
16 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
17 {
18 if (value is ProtectionLevel Protection)
19 return Protection.DefaultBrush();
20 else
21 return null;
22 }
23
25 public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
26 {
27 return value;
28 }
29
31 public override object ProvideValue(System.IServiceProvider serviceProvider)
32 {
33 return this;
34 }
35 }
36}
ProtectionLevel
Parameter protection levels