punker76 / MahApps.Metro.SimpleChildWindow

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

Make child windows resizable #19

Open Levvy055 opened 9 years ago

Levvy055 commented 9 years ago

Make it available to change size of Child Window. By: -grabbing borders -using grip in corner

Levvy055 commented 9 years ago

Using for example:

Height = ActualHeight * 20;
UpdateLayout();

is not changing anything

marcosgerene commented 11 months ago

Sorry, I know this was 8 years ago, but is it possible now?

timunie commented 10 months ago

It is possible but not out of the box. You will need to add the logic to you UserControl you want to show.

marcosgerene commented 10 months ago

@timunie

I know you from Avalonia, how are you doing? =D

It is possible but not out of the box. You will need to add the logic to you UserControl you want to show.

My UserControl in that case is a Window. I just take the Window Content and put this in the ChildWindow content. The idea is to open a ChildWindow instead a Window as ShowDialog. Is it still possible to resize?


PS: I know it is not the best place to ask, but... MahApps/SimpleChildWindow is avaliable on Avalonia via XPF?

timunie commented 10 months ago

Hi @marcosgerene

I know you from Avalonia, how are you doing? =D

I'm fine, thx. Yeah I started using WPF and MahApps back than and it is and was a pleasure. But when M$ decided to not really invest in it anymore, I looked into alternatives for it.

My UserControl in that case is a Window. I just take the Window Content and put this in the ChildWindow content. The idea is to open a ChildWindow instead a Window as ShowDialog. Is it still possible to resize?

You could create a control named ResizeContainer (or what ever), add it as first child and your window content goes into resizeContainer.Content. Should be possible.

PS: I know it is not the best place to ask, but... MahApps/SimpleChildWindow is avaliable on Avalonia via XPF?

Oh I don't know this. Reach out to the team to get a demo license to test. But I maybe this is not so easy as it requires the Window to be MahApps style iirc. So probably easier to adopt the code to make it a real Avalonia control.