示例#1
0
        private void App_Startup(object sender, StartupEventArgs e)
        {
            string Arg = "";

            if (e.Args.Length > 0)
            {
                if (e.Args.Length == 1)
                {
                    Arg = e.Args[0];
                }
            }
            FluentPalette.LoadPreset(FluentPalette.ColorVariation.Dark);
            StyleManager.ApplicationTheme = new FluentTheme();
            FluentPalette.LoadPreset(FluentPalette.ColorVariation.Dark);
            Telerik.Windows.Controls.MaterialControls.ThemeEffectsHelper.IsAcrylicEnabled = false;
            var win = new RadWindow()
            {
                Header = "Editor",
                Icon   = new Image()
                {
                    Source = ImageExampleHelper.LoadImage("Image/Editor.ico")
                },
                Content = new Editor.Editor1(Arg),
                Height  = 400,
                Width   = 600
            };

            win.Closed += Win_Closed;
            //win.Activated += Win_Activated;
            Taskbar.ShowInTaskbar(win, "Editor", "Image/Editor.ico");//ImageExampleHelper.LoadImage("PDF.ico")
            win.Show();
        }
示例#2
0
        public static void ShowInTaskbar(RadWindow control, string title, string icon)
        {
            control.IconTemplate = Application.Current.Resources[icon] as DataTemplate;
            //Image image = new Image();
            //image.Source = ImageExampleHelper.LoadImage("PDF.ico");
            //spFactory.AppendChild(image);

            control.Show();
            Window window = control.ParentOfType <Window>();

            window.ShowInTaskbar = true;
            window.Title         = title;
            window.Icon          = ImageExampleHelper.LoadImage(icon);
            //var uri = new Uri("pack://application:,,,/Editor;component/" + icon);
            //window.Icon = BitmapFrame.Create(uri);
        }