dahall / AeroWizard

Library for easy creation of custom and Aero Wizards. Aero Wizard strictly follows Microsoft guidelines and uses Visual Styles to get visual theming.
MIT License
112 stars 32 forks source link

Issues when WizardControl's parent is a UserControl #15

Closed dahall closed 6 years ago

dahall commented 6 years ago

If you place a Wizard Control on a UserControl then issues arise since the Wizard Control expects the parent to be a form. I suspect if you placed it in other containers, like a Panel for instance, you would get the same issues.   The culprit appears to be during InitializeComponent() in WizardControl.OnParentChanged line 548:   parentForm = base.Parent as Form;   since base.Parent will be a UserControl, not a form. Even if you use base.ParentForm, that will return null since the user control (or Panel?) will not be attached to a form yet.   t/y

Originally posted: 2011-11-14T15:07:02

dahall commented 6 years ago

Will you try the attached assembly and let me know if you experience the problem?

Originally posted: 2011-11-15T23:33:32

dahall commented 6 years ago

Sorry, it still does not work properly.

Just to add a little - the key issue is that since it doesn't have the parentForm, it does not apply the glass effects. Additionally if you click on the title bar, you will get an exception (in TitleBar_MouseMove).

Originally posted: 2011-11-16T11:53:01

dahall commented 6 years ago

The WizardPageContainer can be added to any control and will not affect mouse movement or glass effects.

Originally posted: 2014-12-12T14:30:03