답변됨 Deriving from GridView throws exception

  • 2012년 2월 29일 수요일 오후 10:01
     
      코드 있음

    I am using win8 CP and vs2011 beta.

    I tried to derive from GridView with the following code and I get

    Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

    What am I doing wrong?

     xmlns:local="using:Application1"

      <local:MyGridView x:Name="list1" >
               
            </local:MyGridView>

     public class MyGridView : GridView
        {
            public MyGridView()
            {
                DefaultStyleKey = typeof(GridView);
            }
    
        }


    http://leeontech.wordpress.com/


    • 편집됨 lee d 2012년 2월 29일 수요일 오후 10:02
    •  

모든 응답

  • 2012년 3월 1일 목요일 오후 3:48
    중재자
     
     
    I'm not able to reproduce this problem - can you send me a simple reproduction project?  MSMALL at Microsoft.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator

  • 2012년 3월 1일 목요일 오후 3:55
     
     

    Hi,

    That is all the code I have in the project, other than the code generated by default.

    I am mistaken. If I give the gridview a name and set the ItemsSource in code. I get that exception

    If I do it from resource like below and set source of cvs it works.

    <Page.Resources>
            <CollectionViewSource x:Name="cvs"/>
        </Page.Resources>

     var items = Enumerable.Range(0, 100).Select(x => new Customer { Id = x, Name = "person.." + x.ToString() });
               // gridview1.ItemsSource =items; -- exception

               // cvs.Source = items; -- this works


    http://leeontech.wordpress.com/


    • 편집됨 lee d 2012년 3월 1일 목요일 오후 4:05
    •  
  • 2012년 3월 5일 월요일 오후 6:44
    중재자
     
     
    Do you still need require help on this issue?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator

  • 2012년 3월 5일 월요일 오후 9:01
     
     

    Hi,

    Sent you a sample to reproduce.


    http://leeontech.wordpress.com/

  • 2012년 3월 7일 수요일 오후 8:22
    중재자
     
     
    I'm working on this and will update when I know more.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator

  • 2012년 3월 7일 수요일 오후 9:20
    중재자
     
     답변됨
    Hi Lee - this is a known bug that we're working on. The bug happens when setting ItemsSource on a list control.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator

  • 2012년 4월 19일 목요일 오전 12:00
     
     

    Hello Matt,

    I'm seeing the same issue, though I see it occuring even with this syntax:

               // cvs.Source = items;

    Do you have any update if/when there will be a fix?

  • 2012년 4월 19일 목요일 오후 1:26
    중재자
     
     
    In any case, it definitely won't be in CP.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator

  • 2012년 5월 5일 토요일 오후 4:50
     
     
    do you know any workaround for the current version?

    notacat

  • 2012년 5월 9일 수요일 오후 6:49
     
     

    Matt, this issue (Catastrophic failure at setting ItemsSource property and at clearing Items property) is a show stopper. Can you confirm that it is  fixed in some upcoming version or should I post it to MS connect?


    notacat

  • 2012년 5월 9일 수요일 오후 7:33
    중재자
     
     
    notacat -please send me your application.  MSMALL at Microsoft.  I can get this looked at quickly.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator If my reply answers your question, please mark this post as answered.

  • 2012년 5월 11일 금요일 오전 9:43
     
     

    Matt, did you get my mail with sample?


    notacat

  • 2012년 5월 14일 월요일 오후 3:26
    중재자
     
     
    Yes I did.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.