I have set my main window state to "Maximized" but the problem is my application will fill the whole screen even task bar. what am i doing wrong ? I'm using windows 2008 R2 with resolution : 1600 * 900
Here is the Xaml :
<Window x:Class="RadinFarazJamAutomationSystem.wndMain" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:local="clr-namespace:RadinFarazJamAutomationSystem" xmlns:mwt="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" Title="MyName" FontFamily="Tahoma" FontSize="12" Name="mainWindow" WindowState="Maximized" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:my="clr-namespace:RadinFarazJamAutomationSystem.Calendare.UC" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Loaded="mainWindow_Loaded" FlowDirection="LeftToRight" ResizeMode="NoResize" Closed="mainWindow_Closed">
To auto-hide Windows 10 Taskbar, right-click on the Windows 10 Desktop and select the Personalize option. After selecting the Taskbar option from the left side pane and turn the toggle On next to “Automatically hide the taskbar in desktop mode.”
Basically, to keep it on top you just set the lose focus event to make it go back to top.
An alternative to H.B.'s method is just to set the Visibility to hidden and set ShowInTaskbar to false. This still creates the window and lets it do its thing.
You can set the MaxHeight
property of that window to SystemParameters.MaximizedPrimaryScreenHeight
using the constructor.
public MainWindow() { InitializeComponent(); this.MaxHeight = SystemParameters.MaximizedPrimaryScreenHeight; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With