maximize

Expand Usercontrol to full window size

邮差的信 提交于 2019-12-11 06:44:18
问题 I am currently working on a project which has a tab control which contains a Wrap panel which contain a series of user controls. I am looking for a way to allow the user to select one user control and maximize it to the size of the tab control/window. One thought is to simply remove all the other items from the panel.However I am attempting to use MVVM as much as possible and I'm not sure how much the user control should know about the panel. (The user control will contain a button to allow

How to disable maximizing of a window when the window is moved to the top left corner of the screen?

主宰稳场 提交于 2019-12-11 02:50:03
问题 I have a windows which hasResizeMode="CanResizeWithGrip" and AllowTransparency="true" set. It works fine until it is moved to the top of the screen when it is then automatically Maximized. How can stop it maximizing so I can display the screen as a window positioned at the top of the screen. 回答1: Try: private void Window_LocationChanged(object sender, EventArgs e) { this.WindowState = System.windows.WindowState.Normal; } If you have to be specific, check for your location: if (this.Top == 0)

Obtain non-maximized window position/size when window is maximized

对着背影说爱祢 提交于 2019-12-11 02:42:58
问题 When users resize and adjust the location of my program's window (Winforms), they expect to see the window in that same position, even after closing and reopening the program. What I do is store the form's Width, Height, Location.X and Location.Y properties, and set these back when the program is reopened. The problem is when a window is maximized, Width, Height, X, Y refer not to the non-maximized Width/Height/X/Y, but instead to the Maximized dimensions. Thus when a user has the window

C++ Windows remove maximize box

北城余情 提交于 2019-12-10 13:55:53
问题 I'm using these window styles when calling CreateWindow WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX This disables the maximize box, but is there any way I can completely remove it? 回答1: No easy way, but if you are going to draw the title bar yourself - in this case you can do it. To give you an idea, this article Adding a 'Minimize to tray'-button to a Form's caption bar explains how to add a button. Removing standard button is about the same - customization of non-client area .

Maximize WPF window on 2 monitor

南楼画角 提交于 2019-12-08 02:41:25
问题 Like title I want my WPF to maximize on 2 monitors (now my pc have 2 monitors). I set this.Width = System.Windows.Forms.Screen.AllScreens[0].Bounds.Width + System.Windows.Forms.Screen.AllScreens[1].Bounds.Width but it not full, have spaced like the image. I want user click maximize button then window maximize 2 monitor. Does anyone know? Thank you all! p/s: sorry for my bad English. 回答1: You need to find point Left, Top, Height, Width and directly set to the window which you want to maximize

Using Rx over events on a WPF UserControl, why does the control receive a mousedown and mousemove when the window is maximized?

落爺英雄遲暮 提交于 2019-12-08 01:32:54
问题 This one's got me a bit baffled. I've written some extension methods on UIElement to provide Observables on some of the mouse events. Here are the relevant ones: public static IObservable<EventPattern<MouseEventArgs>> ObserveMouseLeftButtonDown(this UIElement element) { return Observable.FromEventPattern<MouseEventArgs>(element, "MouseLeftButtonDown"); } public static IObservable<EventPattern<MouseEventArgs>> ObserveMouseMove(this UIElement element) { return Observable.FromEventPattern

Keep window maximized with AutoHotkey?

北城余情 提交于 2019-12-07 03:14:28
I have an AutoHotkey script that launches an application maximized like this: `Run, myprogram.exe,, Max` It then gets rid of the minimize and restore buttons. I can still click on the task bar and drag downwards to restore the window. Is there any good way to keep my window maximized in AHK? How about just locking the window's position? Does the F11 key maximize the app? When in F11 mode most apps completely lose their title bar. If so, run the app then send an F11 key (You may need to wait a bit for the app to be active or something). Failing that, yes you could have an infinite loop running

Automatically Maximize Window Using Netbeans

孤街浪徒 提交于 2019-12-06 13:55:20
问题 I have been trying to get the window to automatically maximize using Netbeans. I've probably looked through 4 or 5 pages of Google for an answer. The web pages always provide something like this: public void run() { MyFrame myFrame = new MyFrame(); myFrame.setVisible(true); myFrame.setExtendedState(myFrame.getExtendedState() | JFrame.MAXIMIZED_BOTH); } I am using Netbeans 6.9.1 Does this no longer work? Is there another way to do this? Also, if you find your answer on a web page, please

Using Rx over events on a WPF UserControl, why does the control receive a mousedown and mousemove when the window is maximized?

喜你入骨 提交于 2019-12-06 13:09:48
This one's got me a bit baffled. I've written some extension methods on UIElement to provide Observables on some of the mouse events. Here are the relevant ones: public static IObservable<EventPattern<MouseEventArgs>> ObserveMouseLeftButtonDown(this UIElement element) { return Observable.FromEventPattern<MouseEventArgs>(element, "MouseLeftButtonDown"); } public static IObservable<EventPattern<MouseEventArgs>> ObserveMouseMove(this UIElement element) { return Observable.FromEventPattern<MouseEventArgs>(element, "MouseMove"); } So far, so mind-numbingly simple. Then I create a composite event to

Maximize WPF window on 2 monitor

走远了吗. 提交于 2019-12-06 06:51:23
Like title I want my WPF to maximize on 2 monitors (now my pc have 2 monitors). I set this.Width = System.Windows.Forms.Screen.AllScreens[0].Bounds.Width + System.Windows.Forms.Screen.AllScreens[1].Bounds.Width but it not full, have spaced like the image. I want user click maximize button then window maximize 2 monitor. Does anyone know? Thank you all! p/s: sorry for my bad English. You need to find point Left, Top, Height, Width and directly set to the window which you want to maximize MonitorFromPoint MonitorFromRect MonitorFromWindow For completeness, I present first the naive approach how