Window declared in XAML crashes

4 posts, 0 answers
  1. Ciaran
    Ciaran avatar
    10 posts
    Member since:
    Nov 2007

    Posted 07 Sep 2009 Link to this post

    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!
  2. Hristo Borisov
    Admin
    Hristo Borisov avatar
    298 posts

    Posted 07 Sep 2009 Link to this post

    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.
  3. DevCraft banner
  4. Ciaran
    Ciaran avatar
    10 posts
    Member since:
    Nov 2007

    Posted 08 Sep 2009 Link to this post

    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.

  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 08 Sep 2009 Link to this post

    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.
Back to Top