public override async Task Refresh( ) { await base.Refresh( ); AppearanceChanged.OnNext(RawAppearance); ParametersChanged.OnNext(RawParameters); ResolutionChanged.OnNext(RawResolution); DeviceNameChanged.OnNext(RawDeviceName); }
private void appearaceComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { ResourceDictionary dict = new ResourceDictionary(); if (appearaceComboBox.SelectedIndex == 0) { dict.Source = new Uri("Resources/LightColor.xaml", UriKind.Relative); } else { dict.Source = new Uri("Resources/DarkColor.xaml", UriKind.Relative); } Application.Current.Resources.Clear(); Application.Current.Resources.MergedDictionaries.Add(dict); AppearanceChanged?.Invoke(appearaceComboBox.SelectedIndex == 0 ? Appearance.Light : Appearance.Dark); }
protected virtual void OnProcessDelta(Delta d) { if (d.HasFlag(Delta.Appearance)) { AppearanceChanged.Raise(this); } if (d.HasFlag(Delta.Position)) { PositionChanged.Raise(this); } if (d.HasFlag(Delta.Attributes)) { AttributesChanged.Raise(this); } if (d.HasFlag(Delta.Properties)) { PropertiesChanged.Raise(this); } }
protected virtual void OnAppearanceChanged(EventArgs e) { AppearanceChanged?.Invoke(this, e); }