Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
145
Unable to call XamDialogWindow.BringToFront() - 'Unable to cast object...' error
posted

Hi,

I have a base MDI dialog window class which is subclass of XamDialogWindow and a lot of subclasses of the base class for each type of different forms. Also I have a main container (subclass of UserControl) for all MDI windows. When menu item is selected, application tries to create new window or if it exists and was minimized, restore to normal size:

if (this.Layout.Children.Contains(dlgView))
{
                dlgView.WindowState = Infragistics.Controls.Interactions.WindowState.Normal;
                dlgView.BringToFront();
                dlgView.IsActive = true;
}...

and on BringToFront() call I got an error message:

Unable to cast object of type '...' to type 'Infragistics.Controls.Interactions.XamDialogWindow'. I tried to cast dlgView to XamDialogWindow - it doesn't help. If I try to use BringIntoView() - nothing happens. If I have only IsActive set to true 0 nothinhg happens again, i.e. form is not visible.

What can be wrong ?

Thanks,

Ed