Esempio n. 1
0
        public FloatingWindow AddDisplay(UIElement display, string title = "", Rect?bounds = null, bool visible = true, object tag = null)
        {
            FloatingWindow window = new FloatingWindow()
            {
                Content  = display,
                Tag      = tag,
                Title    = title,
                IconText = title
            };

            host.Add(window);

            if (bounds.HasValue)
            {
                window.Width  = bounds.Value.Width;
                window.Height = bounds.Value.Height;
                window.Show(bounds.Value.TopLeft.X, bounds.Value.TopLeft.Y);
            }
            else
            {
                window.Show(100, 100);
            }

            if (!visible)
            {
                window.MinimizeWindow();
            }

            return(window);
        }