- ago
When an extension creates a ChildWindow, is it possible to change the window's title dynamically i.e. while the window is already open?
0
156
Solved
7 Replies

Reply

Bookmark

Sort
- ago
#1
I didn't try this, but this might work. If you have the reference to the child window (child here) then...

child.MyMDIChild.Title = "My New Title";
0
Best Answer
- ago
#2
Works nicely, thanks!

Do you also know how to de-iconify such a window and bring it to the front?
0
- ago
#3
I didn't try this, but probably...

child.MyMDIChild.WindowState = WindowState.Normal;

I don't know if it will bring the window forward.

Also, see: https://learn.microsoft.com/en-us/dotnet/api/system.windows.windowstate?view=windowsdesktop-7.0

A handy tool is JetBrains dotPeek. It is free: https://www.jetbrains.com/decompiler/

In my opinion, JetBrains makes excellent development tools. I use JetBrains Rider instead of Visual Studio.
0
- ago
#4
CODE:
child.MyMDIChild.WindowState = WindowState.Normal;

This indeed de-iconifies the UserWindow and brings it just behind the current window.

QUOTE:
I don't know if it will bring the window forward.

No, it doesn't. And I couldn't find a way to make the UserWindow the topmost window.

Anyone any ideas?
0
- ago
#5
Or to put the question differently:

What is Windows->MyUserWindow doing, exactly?
0
Glitch8
 ( 9.58% )
- ago
#6
You could try child.MyMDIChild.Container.BringToTop(child)
1
- ago
#7
And this one worked! :) :) :)
Thanks!
0

Reply

Bookmark

Sort