Is it possible to create a window that is larger than the screen?

I have an application that I have created, it grows based on its content. content width may vary from time to time. When the window becomes larger than the screen, the window will be cut.

Can I make the window larger than the screen?


source to share

2 answers

I am sure that this is possible:

<Window x:Class="WpfApplication1.MainWindow"
        Title="MainWindow" Height="2000" Width="5000" Left="-10" Top="-10">



Okay, I guess you want to do this dynamically, right? I could think of some code to check the size of the content and set the size of the window.

(although I don't like what you want to achieve);)



In WPF, I can dynamically create a window larger than the screen using the following:

        var window = new Window();
        window.Width = 8620;
        window.Height = 400;

        window.Top = 400;
        window.Left = 0;

        window.WindowStyle = WindowStyle.None;
        window.AllowsTransparency = true;


I know this works because if I connect a second monitor and expand it the window becomes visible (set the border - set WindowStyle, change the background color, or show the content to see the window).



All Articles