WPF: add controls to a child window chrome that has a close button

I am a C ++ programmer and I started a project to teach me WPF. I started creating desktop applications for viewing images and possibly retouching them, something like paint.net.

I want to wrap the controls (for example, see the figure below) in a child window chrome that has a close button. Something like MDI, but not really.
alt text

The easiest way, in my opinion, was to wrap it in another <window></window>, but WPF doesn't seem to like it. This gives an exception at runtime.

Is there an easier way to do this. I could not find any links that would explain anything like that.

+3
1

Window, Window , .

var childWindow = new MyChildWindow();
childWindow.Show();

WindowStyle = WindowStyle.ToolWindow MyChildWindow.

, , Window. Silverlight ChildWindow, WPF. - , HeaderedContentControl, , , ControlTemplate. , , , , , .

+3

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


All Articles