c# - d:DesignInstance freezes up my designer -


i've got following collectionviewsource:

<collectionviewsource      x:key="csvdataitemsgrouped"      issourcegrouped="true"      source="{binding dayitems, mode=oneway}"      itemspath="calendaritems"     d:source="{binding groups, source={d:designinstance type=sdata:sampleweekdatasource, isdesigntimecreatable=true} }"> </collectionviewsource> 

my sampleweekdatasource looks this:

public sealed class sampleweekdatasource {              public sampleweekdatasource() {         _groups = new observablecollection<dayitem> {             new dayitem(datetime.now) {                 calendaritems = new observablecollection<calendaritem> {                     new calendaritem(1, "test 1", datetime.now, datetime.now, "tralala")                 }             }         };     }      private observablecollection<dayitem> _groups = new observablecollection<dayitem>();     public observablecollection<dayitem> groups {         { return this._groups; }     } 

when try rebuild project, designer shows item briefly (but not header item) , designer hangs, process eating whole core.

am doing wrong test data? thanks!

edit:

so disabled groupstyle , designer doesn't freeze anymore. groupstyle code isn't correct? it's this:

<listview.groupstyle>                             <groupstyle>                                 <groupstyle.headercontainerstyle>                                     <style targettype="listviewheaderitem">                                         <setter property="padding" value="0, 0, 12, 10" />                                         <setter property="minheight" value="10" />                                     </style>                                 </groupstyle.headercontainerstyle>                                 <groupstyle.headertemplate>                                     <datatemplate >                                          <textblock                                             margin="10,0,0,0"                                            text="{binding daydate, converter={staticresource cvtstringformat}, converterparameter=\{0:ddd d\}}"/>                                     </datatemplate>                                 </groupstyle.headertemplate>                              </groupstyle>                          </listview.groupstyle> 

edit 2: when follow on visual studio examples still going freeze.

so i've did digging , think found problem. i've been programming visual studio 2015 on windows 10 , new universal app project.

i've stripped whole application , created simple grouped observable collection 2 strings. same happened designer. items shown in designer. however, group template still wasn't shown. , yes, after few seconds, whole designer process hung , had restart designer.

now final attempt, tried recreate exact same issue on visual studio 2013 , 'old' universal template. guess what, works perfectly! there's still fishy going on in visual studio 2015 or windows 10.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -