Flycoder

Flying with codes

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::
  <Grid Grid.IsSharedSizeScope="True">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*"
                                      SharedSizeGroup="g1"></ColumnDefinition>
                    <ColumnDefinition Width="9*"
                                      SharedSizeGroup="g2"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Label>
                    <TextBlock Name="txt132"
                               Text="3333333333333333333333333333333333333"
                               TextTrimming="CharacterEllipsis"></TextBlock>
                </Label>

                <Label Grid.Column="1">
                    <TextBlock Name="txt13112"
                               Text="111"
                               TextTrimming="CharacterEllipsis"></TextBlock>
                </Label>
            </Grid>

first, the with must be "*", not fixed width, you will see TextTrimming does not work, when you reomve the

IsSharedSizeScope, it works

posted on 2011-09-07 16:21  flycoder  阅读(495)  评论(0)    收藏  举报