How can I hide the top bar in wpf main window ?

sharon glipman 441 Reputation points
2021-10-11T22:46:01.227+00:00

I marked with red ellipse what part I mean that I want to hide when running the application.

139642-hide1.jpg

I tried to add to the MainWindow.xmal this line :

 WindowStyle="None"  

But it didn't hide it.

<Window x:Class="Wpf_Download_Files.MainWindow"  
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"  
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"  
        xmlns:local="clr-namespace:Wpf_Download_Files"  
        mc:Ignorable="d"  
        WindowStyle="None"  
        Title="MainWindow" Height="450" Width="800">  
Developer technologies | Windows Presentation Foundation
Developer technologies | C#
0 comments No comments
{count} votes

Accepted answer
  1. sharon glipman 441 Reputation points
    2021-10-11T23:57:19.68+00:00

    Found how to do it.

    My visual studio version is 2019 Community version 16.11.4

    The solution is in the visual studio menu : Tools > Options > Debugging > Hot Reload > On the right side under WPF and UWP uncheck the Enable in-app toolbar

    I marked in the screenshot on the right with red ellipse the property to be unchecked. by default it's checked true so disable it uncheck.

    139560-remove1.jpg

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.