This is a migrated thread and some comments may be shown as answers.

RadWindow crashes on click unless modal

5 Answers 133 Views
Window
This is a migrated thread and some comments may be shown as answers.
Rudolf Bösch
Top achievements
Rank 1
Rudolf Bösch asked on 03 Aug 2009, 01:48 PM
Hi there,

I've just upgraded from SL2 to SL3, using the preview version 3 of the Telerik contols. Since, any RadWindow (even empty ones) I put inside a xaml crashes the application on any click anywhere inside the window when I instantiate it using:
this.RootVisual = new LoginWindow(); 
The debugger output is: 
ManagedRuntimeError error #4004 in control 'Xaml1':      
System.NullReferenceException: Der Objektverweis wurde nicht auf eine      
Objektinstanz festgelegt.  
bei Telerik.Windows.Controls.RadWindowManager.BringToFront(RadWindow window)  
bei Telerik.Windows.Controls.RadWindow.BringToFront()  
bei Telerik.Windows.Controls.RadWindow.OnGotFocus(RoutedEventArgs e)    
bei System.Windows.Controls.Control.OnGotFocus(Control ctrl, EventArgs e)  
bei MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)   

Using the same window adding
wndLogin.ShowDialog();  

OR

wndLogin.Show();
after the window has loaded makes it behave normally.

Any ideas about what I'm missing?

5 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 05 Aug 2009, 07:34 AM
Hello Rudolf,

It would be great if you could open a support ticket and send us a project that reproduces the problem as we are not sure what your scenario is?

Kind regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
Nicko Pekhlivanov
Top achievements
Rank 1
answered on 11 Feb 2010, 09:20 PM
I'm having the same problem. Please post some solution.
0
Miroslav Nedyalkov
Telerik team
answered on 12 Feb 2010, 09:59 AM
Hi Veselin,

 Could you please provide us with some more information - what version of RadControls for Silverlight do you use, what version of Silverlight do you use.

If you could provide a sample project that reproduces the problem this would help us find out what the problem is and provide a solution.

Kind regards,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Alan Sauls
Top achievements
Rank 1
answered on 15 Feb 2010, 08:50 PM
I also am having this problem.  It is just as described before.  If you have a RadWindow defined in XAML and try to use it as your rootvisual it will crash every time you click on it.  Displaying the window with Show or ShowDialog does not cause this behavior.  I'm guessing that adding it as the rootvisual causes it to be created and displayed differently that calling Show or ShowDialog.  Just follow the simple step of creating a RadWindow in XAML, i.e.

<

 

 

telerikNavigation:RadWindow Visibility="Visible"

 

 

 

 

 

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

 

 

 

 

 

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

 

 

 

 

 

xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"

 

 

 

 

 

xmlns:radDock="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

 

 

 

 

 

xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Bowne.Common.Controls;assembly=Bowne.Common.Controls"

 

 

 

 

 

xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"

 

 

 

 

 

mc:Ignorable="d" x:Name="myName" x:Class="myClass"

 

 

 

 

 

Width="1300" Height="800" Header="Processor">

some controls here

 

</

 

 

telerikNavigation:RadWindow>

 

 

 



Now add as rootvisual like this

 

 

private void Application_Startup(object sender, StartupEventArgs e)

 

{

 

 

 

 

    this.RootVisual = new mClass();

 

}

Now run app and click anywhere on RadWindow...kaboom

System.NullReferenceException was unhandled by user code
  Message=Object reference not set to an instance of an object.
  StackTrace:
       at Telerik.Windows.Controls.RadWindowManager.BringToFront(RadWindow window)
       at Telerik.Windows.Controls.RadWindow.BringToFront()
       at Bowne.XBRL.XBRLProcessor.XprocessorMain..ctor(Byte[] bytes, Int32 filingId)
       at Bowne.XBRL.XBRLProcessor.App.Application_Startup(Object sender, StartupEventArgs e)
       at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
  InnerException:

 
Interestingly, that this issue occurs in Internet Explorer and Firefox but not Chrome.

I have tried this on various versions including the latest build.

 

 

I am using VS2010 and Silverlight4.

 

 

 

0
Miroslav Nedyalkov
Telerik team
answered on 17 Feb 2010, 01:35 PM
Hello Alan,

 What you try to do is not supported - the RadWindow control cannot be RootVisual of your application - it only can be used showing it using the Show and ShowDialog methods (like the Sivlerlight child window control).

Greetings,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Window
Asked by
Rudolf Bösch
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Nicko Pekhlivanov
Top achievements
Rank 1
Alan Sauls
Top achievements
Rank 1
Share this question
or