MahApps / MahApps.Metro

A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.
https://mahapps.com
MIT License
9.29k stars 2.45k forks source link

Animation is not working when WindowsFormsHost drawed #108

Closed gencer closed 12 years ago

gencer commented 12 years ago

As an animation (via Resource) When form is opened all objects fade in and came from left to right a little bit. Except one thing. WindowsFormsHost.

If i draw or create WindowsFormsHost control, every single control is animated except this one. But the fact is after animation is done, if i click to the form (anywhere) WindowsFormsHost control basically jump from left to right (a little bit) instantly like 10-15px.

Is it possible to fix this or enable the feature for this control or override this like; ++ IsAnimationDone? ++ Yes ++++ Show WindowsFormsHost ++ No ++++ Hide and wait until animation is done.

ghost commented 12 years ago

No, its not possible due to "airspace" issues with WindowsFormsHost in .NET 4. What is the particular control you're hosting inside the WindowsFormHost? There may be a suitable alternative that'll play nicely with WPF.

gencer commented 12 years ago

I want to deploy a standard "Windows Forms User Control" inside of this host. UserControl has some dependencies like DevExpress controls. (Due to DevExpress WPF limitations like theming and some disabled features i want to use fully qualified grid on my WPF by using WF User Control).

ghost commented 12 years ago

Unfortunately, not a chance from me, and I don't have any recommendations on alternatives. If the animations is effecting the user experience, try rolling your own metrowindow without the animation.

gencer commented 12 years ago

Hmm. Actually the animation on WindowsFormsHost is not necessary. I could just hide it and show it instantly just after the animation stops. Does MahApps.Metro has events for animation (start, during, stop) on Form starting?

ghost commented 12 years ago

Not on MetroWindow, no.

gencer commented 12 years ago

Thanks for the fast replies.

I'm sure i will find a way to handle this issue.

quintstoffers commented 11 years ago

I recently found myself in a similar situation, where I'm stuck with a UserControl. Would it be possible to somehow disable all animations instead of completely recreating the default MetroWindow except for the animations?

s-elena commented 11 years ago

Hi Gencer and Quipeace, have you solved this issue in the end? I faced the same problem now, was digging a lot before understand that it's all because of this animation!