Prevent other applications moving behind AppBar -WPF - wpf

I've developed a WPF application as an AppBar using vb.net, it's docked to the bottom edge of the screen and remains topmost as expected.
Other applications such as notepad when maximized/opened only expand to the top edge of the AppBar(expected). However when another application such as notepad is resized it can be dragged down behind the AppBar.
How do I prevent Other applications from moving behind the AppBar/prevent them moving into that section of screen that the AppBar occupies when they are not maximized?
Images 1 : the reserved space for the app bar and the VS window maximising to the edge of this reserved space, no further.
Image 2 : What I want to prevent, A resized window such as the chrome window being able to move into the reserved space for the AppBar.

Related

Force a window to be always maximised

I have a WPF application that I want permanently maximised.
The application starts off maximised and that's fine.
I have set the ResizeMode="NoResize" and while this does prevent the window from being resized (by dragging the edges of the window), I find I can drag the title bar down, and the window will resize to a "Restore" state - i.e. partially filling the screen. At this point the window can't be resized (as I'd expect) or maximised once again (even if I drag the title bar back to the top of the screen)
Is there a setting that will just not allow the "restore" functionality and force the Window to always be maximised?
Edit
I've discovered this is actually a window setting, and if I turn off "Arrange windows automatically by dragging them to the corners of the screen" in Settings / System / Multitasking it prevents this (I also needed to remove the ResizeMode="NoResize" funnily enough otherwise dragging the title bar just drags the entire maximised window down).
However, I can still "Restore" it by double-clicking on the title bar. I can maximise once again by doing it again, but I don't want the user to be able to restore the window at all.
Strangely enough, doing it this way ResizeMode="NoResize" lets me restore a maximised window, but not maximise a restored normal window... I'd be happy with the other way around...

Overlay control over 2 dockable panels of AvalonDock

I am creating an interface using WPF which contains a menu of tiles. UI has an image which is below the menubar. When the menu bar is hidden the image expands and takes its place as I am using Avalon Dock.
I have a design in which, menu tiles expand in height when mouse is hovered over them. But the expanded tiles get hidden as the dockable panel doesn't expand in height. Is there a way to overlay the tiles' panel over the image panel so that the tiles are visible entirely?
Thank You.
I searched a lot over the internet and also documentations. Finally found out that, the 2 panels are separate components so content among it can't be overlayed.
eg. a button can't be shared by 2 windows as their Visual Tree is different.
So, the answer to my Question is that the components can't be overlayed.

Windows forms app, autoscale controls with form

I'm a newbie. Designing a form that can be resized, and I want my textboxes, labels and buttons to resize with the form, can someone tell me how to do this?
It depends on the type of layout you need. The "basic tools" you have to do that are following properties: Anchor and Dock.
Anchor
With the Anchor property you "attach" a side of an element to a side of its container. For example if you place a button in the bottom-right corner of a window and you set "Bottom, Right" as Anchor then when you'll resize the form the button will keep its relative position to that corner.
Now imagine you place a multiline text-box in the form, resize as needed (for example 4 px from top, left and right border and 128 px height) and set the Anchor property to "Left, Top, Right". When you'll resize the form that control will keep its height but it'll resize to keep its margins (so if you'll make the form wider its width will be increased).
Dock
Dock is different. With docking you "say" to the Layout Manager to use all available space in one direction. For example if you set to Left then your control will keep its width but it'll use all the available height and its location will be most left as possible.
You may have more than one control docked in a container, imagine you have 5 textbox with Top docking inside a form. They'll be stacked to the top of the form using all the width (and resizing). Another example: a Top docked control (as a banner) and a "Fill" docked control (as main content). Remember that with docking the order of controls matters (if you first place the "Fill" control it'll use ALL the available space and the "Top" dock control will overlap).
Even more
Moreover you have some layout controls too (tables and stacks). They're really easy to use and a 30 minutes of "experiments" will clarify much better than a long text.

childWindow Full Screen Event tweak the Parent to also FullSCreen Mode

I have a ChildWindow which contains a ExpressionMediaPlayer inside it. When I click on the ChildWindow Media Player Full screen button it swiches the whole application to FullScreen Mode.
Is there a way to avoid it. I am not quite sure if this scenario is going to fall under SL security restrictions.
When I drag the ChildWindow(the position of ChildWindow changes) and click on the fullscreen
now the ChildWindow also changes it's position.
For example if I have dragged the ChildWindow 50px from Top and pressed the Full Screen button of of mediaPlayer (it contains) the Child Window also appears 50 pixels below the Screen Top.
But I want My ChildWindow to be FullScreen without having any Gap from LEFT,TOP,RIGHT or below.
Any help will be greatly appreciated.
Thanks,
Subhen
Silverlight only uses one of its two windows. The first is the normal window embedded in the Host application such as IE (or in windowless mode it co-operates with the host to draw directly on one of the host's windows in a give rectangle). The other window is a Fullscreen one.
When in full screen mode it moves all its rendering of its stack of content to the full screen window. You can't get Silverlight to render only some controls on the Fullscreen window, its an all or nothing proposition.
Creating a "fullscreenable" ChildWindow would be an interesting exercise. Probably a new templated control based on Childwindow with a new "Fullscreen" visual state (in a new state group) that hides the chrome and causes the content grid to stretch with Auto Width and Height.

When should sizing grip (windows Forms) be used?

Should it be used for all sizable forms, or only when it is not easy to guess that a form is sizable? Is there a GUI convention to use it?
Any link to a documentation would be appreciated.
According to the Vista User Experience Guidelines:
Resizable windows no longer must show the resize glyph in the lower-right corner, because:
All sides and edges of a window are
resizable, not just the lower-right
corner.
The glyph requires a status
bar to display, yet many resizable
windows don't provide status bars.
The resizable window borders and
resize pointers are more effective
at communicating that a window is
resizable than the resize glyph.
http://msdn.microsoft.com/en-us/library/aa511262.aspx

Resources