punker76 / MahApps.Metro.SimpleChildWindow

A simple child window for MahApps.Metro
MIT License
374 stars 55 forks source link

ChildWindow not showing up in designer #114

Closed eiredrake closed 4 years ago

eiredrake commented 4 years ago

Liking the ease of controlling child windows... especially opening and closing them. But I'm not sure if I'm doing something wrong or what but the MetroWindow shows up just fine in the designer.

But any ChildWindow view I create just show up as a blank region in the designer which makes it hard to add content to the view.

Is there any way to get the child windows showing up so I can see what I'm doing?

eiredrake commented 4 years ago

Designer Support

Apparently if you set the IsOpen attribute on the child window to 'True' then it shows up in the designer.

That seems pretty odd. Is that the way it's supposed to be?

eiredrake commented 4 years ago

and while the IsOpen="True" is set, the dialog doesn't show up from the normal ShowChildWindowAsync() until you turn it to False again.

eiredrake commented 4 years ago

as a hack... you can bind it to a property that is FALSE by default and then use a FallbackValue as TRUE like such

IsOpen="{Binding IsOpenHack, FallbackValue=True}"

and then the dialog will show up in both the designer and at runtime.

However it's a hack. Surely this isn't the way it's supposed to work.

timunie commented 4 years ago

Hi @eiredrake,

I use normally a UserControl as content, so I have a good designer view.

Happy coding Tim

eiredrake commented 4 years ago

Do you mean putting a user control inside the content of the child window? Yeah I'm trying that now... without the IsOpen property there's nothing in the designer.

with without

timunie commented 4 years ago

No I mean adding a new UserControl as a file and use that inside the childwondow.

please use gitter instead of issues for your questions. Join the chat: https://gitter.im/punker76/MahApps.Metro.SimpleChildWindow

thank you for your understanding.