RadWindow crashes on click unless modal

6 posts, 0 answers
  1. Rudolf Bösch
    Rudolf Bösch avatar
    25 posts
    Member since:
    Jun 2009

    Posted 03 Aug 2009 Link to this post

    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?

  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 05 Aug 2009 Link to this post

    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.
  3. DevCraft banner
  4. Veselin Gerginov
    Veselin Gerginov avatar
    2 posts
    Member since:
    Jul 2006

    Posted 11 Feb 2010 Link to this post

    I'm having the same problem. Please post some solution.
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 12 Feb 2010 Link to this post

    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.
  6. Alan Sauls
    Alan Sauls avatar
    12 posts
    Member since:
    Dec 2009

    Posted 15 Feb 2010 Link to this post

    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.

     

     

     

  7. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 17 Feb 2010 Link to this post

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