/// <summary> /// Initializes a new instance of the <see cref="CreateLettersDemo"/> class. /// </summary> public CreateLettersDemo() { InitializeComponent(); Theme currentTheme = null; var productDemosWindow = Application.Current.Windows.OfType <ProductDemosWindow>(); foreach (var window in productDemosWindow) { currentTheme = SfSkinManager.GetTheme(window); } if (currentTheme.ThemeName == "MaterialDark") { ContactName.Foreground = new SolidColorBrush(Colors.Black); CompanyName.Foreground = new SolidColorBrush(Colors.Black); Address.Foreground = new SolidColorBrush(Colors.Black); City.Foreground = new SolidColorBrush(Colors.Black); Country.Foreground = new SolidColorBrush(Colors.Black); Phone.Foreground = new SolidColorBrush(Colors.Black); Fax.Foreground = new SolidColorBrush(Colors.Black);; ContactName2.Foreground = new SolidColorBrush(Colors.Black); } //Enables touch manipulation. richTextBoxAdv.IsManipulationEnabled = true; DataContext = richTextBoxAdv; richTextBoxAdv.IsReadOnly = true; richTextBoxAdv.DocumentTitle = "Letter"; richTextBoxAdv.RequestNavigate += RichTextBoxAdv_RequestNavigate; richTextBoxAdv.SelectionChanged += RichTextBoxAdv_SelectionChanged; this.Loaded += OnLoaded; richTextRibbon.Loaded += RichTextRibbon_Loaded; richTextBoxAdv.ExportSettings.UIContainerExporting += ExportSettings_UIContainerExporting; }
private void DockingTouch_LayoutUpdated(object sender, EventArgs e) { if (SfSkinManager.GetTheme(this).ToString() != "Default") { var Style = this.TryFindResource("TouchWindowStyle"); if (Style != null) { this.Style = (Style)Style; } this.LayoutUpdated -= DockingTouch_LayoutUpdated; } }
/// <summary> /// Handles the Click event of the NewDockingWindow control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param> private void NewDockingWindow_Click(object sender, RoutedEventArgs e) { count++; LinkedManager linkedManager = new LinkedManager(SfSkinManager.GetTheme(this).ThemeName); linkedManager.Title = "Docking Manager " + count; linkedManager.Owner = this; linkedManager.Show(); windowlist.Add(linkedManager); linkedManager.Left = 400; linkedManager.Top = 200; }
private void TouchStyleDemosView_LayoutUpdated(object sender, EventArgs e) { Theme theme = SfSkinManager.GetTheme(this); if (theme != null && theme.ToString() != "Default") { var Style = this.TryFindResource("TouchWindowStyle"); if (Style != null) { this.Style = (Style)Style; } this.LayoutUpdated -= TouchStyleDemosView_LayoutUpdated; } }