Installing Window.Content does not destroy the user interface that was there before?

I load the XAML file with XamlReader and set the return object to the Content property of the window. Although this seems to work well, it does not quite do what I expect. If the original XAML of the window contains keys or buttons, they seem to still exist. Keybindings still work, and any Button objects in the code remain valid. I would expect everything to be destroyed since I replaced them with the new XAML, but that is not the case.

So what does content customization do? What does he not do?

Thanks!

+3
source share
1 answer

Content , , , . WPF , , , . , GC . , , :

ApplicationCommands.Close.InputGestures.Clear();

, !

+1

Source: https://habr.com/ru/post/1709215/


All Articles