Just like the developer tools that web browsers offer to inspect code and figure out the hierarchical order of elements, these buttons help you do just that in an application WPF.
For example, the first one, when you click, opens a window Visual Studiowith the information of the hierarchical order, the second one is used to select an element on the screen in order to locate it through the first button.
These buttons are shown when you run the application from Visual Studio, when you compile and run the file with extension .exethey will not be shown.
To remove the minimize , maximize and close buttons from a window in WPFthe following is done:
In the main tag called Window del xaml, the property WindowStylewith value is inserted None, looking like this:WindowStyle="None"
Here comes a problem! Cannot drag window with mouse cursor. Let's solve this. To the objects that we want the drag window functionality to be applied, we insert MouseDownthe following code in its event:
BarTitle.MouseDown += (o, e) =>
{
if (o == null) return;
DragMove();
};
In this case the object is called BarTitle , you always have to verify that the variable object othat receives the event is notnull
They can be removed like this:
English:
Spanish:
And that's it, greetings.
Just like the developer tools that web browsers offer to inspect code and figure out the hierarchical order of elements, these buttons help you do just that in an application
WPF
.For example, the first one, when you click, opens a window
Visual Studio
with the information of the hierarchical order, the second one is used to select an element on the screen in order to locate it through the first button.These buttons are shown when you run the application from
Visual Studio
, when you compile and run the file with extension.exe
they will not be shown.To remove the minimize , maximize and close buttons from a window in
WPF
the following is done:In the main tag called Window del
xaml
, the propertyWindowStyle
with value is insertedNone
, looking like this:WindowStyle="None"
Here comes a problem! Cannot drag window with mouse cursor. Let's solve this. To the objects that we want the drag window functionality to be applied, we insert
MouseDown
the following code in its event:In this case the object is called BarTitle , you always have to verify that the variable
object o
that receives the event is notnull
Wait my answer help you this works in visual studio 2019
herramientas
in the upper panel (Tools
) Alt + T (only in English)opciones
(options
)Depuración
(Debugging
)Recarga Activa
(Hot Reload
)Habilitar la barra de herramientas en la aplicación
(enable in app-bar for toolbar
)