public SaftInvoicesSummary() { InitializeComponent(); SfSkinManager.SetVisualStyle(dataGridInvoices, VisualStyles.Blend); SfSkinManager.SetVisualStyle(dataGridInvoiceLines, VisualStyles.Blend); SfSkinManager.SetVisualStyle(dataGridTaxes, VisualStyles.Blend); }
public MainWindow(IViewModel <MainWindowViewModel> model, LocLocalizer localizer, IMainWindowCoordinator mainWindowCoordinator, IDialogCoordinator coordinator, ProjectFileWorkspace workspace) : base(model) { _localizer = localizer; _mainWindowCoordinator = mainWindowCoordinator; _coordinator = coordinator; _workspace = workspace; InitializeComponent(); _mainWindowCoordinator.TitleChanged += () => Dispatcher.BeginInvoke(new Action(MainWindowCoordinatorOnTitleChanged)); _mainWindowCoordinator.IsBusyChanged += IsBusyChanged; Closing += OnClosing; Closed += async(sender, args) => { Shutdown?.Invoke(this, EventArgs.Empty); await Task.Delay(TimeSpan.FromSeconds(60)); Process.GetCurrentProcess().Kill(false); }; _coordinator.OnWindowConstructed += window => { SfSkinManager.SetVisualStyle(window, VisualStyles.Blend); }; }
private void comboBoxSkin_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (sender is ComboBox) { SfSkinManager.SetVisualStyle(this.olapchart1, (VisualStyles)Enum.Parse(typeof(VisualStyles), (sender as ComboBox).SelectedItem.ToString())); } }
public MainWindow() { InitializeComponent(); SfSkinManager.SetVisualStyle(this, VisualStyles.Blend); DataContext = new MainWindowModel(Grid); }
private void DockingManager_IsSelectedDocument(FrameworkElement sender, IsSelectedChangedEventArgs e) { if (DockingManager.DocContainer != null && SfSkinManager.GetVisualStyle(this) != SfSkinManager.GetVisualStyle(DockingManager.DocContainer as DependencyObject)) { SfSkinManager.SetVisualStyle(DockingManager.DocContainer as DependencyObject, SfSkinManager.GetVisualStyle(this)); } }
/// <summary> /// On Visual Style Changed. /// </summary> /// <remarks></remarks> private void OnVisualStyleChanged() { // Unhooks the event handler for RibbonWindow title bar help button. Syncfusion.Windows.Tools.Controls.TitleBar titleBar = VisualUtils.FindDescendant(this, typeof(Syncfusion.Windows.Tools.Controls.TitleBar)) as Syncfusion.Windows.Tools.Controls.TitleBar; WindowTitleBarButton HelpButton = null; if (titleBar != null) { HelpButton = titleBar.Template.FindName("HelpButton", titleBar) as WindowTitleBarButton; } if (HelpButton != null) { HelpButton.Click -= HelpButton_Click; } VisualStyles visualStyle = VisualStyles.Default; Enum.TryParse(CurrentVisualStyle, out visualStyle); string path = "pack://application:,,/Assets/Syncfusion.png"; if (visualStyle == VisualStyles.Blend || visualStyle == VisualStyles.Office2010Black || visualStyle == VisualStyles.Office2010Blue || visualStyle == VisualStyles.VisualStudio2013) { path = "pack://application:,,/Assets/SyncfusionWhite.png"; } ImageSourceConverter imgConv = new ImageSourceConverter(); ImageSource imageSource = (ImageSource)imgConv.ConvertFromString(path); this.Office2010Icon = imageSource; if (visualStyle != VisualStyles.Default) { SfSkinManager.ApplyStylesOnApplication = true; SfSkinManager.SetVisualStyle(this, visualStyle); SfSkinManager.ApplyStylesOnApplication = false; } }
private void ComboBoxAdv_SelectionChanged(object sender, SelectionChangedEventArgs e) { ComboBoxItemAdv item; WindowCollection windows = Application.Current.Windows; if (windows.Count > 0) { ComboBoxAdv combo = sender as ComboBoxAdv; if (combo != null) { if (combo.SelectedItem != null) { item = combo.SelectedItem as ComboBoxItemAdv; VisualStyles selectedStyle = (VisualStyles)Enum.Parse(typeof(VisualStyles), item.Content.ToString()); SfSkinManager.SetVisualStyle(this.SmithChart, selectedStyle); SfSkinManager.SetVisualStyle(this.combo, selectedStyle); SfSkinManager.SetVisualStyle(this.VisualStyleTextblock, selectedStyle); if (selectedStyle == VisualStyles.MaterialDark) { this.grid.Background = Brushes.Black; } else { this.grid.Background = Brushes.White; } } } } }
private void InitializeControls() { try { Logger.Initialize(); Logger.Log(EventID.KeyPresserStart); #region GlobalUnhandledExceptionEvents AppDomain.CurrentDomain.UnhandledException += (s, e) => UnhandledException_Raised((Exception)e.ExceptionObject, "AppDomain.CurrentDomain.UnhandledException"); Application.Current.DispatcherUnhandledException += (s, e) => UnhandledException_Raised(e.Exception, "Application.Current.DispatcherUnhandledException"); TaskScheduler.UnobservedTaskException += (s, e) => UnhandledException_Raised(e.Exception, "TaskScheduler.UnobservedTaskException"); #endregion SfSkinManager.ApplyStylesOnApplication = true; SfSkinManager.SetVisualStyle(this, Syncfusion.SfSkinManager.VisualStyles.Office2013DarkGray); #region KeyCatchInfo this.KeyCatchInfo = new KeyCatchInfo(); this.KeyCatchInfo.Install(); this.KeyCatchInfo.KeyUp += KeyCatchInfo_KeyUp; #endregion #region SimulationConf this.Simulation = new Simulation(); this.Simulation.Log = this.Log; this.Simulation.Key_Pressed += Key_Pressed; this.Simulation.Key_Changed += Key_CollectionChanged; #region dgKeyPressConf this.LoadUserSettings(); if (!this.Simulation.HasKeys()) { AddNewKeyPressInfo(true, "1", Key.D1); AddNewKeyPressInfo(true, "2", Key.D2); AddNewKeyPressInfo(true, "3", Key.D3); AddNewKeyPressInfo(true, "4", Key.D4); } this.dgKeyPressConf.ItemsSource = this.Simulation.GetKeyPressInfo(); #endregion SetSimulationButtonEditableProperty(this.Simulation.IsRunning); #endregion } catch (Exception ex) { Console.WriteLine(ex.ToString()); Logger.Log(EventID.KeyPresserException, ex); } }
public Window2() { InitializeComponent(); SfSkinManager.SetVisualStyle(this, VisualStyles.MaterialLight); this.Loaded += (sender, e) => { foreach (DateTimeEdit dateTimeEdit in FindVisualChildren <DateTimeEdit>(this)) { dateTimeEdit.Loaded += (s, args) => { if (dateTimeEdit.Name == "blackOutDates") { Syncfusion.Windows.Controls.CalendarDateRange blackOutDays = new Syncfusion.Windows.Controls.CalendarDateRange(); DateTime StartDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); /*DateTime.DaysInMonth(CurrentDateTime.Year, CurrentDateTime.Month)*/ DateTime EndDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day - 2); blackOutDays = new Syncfusion.Windows.Controls.CalendarDateRange() { Start = StartDate, End = EndDate }; Syncfusion.Windows.Controls.Calendar calendar = dateTimeEdit.DateTimeCalender as Syncfusion.Windows.Controls.Calendar; calendar.BlackoutDates.Add(blackOutDays); } }; dateTimeEdit.GotFocus += (s, args) => { focusedDateTimeEdit = s as DateTimeEdit; if (focusedDateTimeEdit == patternDT) { cmbopattern.IsEnabled = true; } else { cmbopattern.IsEnabled = false; } if (focusedDateTimeEdit == cultureDT) { comboculture.IsEnabled = true; } else { comboculture.IsEnabled = false; } if (focusedDateTimeEdit == validationDT || focusedDateTimeEdit == minDateTime || focusedDateTimeEdit == maxDateTime) { minDateTime.IsEnabled = true; } else { minDateTime.IsEnabled = false; } }; } }; }
/// <summary> /// Method to update the visual style /// </summary> private void UpdateVisualStyle() { this.label2.ForeColor = ColorTranslator.FromHtml("#444444"); this.label3.ForeColor = ColorTranslator.FromHtml("#444444"); this.captionLbl.ForeColor = ColorTranslator.FromHtml("#444444"); this.BackColor = ColorTranslator.FromHtml("#f3f3f3"); SfSkinManager.SetVisualStyle(this, "Office2019Colorful"); }
private void SelectionChanged(object obj) { SfSkinManager.SetVisualStyle((obj as Window1) as Visual, (VisualStyles)Enum.Parse(typeof(VisualStyles), (VisualStyle as ComboBoxItemAdv).Content.ToString())); if ((obj as Window1).MaxAndMinDays != null) { (obj as Window1).MaxAndMinDays.BlackoutDates = BlackOutDatesCollection; } }
private void ComboBoxAdv_SelectionChanged(object sender, SelectionChangedEventArgs e) { try { SfSkinManager.SetVisualStyle(this, (VisualStyles)Enum.Parse(typeof(VisualStyles), ((sender as ComboBoxAdv).SelectedItem as ComboBoxItemAdv).Content.ToString())); } catch (NullReferenceException) { } }
private void OnAssociatedObject_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { try { SfSkinManager.SetVisualStyle(Application.Current.MainWindow, (VisualStyles)Enum.Parse(typeof(VisualStyles), ((sender as ComboBoxAdv).SelectedItem as ComboBoxItemAdv).Content.ToString())); } catch (NullReferenceException) { } }
private void ComboBoxAdv_SelectionChanged(object sender, SelectionChangedEventArgs e) { ComboBoxItemAdv selectedthemeitem = this.ComboBox1.SelectedItem as ComboBoxItemAdv; if (selectedthemeitem != null) { SfSkinManager.SetVisualStyle(Schedule, (VisualStyles)Enum.Parse(typeof(VisualStyles), selectedthemeitem.Content.ToString())); } }
public Invoice_Management() { InitializeComponent(); SfSkinManager.SetVisualStyle(dg, VisualStyles.MaterialLight); ViewModel viewModel = new ViewModel(); dg.ItemsSource = viewModel.Orders; dg.AllowFiltering = true; }
/// <summary> /// Changing the theme /// </summary> /// <param name="item"></param> private void OnThemeChanged(object sender, RoutedEventArgs e) { //Changing Theme MenuItem item = sender as MenuItem; OnMenuItemClick(item); string theme = item.Tag as string; SfSkinManager.SetVisualStyle(this, (VisualStyles)Enum.Parse(typeof(VisualStyles), theme)); }
/// <summary> /// On Visual Style Changed. /// </summary> /// <remarks></remarks> private void OnVisualStyleChanged() { Enum.TryParse(CurrentVisualStyle, out VisualStyles visualStyle); if (visualStyle == VisualStyles.Default) { return; } SfSkinManager.ApplyStylesOnApplication = true; SfSkinManager.SetVisualStyle(this, visualStyle); SfSkinManager.ApplyStylesOnApplication = false; }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); var win = new MainWindow(); var vm = new MainViewModel(); win.DataContext = _mainViewModel = vm; win.Show(); SfSkinManager.ApplyStylesOnApplication = true; SfSkinManager.SetVisualStyle(win, VisualStyles.Metro); }
void InitializeColumnChooserPopup() { chooserWindow = new ColumnChooser(this.AssociatedObject.dataGrid); chooserWindow.Width = 200; chooserWindow.Height = 220; chooserWindow.TitleBarBackground = Brushes.LightGray; chooserWindow.Resources.MergedDictionaries.Clear(); chooserWindow.ClearValue(ColumnChooser.StyleProperty); SfSkinManager.SetVisualStyle(chooserWindow, VisualStyles.MaterialLight); chooserWindow.Resources.MergedDictionaries.Add(this.AssociatedObject.MainGrid.Resources.MergedDictionaries[0]); this.AssociatedObject.dataGrid.GridColumnDragDropController = new GridColumnChooserController(this.AssociatedObject.dataGrid, chooserWindow); chooserWindow.Show(); chooserWindow.Owner = this.AssociatedObject; chooserWindow.Closing += chooserWindow_Closing; }
private void Grid_MouseDown(object sender, MouseButtonEventArgs e) { var book = (sender as Grid).DataContext as Book; if (carousel1.SelectedValue == book) { Viewer view = new Viewer(); SfSkinManager.SetVisualStyle(view, VisualStyles.MaterialLight); string fileName = @"PDF\" + book.Name + ".pdf"; view.Title = book.Name; view.LoadPdf(fileName); viewers.Add(view); view.Show(); view.Topmost = true; } }
/// <summary> /// Event for Load /// </summary> private void Form1_Load(object sender, EventArgs e) { this.sfCalendar1.SelectionChanged += SfCalendar1_SelectionChanged; this.sfCalendar1.DrawCell += SfCalendar1_DrawCell1; this.sfCalendar1.HighlightTodayCell = false; RandomMeetingInfo morInfo; RandomMeetingInfo morInfo1; EveRandomMeetingInfo eveInfo; for (int i = 0; i <= 6; i++) { morInfo = new RandomMeetingInfo(new DateTime(DateTime.Now.Year, DateTime.Now.AddMonths(i).Month, 1), new DateTime(DateTime.Now.Year, DateTime.Now.AddMonths(i).Month, 28)); morInfo1 = new RandomMeetingInfo(new DateTime(DateTime.Now.Year, DateTime.Now.AddMonths(i).Month, 1), new DateTime(DateTime.Now.Year, DateTime.Now.AddMonths(i).Month, 28)); eveInfo = new EveRandomMeetingInfo(new DateTime(DateTime.Now.Year, DateTime.Now.AddMonths(i).Month, 1), new DateTime(DateTime.Now.Year, DateTime.Now.AddMonths(i).Month, 28)); for (int j = 0; j < 8; j++) { MeetingAgenda mornmeetingInfo = morInfo.Next(); MeetingAgenda mornmeetingInfo1 = morInfo1.Next(); MeetingAgenda evemeetingInfo = eveInfo.Next(); List <AppointmentTimeRange> ranges = new List <AppointmentTimeRange>(); AppointmentTimeRange morningRange = new AppointmentTimeRange(mornmeetingInfo.MorningDescription, mornmeetingInfo.MorningTimeInformation, RandColor()); AppointmentTimeRange morningRange1 = new AppointmentTimeRange(mornmeetingInfo1.MorningDescription, mornmeetingInfo1.MorningTimeInformation, RandColor()); AppointmentTimeRange eveningRange = new AppointmentTimeRange(evemeetingInfo.EveningDescription, evemeetingInfo.EveningTimeInformation, RandColor()); ranges.Add(morningRange); if (j % 17 == 0) { ranges.Add(morningRange1); ranges.Add(eveningRange); } else if (j % 2 == 0) { ranges.Add(eveningRange); } Appointment apt = new Appointment(ranges, mornmeetingInfo.DateInfo); this.Appointment.Add(apt); } } this.sfCalendar1.Style.Cell.CellFont = new Font("Segoe UI", this.sfCalendar1.Style.Cell.CellFont.Size + 2); this.sfCalendar1.Style.Cell.TrailingCellFont = new Font("Segoe UI", this.sfCalendar1.Style.Cell.CellFont.Size + 2); this.sfCalendar1.Style.Cell.SelectedCellFont = new Font("Segoe UI", this.sfCalendar1.Style.Cell.CellFont.Size + 2); this.sfCalendar1.SelectedDate = this.Appointment[0].Date; SfSkinManager.SetVisualStyle(this, "Office2019Colorful"); }
public void PropertyChangedHandler(object param) { WindowCollection windows = Application.Current.Windows; if (windows.Count > 0) { Window samplewindow = windows[0]; ComboBoxAdv combo = param as ComboBoxAdv; if (combo != null) { if (combo.SelectedValue != null) { SfSkinManager.SetVisualStyle(samplewindow, (VisualStyles)Enum.Parse(typeof(VisualStyles), combo.SelectedValue.ToString())); } } } }
public void selectioChanged(object param) { WindowCollection windows = Application.Current.Windows; if (windows.Count > 0) { Window samplewindow = windows[0]; ComboBox combo = param as ComboBox; if (combo != null) { if (combo.SelectedItem != null) { ComboBoxItem item = combo.SelectedItem as ComboBoxItem; SfSkinManager.SetVisualStyle(samplewindow, (VisualStyles)Enum.Parse(typeof(VisualStyles), item.Content.ToString())); } } } }
public void selectionChanged(object parameter) { WindowCollection windows = Application.Current.Windows; if (windows.Count > 0) { Window samplewindow = windows[0]; ComboBox combo = parameter as ComboBox; if (combo != null) { if (combo.SelectedItem != null) { string themename = combo.SelectedValue.ToString(); SfSkinManager.SetVisualStyle(samplewindow, (VisualStyles)Enum.Parse(typeof(VisualStyles), themename)); } } } }
private void ComboBoxAdv_SelectionChanged(object sender, SelectionChangedEventArgs e) { ComboBoxItemAdv item; WindowCollection windows = Application.Current.Windows; if (windows.Count > 0) { Window samplewindow = windows[0]; ComboBoxAdv combo = sender as ComboBoxAdv; if (combo != null) { if (combo.SelectedItem != null) { item = combo.SelectedItem as ComboBoxItemAdv; SfSkinManager.SetVisualStyle(samplewindow, (VisualStyles)Enum.Parse(typeof(VisualStyles), item.Content.ToString())); } } } }
/// <summary> /// Invoked when the Theme Selection changed. /// </summary> /// <param name="sender">VisualStyle ComboBox</param> /// <param name="e">SelectionChangedEventArgs</param> private void VisualStyle_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (VisualStyle.SelectedIndex == 0) { SfSkinManager.SetVisualStyle(accordion, VisualStyles.Metro); } else if (VisualStyle.SelectedIndex == 1) { SfSkinManager.SetVisualStyle(accordion, VisualStyles.Blend); } else if (VisualStyle.SelectedIndex == 2) { SfSkinManager.SetVisualStyle(accordion, VisualStyles.Office365); } else if (VisualStyle.SelectedIndex == 3) { SfSkinManager.SetVisualStyle(accordion, VisualStyles.Office2010Blue); } else if (VisualStyle.SelectedIndex == 4) { SfSkinManager.SetVisualStyle(accordion, VisualStyles.Office2010Black); } else if (VisualStyle.SelectedIndex == 5) { SfSkinManager.SetVisualStyle(accordion, VisualStyles.Office2010Silver); } else if (VisualStyle.SelectedIndex == 6) { SfSkinManager.SetVisualStyle(accordion, VisualStyles.Office2013White); } else if (VisualStyle.SelectedIndex == 7) { SfSkinManager.SetVisualStyle(accordion, VisualStyles.Office2013DarkGray); } else if (VisualStyle.SelectedIndex == 8) { SfSkinManager.SetVisualStyle(accordion, VisualStyles.Office2013LightGray); } else if (VisualStyle.SelectedIndex == 9) { SfSkinManager.SetVisualStyle(accordion, VisualStyles.Office2016White); } else if (VisualStyle.SelectedIndex == 10) { SfSkinManager.SetVisualStyle(accordion, VisualStyles.Office2016DarkGray); } else if (VisualStyle.SelectedIndex == 11) { SfSkinManager.SetVisualStyle(accordion, VisualStyles.Office2016Colorful); } else if (VisualStyle.SelectedIndex == 12) { SfSkinManager.SetVisualStyle(accordion, VisualStyles.VisualStudio2013); } else if (VisualStyle.SelectedIndex == 13) { SfSkinManager.SetVisualStyle(accordion, VisualStyles.VisualStudio2015); } else if (VisualStyle.SelectedIndex == 14) { SfSkinManager.SetVisualStyle(accordion, VisualStyles.Lime); } else if (VisualStyle.SelectedIndex == 15) { SfSkinManager.SetVisualStyle(accordion, VisualStyles.Saffron); } }
public MainWindow() { InitializeComponent(); SfSkinManager.SetVisualStyle(this, VisualStyles.Office2016White); this.Loaded += MainWindow_Loaded; }
private void SfComboBox1_SelectedIndexChanged(object sender, System.EventArgs e) { if (this.sfComboBox1.SelectedItem.ToString() == "Office2019Colorful") { SfSkinManager.SetVisualStyle(this, "Office2019Colorful"); this.richTextBox1.BackColor = ColorTranslator.FromHtml("#F3F3F3"); this.gradientPanel1.BackColor = ColorTranslator.FromHtml("#F3F3F3"); this.gradientPanel2.BackColor = ColorTranslator.FromHtml("#F3F3F3"); this.gradientPanel1.BorderColor = ColorTranslator.FromHtml("#D2D2D2"); this.gradientPanel2.BorderColor = ColorTranslator.FromHtml("#D2D2D2"); this.BackColor = ColorTranslator.FromHtml("#F3F3F3"); this.popupControlContainer1.BackColor = this.BackColor; this.label1.ForeColor = ColorTranslator.FromHtml("#444444"); this.label3.ForeColor = ColorTranslator.FromHtml("#444444"); this.label4.ForeColor = ColorTranslator.FromHtml("#444444"); this.label6.ForeColor = ColorTranslator.FromHtml("#444444"); this.checkBoxAdv1.ThemeName = "Office2019Colorful"; this.colorPickerUIAdv1.ThemeName = "Office2019Colorful"; this.richTextBox1.ForeColor = ColorTranslator.FromHtml("#444444"); #if NETCORE this.richTextBox1.Select(this.richTextBox1.GetFirstCharIndexFromLine(0), this.richTextBox1.Lines[0].Length); this.richTextBox1.SelectionBackColor = ColorTranslator.FromHtml("#F3F3F3"); #endif } else if (this.sfComboBox1.SelectedItem.ToString() == "HighContrastBlack") { SfSkinManager.SetVisualStyle(this, "HighContrastBlack"); this.richTextBox1.BackColor = System.Drawing.Color.Black; this.gradientPanel1.BackColor = System.Drawing.Color.Black; this.gradientPanel2.BackColor = System.Drawing.Color.Black; this.popupControlContainer1.BackColor = this.BackColor; this.BackColor = Color.Black; this.label1.ForeColor = ColorTranslator.FromHtml("#FFFFFF"); this.label3.ForeColor = ColorTranslator.FromHtml("#FFFFFF"); this.label4.ForeColor = ColorTranslator.FromHtml("#FFFFFF"); this.label6.ForeColor = ColorTranslator.FromHtml("#FFFFFF"); this.checkBoxAdv1.ThemeName = "HighContrastBlack"; this.colorPickerUIAdv1.ThemeName = "HighContrastBlack"; this.richTextBox1.ForeColor = Color.White; this.gradientPanel1.BorderColor = ColorTranslator.FromHtml("#FFFFFF"); #if NETCORE this.richTextBox1.Select(this.richTextBox1.GetFirstCharIndexFromLine(0), this.richTextBox1.Lines[0].Length); this.richTextBox1.SelectionBackColor = ColorTranslator.FromHtml("#000000"); #endif } else if (this.sfComboBox1.SelectedItem.ToString() == "Office2016Black") { SfSkinManager.SetVisualStyle(this, "Office2016Black"); this.richTextBox1.BackColor = ColorTranslator.FromHtml("#0a0a0a"); this.gradientPanel1.BackColor = ColorTranslator.FromHtml("#0a0a0a"); this.gradientPanel2.BackColor = ColorTranslator.FromHtml("#0a0a0a"); this.BackColor = ColorTranslator.FromHtml("#0a0a0a"); this.popupControlContainer1.BackColor = this.BackColor; this.label1.ForeColor = ColorTranslator.FromHtml("#b4b4b4"); this.label3.ForeColor = ColorTranslator.FromHtml("#b4b4b4"); this.label4.ForeColor = ColorTranslator.FromHtml("#b4b4b4"); this.label6.ForeColor = ColorTranslator.FromHtml("#b4b4b4"); this.checkBoxAdv1.ThemeName = "Office2016Black"; this.colorPickerUIAdv1.ThemeName = "Office2016Black"; this.gradientPanel1.BorderColor = Color.WhiteSmoke; this.gradientPanel2.BorderColor = Color.WhiteSmoke; this.richTextBox1.ForeColor = ColorTranslator.FromHtml("#b4b4b4"); #if NETCORE this.richTextBox1.Select(this.richTextBox1.GetFirstCharIndexFromLine(0), this.richTextBox1.Lines[0].Length); this.richTextBox1.SelectionBackColor = ColorTranslator.FromHtml("#0a0a0a"); #endif } else if (this.sfComboBox1.SelectedItem.ToString() == "Office2016Colorful") { SfSkinManager.SetVisualStyle(this, "Office2016Colorful"); this.richTextBox1.BackColor = Color.White; this.gradientPanel1.BackColor = Color.White; this.gradientPanel2.BackColor = Color.White; this.BackColor = Color.White; this.popupControlContainer1.BackColor = this.BackColor; this.label1.ForeColor = ColorTranslator.FromHtml("#444444"); this.label3.ForeColor = ColorTranslator.FromHtml("#444444"); this.label4.ForeColor = ColorTranslator.FromHtml("#444444"); this.label6.ForeColor = ColorTranslator.FromHtml("#444444"); this.checkBoxAdv1.ThemeName = "Office2016Colorful"; this.colorPickerUIAdv1.ThemeName = "Office2016Colorful"; this.gradientPanel1.BorderColor = Color.Black; this.gradientPanel2.BorderColor = Color.Black; this.richTextBox1.ForeColor = ColorTranslator.FromHtml("#444444"); #if NETCORE this.richTextBox1.Select(this.richTextBox1.GetFirstCharIndexFromLine(0), this.richTextBox1.Lines[0].Length); this.richTextBox1.SelectionBackColor = ColorTranslator.FromHtml("#FFFFFF"); #endif } else if (this.sfComboBox1.SelectedItem.ToString() == "Office2016DarkGray") { SfSkinManager.SetVisualStyle(this, "Office2016DarkGray"); this.richTextBox1.BackColor = ColorTranslator.FromHtml("#444444"); this.gradientPanel1.BackColor = ColorTranslator.FromHtml("#444444"); this.gradientPanel2.BackColor = ColorTranslator.FromHtml("#444444"); this.BackColor = ColorTranslator.FromHtml("#444444"); this.popupControlContainer1.BackColor = this.BackColor; this.label1.ForeColor = ColorTranslator.FromHtml("#f0f0f0"); this.label3.ForeColor = ColorTranslator.FromHtml("#f0f0f0"); this.label4.ForeColor = ColorTranslator.FromHtml("#f0f0f0"); this.label6.ForeColor = ColorTranslator.FromHtml("#f0f0f0"); this.checkBoxAdv1.ThemeName = "Office2016DarkGray"; this.colorPickerUIAdv1.ThemeName = "Office2016DarkGray"; this.gradientPanel1.BorderColor = Color.WhiteSmoke; this.gradientPanel2.BorderColor = Color.WhiteSmoke; this.richTextBox1.ForeColor = ColorTranslator.FromHtml("#f0f0f0"); #if NETCORE this.richTextBox1.Select(this.richTextBox1.GetFirstCharIndexFromLine(0), this.richTextBox1.Lines[0].Length); this.richTextBox1.SelectionBackColor = ColorTranslator.FromHtml("#444444"); #endif } else if (this.sfComboBox1.SelectedItem.ToString() == "Office2016White") { SfSkinManager.SetVisualStyle(this, "Office2016White"); this.BackColor = Color.White; this.richTextBox1.BackColor = Color.White; this.gradientPanel1.BackColor = Color.White; this.gradientPanel2.BackColor = Color.White; this.popupControlContainer1.BackColor = this.BackColor; this.label1.ForeColor = ColorTranslator.FromHtml("#444444"); this.label3.ForeColor = ColorTranslator.FromHtml("#444444"); this.label4.ForeColor = ColorTranslator.FromHtml("#444444"); this.label6.ForeColor = ColorTranslator.FromHtml("#444444"); this.checkBoxAdv1.ThemeName = "Office2016White"; this.colorPickerUIAdv1.ThemeName = "Office2016White"; this.gradientPanel1.BorderColor = Color.Black; this.gradientPanel2.BorderColor = Color.Black; this.richTextBox1.ForeColor = ColorTranslator.FromHtml("#444444"); #if NETCORE this.richTextBox1.Select(this.richTextBox1.GetFirstCharIndexFromLine(0), this.richTextBox1.Lines[0].Length); this.richTextBox1.SelectionBackColor = ColorTranslator.FromHtml("#FFFFFF"); #endif } }
/// <summary> /// Invokes the specified parameter. /// </summary> /// <param name="parameter">The parameter.</param> protected override void Invoke(object parameter) { var cb = this.AssociatedObject as ComboBox; // Apply Visual Style based on the selected theme switch (cb.SelectedItem.ToString()) { case "Metro": SfSkinManager.SetVisualStyle(grid, VisualStyles.Metro); break; case "Blend": SfSkinManager.SetVisualStyle(grid, VisualStyles.Blend); break; case "Lime": SfSkinManager.SetVisualStyle(grid, VisualStyles.Lime); break; case "Saffron": SfSkinManager.SetVisualStyle(grid, VisualStyles.Saffron); break; case "Office365": SfSkinManager.SetVisualStyle(grid, VisualStyles.Office365); break; case "Office2016Colorful": SfSkinManager.SetVisualStyle(grid, VisualStyles.Office2016Colorful); break; case "Office2016DarkGray": SfSkinManager.SetVisualStyle(grid, VisualStyles.Office2016DarkGray); break; case "Office2016White": SfSkinManager.SetVisualStyle(grid, VisualStyles.Office2016White); break; case "VisualStudio2013": SfSkinManager.SetVisualStyle(grid, VisualStyles.VisualStudio2013); break; case "Office2013DarkGray": SfSkinManager.SetVisualStyle(grid, VisualStyles.Office2013DarkGray); break; case "Office2013LightGray": SfSkinManager.SetVisualStyle(grid, VisualStyles.Office2013LightGray); break; case "Office2013White": SfSkinManager.SetVisualStyle(grid, VisualStyles.Office2013White); break; case "Office2010Blue": SfSkinManager.SetVisualStyle(grid, VisualStyles.Office2010Blue); break; case "Office2010Black": SfSkinManager.SetVisualStyle(grid, VisualStyles.Office2010Black); break; case "Office2010Silver": SfSkinManager.SetVisualStyle(grid, VisualStyles.Office2010Silver); break; case "VisualStudio2015": SfSkinManager.SetVisualStyle(grid, VisualStyles.VisualStudio2015); break; case "SystemTheme": SfSkinManager.SetVisualStyle(grid, VisualStyles.SystemTheme); break; default: SfSkinManager.SetVisualStyle(grid, VisualStyles.Default); break; } }
public MainWindow() { InitializeComponent(); SfSkinManager.SetVisualStyle(treeGrid, VisualStyles.Metro); }