Esempio n. 1
0
        /// <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
                    });
                }
            }
        }
Esempio n. 2
0
 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);
         }
     };
 }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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;
            }
        }
Esempio n. 5
0
 public DemoControl(string themename) : this()
 {
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = themename
     });
 }
Esempio n. 6
0
 /// <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
         });
     }
 }
Esempio n. 7
0
        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();
 }
Esempio n. 10
0
 /// <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();
 }
Esempio n. 11
0
 public BpmnEditorDemo()
 {
     InitializeComponent();
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = "Office2019Colorful"
     });
 }
 public CarDashBoardDemo()
 {
     this.InitializeComponent();
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = "MaterialDark"
     });
 }
Esempio n. 13
0
 public StockAnalysisView()
 {
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = "Office2019Colorful"
     });
     InitializeComponent();
 }
Esempio n. 14
0
 public AdvancedConditionalFormatting(string themename)
 {
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = themename
     });
     InitializeComponent();
 }
Esempio n. 15
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="ZoomPanWindow" /> class.
 /// </summary>
 public ZoomPanWindow()
 {
     this.InitializeComponent();
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = "FluentLight"
     });
 }
Esempio n. 16
0
 public OptionTab(string themename)
 {
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = themename
     });
     InitializeComponent();
 }
Esempio n. 17
0
 public MenuMerging(string themename)
 {
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = themename
     });
     InitializeComponent();
 }
Esempio n. 18
0
 public GettingStarted(string themename)
 {
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = themename
     });
     InitializeComponent();
 }
Esempio n. 19
0
 public FrontPage()
 {
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = "Office2019Black"
     });
     this.InitializeComponent();
 }
Esempio n. 20
0
 /// <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();
 }
Esempio n. 21
0
 public BpmnEditorDemo()
 {
     InitializeComponent();
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = "FluentLight"
     });
 }
Esempio n. 22
0
 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
     });
 }
Esempio n. 24
0
 public MultiTabbedViewer()
 {
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = "Office2019Colorful"
     });
     InitializeComponent();
 }
Esempio n. 25
0
 public TileViewDemo(string themename) : base(themename)
 {
     InitializeComponent();
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = "Office2019Colorful"
     });
 }
Esempio n. 26
0
 public FilteringDemo(string themename)
 {
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = themename
     });
     InitializeComponent();
 }
 public SimplifiedRibbon(string themename)
 {
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = themename
     });
     InitializeComponent();
 }
Esempio n. 28
0
 public MainWindow()
 {
     InitializeComponent();
     SfSkinManager.SetTheme(this, new Syncfusion.SfSkinManager.Theme()
     {
         ThemeName = "Office2019Colorful"
     });
 }
 public CellCustomizationDemo(string themename)
 {
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = themename
     });
     InitializeComponent();
 }
Esempio n. 30
0
 public WizardDemosView(string themename)
 {
     SfSkinManager.SetTheme(this, new Theme()
     {
         ThemeName = themename
     });
     InitializeComponent();
 }