Font settings
상속: INotifyPropertyChanged
예제 #1
0
		internal void SetActive(Guid themeGuid) {
			var settings = GetSettings(themeGuid);
			if (Active == settings)
				return;
			active = settings;
			OnPropertyChanged(nameof(Active));
		}
		public FontAndColorOptionsImpl(TextAppearanceCategory textAppearanceCategory) {
			this.textAppearanceCategory = textAppearanceCategory;
			fontSettings = textAppearanceCategory.ThemeFontSettings.Active;
			FontOption = new FontOption(fontSettings.FontType) {
				FontFamily = fontSettings.FontFamily,
				FontSize = fontSettings.FontSize,
			};
		}
예제 #3
0
		void UpdateActive() {
			var newActive = ThemeFontSettings.Active;
			if (activeFontSettings == newActive)
				return;
			if (activeFontSettings != null)
				activeFontSettings.PropertyChanged -= ActiveFontSettings_PropertyChanged;
			activeFontSettings = newActive;
			activeFontSettings.PropertyChanged += ActiveFontSettings_PropertyChanged;
		}
예제 #4
0
		void Initialize(FontSettings fontSettings) {
			if (prevFontSettings == fontSettings)
				return;
			if (prevFontSettings != null)
				prevFontSettings.PropertyChanged -= FontSettings_PropertyChanged;
			prevFontSettings = fontSettings;
			fontSettings.PropertyChanged += FontSettings_PropertyChanged;
			UpdateFont(fontSettings);
		}
예제 #5
0
		public FontSettingsCreatedEventArgs(FontSettings fontSettings) {
			if (fontSettings == null)
				throw new ArgumentNullException(nameof(fontSettings));
			FontSettings = fontSettings;
		}
예제 #6
0
		internal void Initialize(Guid activeThemeGuid) => active = GetSettings(activeThemeGuid);
예제 #7
0
		void UpdateFont(FontSettings fontSettings) =>
			Application.Current.Resources["TextEditorFontFamily"] = fontSettings.FontFamily;