Does anyone know what they are and how to remove the buttons that are added by default when creating a project WPF ?
I attach an image with the buttons to which I refer:
In windows forms, it does not appear only in WPF
As well as the developer tools offered by web browsers to inspect the code and find out the hierarchical order of the elements, these buttons help you in an application WPF
.
For example, the first one, when you click, opens a window in Visual Studio
with the information of the hierarchical order, the second is used to select an item on the screen and through the first button locate it.
These buttons are displayed when you run the application from Visual Studio
, when you compile and run the file with extension .exe
these will not be displayed.
You can remove them like this:
English:
Tools - > Options - > Debugging - > General - > Enable UI Debugging Tools for XAML
Spanish:
Tools - > Options - > Debugging - > General - > Enable the interface debugging tools using XAML
And ready, greetings.
To remove the minimize buttons, maximize and close a
window in WPF
the following is done:
On the main label, call Window of the xaml
the property WindowStyle
is inserted with value None
, keeping this: WindowStyle="None"
Here a problem arises! You can not drag the window with the mouse cursor. Let's solve this.
To the objects that we want the window drag functionality to be applied, we insert the following code in your event MouseDown
:
BarTitle.MouseDown += (o, e) =>
{
if (o == null) return;
DragMove();
};
In this case the object is called BarTitle , you should always check that the variable object o
that recives the event is not null