|
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
namespace SensorsUltrabook
{
public abstract class SensorBase : Control
{
public static readonly DependencyProperty ReportIntervalProperty = DependencyProperty.Register(
"ReportInterval",
typeof (int),
typeof (SensorBase),
new PropertyMetadata(DependencyProperty.UnsetValue, ReportIntervalPropertyPropertyChanged));
public int ReportInterval
{
get { return (int) GetValue(ReportIntervalProperty); }
set { SetValue(ReportIntervalProperty, value); }
}
protected abstract void OnReportIntervalChanged(DependencyObject d, DependencyPropertyChangedEventArgs e);
private static void ReportIntervalPropertyPropertyChanged(DependencyObject d,
DependencyPropertyChangedEventArgs e)
{
var sender = d as SensorBase;
sender.OnReportIntervalChanged(d, e);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I have more then 5 years of experience in the software development sectors with more then 15 softwares in C#, WPF, SQL SERVER, WCF, LINQ, intel perceptual computing sdk, digital signature, snmp.