ListBox in Window Fatal Error. No UserControl involved.

2 posts, 0 answers
  1. Charlie
    Charlie avatar
    2 posts
    Member since:
    Jan 2009

    Posted 19 Jan 2009 Link to this post

    I am constructing a small demo for my employeer, as we are considering to purchase a license for the Silverlight controls. 
    This code is using the latest binaries (Trial version).

            <Canvas x:Name="WindowSpace">               
                <telerikNavigation:RadWindow x:Name="MyWin">
                    <ListBox x:Name="MyListBox" Width="300" Height="200"></ListBox>


                MyListBox.MouseLeftButtonDown += delegate


              Uncaught Sys.InvalidOperationException: Sys.InvalidOperationException: ManagedRuntimeError error #4004 in control 'Xaml1':           System.Exception: Oåterkalleligt fel (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
              And a blank screen in Google chrome.

    The problem is associated with the events "SelectionChanged" and "MouseLeftButtonDown". 
    If I use "MouseEnter" instead, it works.

    But apparantely the problem was that "noticing that you are trying to use the RadWindow control as a UserControl".
    That is not the case here. The XAML above is within Page.xaml. This was the simplest possible application I could make to raise the error. What is the work around? Is this fixed in the "full version"?

  2. Charlie
    Charlie avatar
    2 posts
    Member since:
    Jan 2009

    Posted 20 Jan 2009 Link to this post

    Problem solved.

    In a previous thread you meantioned that the windows should be opened no sooner than
    this.RootVisual = new Page();

    It appeares that if I Show(); the Window the Page() constructor, it crash. 
    Adding a Loaded-event where i Show() the Windows to LayoutRoot solves the problem.
Back to Top