public CircularGaugeModule() { this.InitializeComponent(); DataContext = new WorldTimeInfo(); Loaded += OnLoaded; Unloaded += OnUnloaded; }
protected static void NotifyPropertyChanged(DependencyObject d, string propertyName) { WorldTimeInfo obj = d as WorldTimeInfo; if (obj != null) { obj.NotifyPropertyChanged(propertyName); } }
void OnLoaded(object sender, RoutedEventArgs e) { DataContext = new WorldTimeInfo(); (DataContext as WorldTimeInfo).StartTimer(); }