Grid.IsSharedScopeSize incompatible with * columns in WPF Grid -


i using issharedsizescope in itemscontrol in wpf keep same widths each row.

unfortunately isn't compatible width='*' columns, makes 'a b c' text column spill off end of page.

<border borderbrush="red" borderthickness="1">     <stackpanel grid.issharedsizescope="true">          <grid horizontalalignment="stretch">             <grid.columndefinitions>                 <columndefinition width="auto" sharedsizegroup="g1"/>                 <columndefinition width="auto" sharedsizegroup="g2" />                 <columndefinition width="*"  sharedsizegroup="g3" />             </grid.columndefinitions>              <textblock text="col0" grid.column="0" margin="0,0,5,0"/>             <textblock text="col1" grid.column="1" margin="0,0,5,0"/>              <textblock text="a b c d e f g h j k l m n o p q r s t u v w x y z" textwrapping="wrap" grid.column="2"/>          </grid>      </stackpanel>                     </border> 

this won't wrap, if change grid.issharedscopesize false work, rows uneven.

is there clever way achieve this, or have manually set width on 'a b c' text column?

(note: inside itemscontrol not shown)

i think may similar ran here: http://blog.alner.net/archive/0001/01/01/grid_sharedsizegroup_doesnt_honor_maxwidth.aspx

i have workaround in post, though it's not pretty.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -