locked
VS11 designer crashes with a disabled checkbox

    Question

  • Add a checkbox control into XMAL and add the property IsEnable="False". A few seconds later the cursor will start rolling circles and the "Design" view of the XMAL will show "An Unhandled Exception has occurred". There is not much details about the exception, it just show "System.Runtime.Remoting.RemotingException". Reload designer will still have the some issue. Although the app can be successfully compiled and run, the design view shows nothing but this exception box during coding time.

    I can repro this issue with default C# metro style Grid application template as well. 

     

    Thank you.

    Friday, December 2, 2011 6:05 AM

Answers

All replies

  • Hi Angela,

    I was unable to reproduce this.  I tried both a minimal Application and a Grid Application.  In both cases I added an element as follows with no problem:

    <CheckBox IsEnabled="False">Test Check</CheckBox>

    Are you able to reproduce this in a minimal Application?  Does the position where the Checkbox element is entered in the Xaml make a difference?  Can you confirm that the Xaml is valid?

    If you can send a minimal Xaml file that reproduces the problem or provide exact steps on how to modify a wizard generated Xaml app then it will help track this down.

    Also, are you using VS11 Express or the Visual Studio 11 Developer Preview?

    --Rob

    Friday, December 2, 2011 11:37 PM
    Owner
  • Hi Rob,

     

    I can repro this issue on both VS11 Express and VS 11 Developer preview.

    Create a minimal C# Metro style Grid apps. In the GroupedCollectionPage.xmal file, 3rd line back from the end of the file, just above </Grid>, double click the checkbox control from Toolbox. It will generate the following line:

    <CheckBox Content="CheckBox" HorizontalAlignment="Left" VerticalAlignment="Top" />

    Add IsEnable property so the line becomes:

    <CheckBox Content="CheckBox" HorizontalAlignment="Left" VerticalAlignment="Top" IsEnabled="False"/>

    Wait for a while or just compile the apps, the Design view will show an handled exception has occurred.

     

    Thank you.

    Monday, December 5, 2011 2:45 AM
  • This is known in the developer preview and has been fixed.
    Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)
    Tuesday, December 6, 2011 9:33 PM