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

Window declared in XAML crashes

3 Answers 61 Views
Window
This is a migrated thread and some comments may be shown as answers.
Ciaran
Top achievements
Rank 1
Ciaran asked on 07 Sep 2009, 12:53 PM
Hi all I'm a newbie to Telerik's controls (had used MS ChildWindow) so be kind!

I have declared a RadWindow inside a Grid i n XAML.
It displays as expected - but if I try to move/resize it I get the following error:

Unhandled Error in Silverlight Application Code: 4004 Category: ManagedRuntimeError Message: System.NullReferenceException: Object reference not set to an instance of an object. at Telerik.Windows.Controls.RadWindow.OnThumbDragStarted(Object sender, DragStartedEventArgs e) at System.Windows.Controls.Primitives.Thumb.OnMouseLeftButtonDown(MouseButtonEventArgs e) at System.Windows.Controls.Control.OnMouseLeftButtonDown(Control ctrl, EventArgs e) at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)

Then the window disappears.

Strangely, if I run it from Blend I get an extra error about RadWindowManager.BringToFront but the window stays visible.

I know you don't advocate static declaration of Windows but is this a bug or is moving resizing such windows unsupported.

Why do you advise against declaration in XAML? You say that the window is not part of the VisualTree?
I understand that in WPF each window has it's own separate VisualTree... but does why can't Windows be hosted in panels?
You use static declartion in your help:
ms-help://telerik.windows.controls.silverlight/telerik.windows.controls.window/radwindow-behavior-properties.html

I suppose my request is for general guidance.
I've been using MVVM a lot and I like it... I don't like the idea of having to go to use code-behind to instantiate/show/positionwindows.

Thanks and I like your controls great feature set!

3 Answers, 1 is accepted

Sort by
0
Hristo Borisov
Telerik team
answered on 07 Sep 2009, 05:29 PM
Hello Ciaran,

What is the version you use? The documentation article you refer to is not part of our latest version and I cannot reproduce your problem in the Q2 SP1 2009 that is currently available on our website. We used to have similar problems with one of the previous versions that wasn't built specifically for Silverlight 3. If you are using anything older than Q2 SP1 2009 released on August 12, you should update your assemblies.

We encourage you not to declare RadWindow in xaml, since we detach the control from the visual tree and its declaration becomes meaningless. Moreover, declaring the control in xaml will introduce layout logic that will not be preserved if we detach the control from the visual tree and allow you to drag and drop the control.

Hope this resolves your problems.

Regards,
Hristo Borisov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ciaran
Top achievements
Rank 1
answered on 08 Sep 2009, 08:32 AM
I'm using RadControls for Silverlight 2009.2 812. I've downloaded the the timestamp in the MSI's digital signature is 

12 August 2009 18:09:27. So I think I have the latest released build.  
I can provide you with a sample project that demonstrates this if you like.

0
Miroslav Nedyalkov
Telerik team
answered on 08 Sep 2009, 09:04 AM
Hello Ciaran,

Could you please open a support ticket and send the sample project you mentioned. It would help us a lot to find out what the problem is.

Regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Window
Asked by
Ciaran
Top achievements
Rank 1
Answers by
Hristo Borisov
Telerik team
Ciaran
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Share this question
or