Example #1
0
        private void RegisterToStickyWindows()
        {
            //  1. Try to get startup options passed from GD. Create our default options if there aren't any passed options. Make your app a sticky flat window with title Clients
            //  Hint - you can use the placement object for your default config and you can get the startup options from Glue.StickyWindows.GetStartupOptions();
            var gwOptions = App.Glue.GlueWindows.GetStartupOptions();

            if (gwOptions == null)
            {
                gwOptions = new GlueWindowOptions();
                var placement = new GlueWindowScreenPlacement();
                var bounds    = new GlueWindowBounds
                {
                    Width  = 300,
                    Height = 190
                };
                placement.WithBounds(bounds);
                gwOptions
                .WithId(Guid.NewGuid().ToString())
                .WithPlacement(placement);
            }

            gwOptions
            .WithType(GlueWindowType.Flat)
            .WithTitle("Notifications");

            App.Glue.GlueWindows.RegisterWindow(this, gwOptions);
        }
        private void Chart_Click(object sender, RoutedEventArgs e)
        {
            var chartWindow            = new ChartWindow();
            var synchronizationContext = SynchronizationContext.Current;
            var placement = new GlueWindowScreenPlacement().WithTabGroupId(TabGroupId); // Adding the tab group id so the chart window appears in the same tab group as the main window

            // With the RegisterAppWindow invocation both the window and an instance of the application are being registered
            glue42_.GlueWindows.RegisterAppWindow(chartWindow, chartWindow, ChartWindowAppName,
                                                  builder => builder
                                                  .WithPlacement(placement)
                                                  .WithType(GlueWindowType.Tab)
                                                  .WithTitle(ChartWindowAppName));
        }
Example #3
0
        private void RegisterToStickyWindows()
        {
            // 1. Try to get startup options passed from GD
            // Create our default options if there aren't any passed options
            // Make your app a sticky flat window with title Clients

            var bounds = new GlueWindowBounds
            {
                Width  = 1200,
                Height = 700,
            };
            var placement = new GlueWindowScreenPlacement();

            placement.WithBounds(bounds);
        }
Example #4
0
        private void RegisterToStickyWindows()
        {
            // 1. Try to get startup options passed from GD
            // Create our default options if there aren't any passed options
            // Make your app a sticky flat window with title Portfolio
            var bounds = new GlueWindowBounds
            {
                Width  = 1250,
                Height = 900
            };
            var placement = new GlueWindowScreenPlacement();

            placement.WithBounds(bounds);
            var id = Guid.NewGuid().ToString();
        }