/// <summary> /// Method helps to update the selected <see cref="VisualStyles"/> /// </summary> /// <param name="selectedTheme">Selected Theme</param> private void OnThemeChanged(string selectedTheme) { var productDemosWindow = Application.Current.Windows.OfType <ProductDemosWindow>(); foreach (var window in productDemosWindow) { SfSkinManager.SetTheme(window, new Theme() { ThemeName = SelectedThemeName }); } UpdateTitleBarBackgroundandForeground(selectedTheme); var navigationService = DemosNavigationService.DemoNavigationService; if (navigationService != null && navigationService.Content != null) { if (navigationService.Content is DemoLauncherView || navigationService.Content is DemosListView || (SelectedSample != null && navigationService.Content is DemoControl && SelectedSample.ThemeMode == ThemeMode.Inherit)) { SfSkinManager.SetTheme(navigationService.Content as DependencyObject, new Theme() { ThemeName = SelectedThemeName }); } } }
public LinkedManager(string themename) { SfSkinManager.SetTheme(this, new Theme() { ThemeName = themename }); InitializeComponent(); this.Closed += LinkedManager_Closed; this.Loaded += (sender, args) => { if (count == 0) { count++; windowlist.Add(this); this.Left = 50; this.Top = 100; LinkedManager linkedManager = new LinkedManager(themename); linkedManager.Title = "Docking Manager " + count; linkedManager.Owner = this; linkedManager.Show(); windowlist.Add(linkedManager); linkedManager.Left = 700; linkedManager.Top = 100; this.clientdockingManager.AddToTargetManagersList(linkedManager.clientdockingManager); linkedManager.clientdockingManager.AddToTargetManagersList(this.clientdockingManager); } }; }
public static T LauchDemo <T>(DemoBrowserViewModel viewmodel, DemoInfo demoInfo) where T : DependencyObject { T demo; var constructorInfo = demoInfo.DemoViewType.GetConstructors().FirstOrDefault(cinfo => cinfo.IsPublic && cinfo.GetParameters().Length == 1 && cinfo.GetParameters()[0].Name == "themename"); if (demoInfo.ThemeMode != ThemeMode.None && constructorInfo != null) { demo = Activator.CreateInstance(demoInfo.DemoViewType, demoInfo.ThemeMode == ThemeMode.Inherit ? viewmodel.SelectedThemeName : DemoBrowserViewModel.DefaultThemeName) as T; } else { demo = Activator.CreateInstance(demoInfo.DemoViewType) as T; if (demoInfo.ThemeMode == ThemeMode.Inherit) { SfSkinManager.SetTheme(demo, new Theme() { ThemeName = viewmodel.SelectedThemeName }); } else if (demoInfo.ThemeMode == ThemeMode.Default) { SfSkinManager.SetTheme(demo, new Theme() { ThemeName = DemoBrowserViewModel.DefaultThemeName }); } } return(demo); }
public organizationallayoutdemo() { InitializeComponent(); SfSkinManager.SetTheme(this, new Theme() { ThemeName = "FluentLight" }); Diagram.CommandManager.Commands.RemoveAt(5); Diagram.CommandManager.Commands.RemoveAt(4); Diagram.CommandManager.Commands.RemoveAt(3); Diagram.CommandManager.Commands.RemoveAt(2); if (this.DataContext != null) { (this.DataContext as organizationallayoutViewModel).View = this; } this.SizeChanged += FloorPlannerDemo_SizeChanged; this.Closing += FloorPlannerDemo_Closing; var ifLeft = SystemParameters.MenuDropAlignment; if (ifLeft) { var t = typeof(SystemParameters); var field = t.GetField("_menuDropAlignment", BindingFlags.NonPublic | BindingFlags.Static); field.SetValue(null, false); ifLeft = SystemParameters.MenuDropAlignment; } }
public DemoControl(string themename) : this() { SfSkinManager.SetTheme(this, new Theme() { ThemeName = themename }); }
/// <summary> /// This method is used to remove the border of the items in themepanel on mousehover for FluentTheme /// </summary> private void ThemeChanged() { if (viewModel.SelectedThemeName.Contains("Fluent")) { SfSkinManager.SetTheme(ThemeList, new FluentTheme() { ThemeName = viewModel.SelectedThemeName, HoverEffectMode = HoverEffect.Background }); SfSkinManager.SetTheme(PaletteList, new FluentTheme() { ThemeName = viewModel.SelectedThemeName, HoverEffectMode = HoverEffect.Background }); } else { SfSkinManager.SetTheme(ThemeList, new Theme() { ThemeName = viewModel.SelectedThemeName }); SfSkinManager.SetTheme(PaletteList, new Theme() { ThemeName = viewModel.SelectedThemeName }); } }
public FlowDiagram() { InitializeComponent(); (diagramcontrol.Info as IGraphInfo).ViewPortChangedEvent += FlowDiagram_ViewPortChangedEvent; SfSkinManager.SetTheme(this, new Syncfusion.SfSkinManager.Theme() { ThemeName = "FluentLight" }); // This code is used to set the menu drop down in the left side for both right handed and left handed settings. //Whether the acquisition system is Left-handed (true) or Right-handed (false) var ifLeft = SystemParameters.MenuDropAlignment; if (ifLeft) { var t = typeof(SystemParameters); var field = t.GetField("_menuDropAlignment", BindingFlags.NonPublic | BindingFlags.Static); field.SetValue(null, false); ifLeft = SystemParameters.MenuDropAlignment; } diagramcontrol.PropertyChanged += Diagramcontrol_PropertyChanged; diagramcontrol.Theme = new OfficeTheme(); }
/// <summary> /// Method helps to perform product selection change. /// </summary> private void OnSelectedProductChanged() { if (this.SelectedProduct == null) { return; } selectedthemename = DemoBrowserViewModel.DefaultThemeName; // Fluent theme is the default theme. selectedtheme = themelist.FirstOrDefault(theme => theme.ThemeName == "FluentLight"); Palettes = new ObservableCollection <Palette>(PaletteList.Where(x => (x.Theme.Equals(selectedthemename))).ToList <Palette>()); SelectedPalette = Palettes.Where(x => x.Name.Equals("Default")).ToList <Palette>()[0]; UpdateTitleBarBackgroundandForeground(selectedthemename); ProductDemosWindow productDemo = null; if (this.isWindowMode) { productDemo = new ProductDemosWindow(this); productDemo.Owner = DemosNavigationService.MainWindow; SfSkinManager.SetTheme(productDemo, new Theme() { ThemeName = SelectedThemeName }); } else { if (DemosNavigationService.RootNavigationService.CanGoForward) { DemosNavigationService.RootNavigationService.GoForward(); } else { DemosNavigationService.RootNavigationService.Navigate(new DemosListView() { DataContext = this }); } } if (this.SearchItem == null) { SelectedSample = this.SelectedProduct.Demos[0]; } else { if (searchItem.ProductDemoInfo != null && this.SelectedSample != searchItem.ProductDemoInfo) { this.SelectedSample = searchItem.ProductDemoInfo; this.SearchText = null; } } if (ThemeChanged != null) { ThemeChanged(); } if (productDemo != null) { productDemo.ShowDialog(); } }
public MainWindow() { SfSkinManager.SetTheme(this, new Theme() { ThemeName = "MaterialDark", ScrollBarMode = ScrollBarMode.Compact }); InitializeComponent(); }
/// <summary> /// Sets the theme when launching the demo. /// </summary> /// <param name="themename">Specifies the theme name.</param> public ApplicationMenu(string themename) { SfSkinManager.SetTheme(this, new Theme() { ThemeName = themename }); InitializeComponent(); }
public BpmnEditorDemo() { InitializeComponent(); SfSkinManager.SetTheme(this, new Theme() { ThemeName = "Office2019Colorful" }); }
public CarDashBoardDemo() { this.InitializeComponent(); SfSkinManager.SetTheme(this, new Theme() { ThemeName = "MaterialDark" }); }
public StockAnalysisView() { SfSkinManager.SetTheme(this, new Theme() { ThemeName = "Office2019Colorful" }); InitializeComponent(); }
public AdvancedConditionalFormatting(string themename) { SfSkinManager.SetTheme(this, new Theme() { ThemeName = themename }); InitializeComponent(); }
/// <summary> /// Initializes a new instance of the <see cref="ZoomPanWindow" /> class. /// </summary> public ZoomPanWindow() { this.InitializeComponent(); SfSkinManager.SetTheme(this, new Theme() { ThemeName = "FluentLight" }); }
public OptionTab(string themename) { SfSkinManager.SetTheme(this, new Theme() { ThemeName = themename }); InitializeComponent(); }
public MenuMerging(string themename) { SfSkinManager.SetTheme(this, new Theme() { ThemeName = themename }); InitializeComponent(); }
public GettingStarted(string themename) { SfSkinManager.SetTheme(this, new Theme() { ThemeName = themename }); InitializeComponent(); }
public FrontPage() { SfSkinManager.SetTheme(this, new Theme() { ThemeName = "Office2019Black" }); this.InitializeComponent(); }
/// <summary> /// Method used to set the theme while initialization. /// </summary> /// <param name="themename">Represents the theme name.</param> public RibbonBarCollapseOrder(string themename) { SfSkinManager.SetTheme(this, new Theme() { ThemeName = themename }); InitializeComponent(); }
public BpmnEditorDemo() { InitializeComponent(); SfSkinManager.SetTheme(this, new Theme() { ThemeName = "FluentLight" }); }
public Print(string themename) : base(themename) { InitializeComponent(); SfSkinManager.SetTheme(this, new Theme() { ThemeName = themename }); }
public SfDiagram_Binding_With_TreeView(string themename) : base(themename) { InitializeComponent(); SfSkinManager.SetTheme(this, new Theme() { ThemeName = themename }); }
public MultiTabbedViewer() { SfSkinManager.SetTheme(this, new Theme() { ThemeName = "Office2019Colorful" }); InitializeComponent(); }
public TileViewDemo(string themename) : base(themename) { InitializeComponent(); SfSkinManager.SetTheme(this, new Theme() { ThemeName = "Office2019Colorful" }); }
public FilteringDemo(string themename) { SfSkinManager.SetTheme(this, new Theme() { ThemeName = themename }); InitializeComponent(); }
public SimplifiedRibbon(string themename) { SfSkinManager.SetTheme(this, new Theme() { ThemeName = themename }); InitializeComponent(); }
public MainWindow() { InitializeComponent(); SfSkinManager.SetTheme(this, new Syncfusion.SfSkinManager.Theme() { ThemeName = "Office2019Colorful" }); }
public CellCustomizationDemo(string themename) { SfSkinManager.SetTheme(this, new Theme() { ThemeName = themename }); InitializeComponent(); }
public WizardDemosView(string themename) { SfSkinManager.SetTheme(this, new Theme() { ThemeName = themename }); InitializeComponent(); }