当前位置: 代码迷 >> Silverlight >> ItemControl绑定数据没效果
  详细解决方案

ItemControl绑定数据没效果

热度:916   发布时间:2013-02-26 00:00:00.0
ItemControl绑定数据没有效果
在XAML界面上我使用一个ItemControl作为数据容器,然后在它的数据模板里使用了3个控件,代码如下:

            <Style x:Key="GuestTilePanelStyle" TargetType="ItemsControl">
                <Setter Property="xc:xTilePanel.ItemHeight" Value="30" />
                <Setter Property="xc:xTilePanel.ItemWidth" Value="120" />
                <Setter Property="ItemsControl.ItemsPanel">
                    <Setter.Value>
                        <ItemsPanelTemplate>
                            <xc:xTilePanel AnimatesNewItem="True" Attraction="2.0" Dampening="0.40" Variation="1.00" />
                        </ItemsPanelTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="ItemsControl.ItemTemplate">
                    <Setter.Value>
                        <DataTemplate>
                            <Grid x:Name="gProgressContainer" Height="30">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="30" />
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="20" />
                                </Grid.ColumnDefinitions>
                                <xc:xSprocket x:Name="skProgress" Grid.Column="0" Width="30" Height="30" TickColor="#FF02AA1A" />
  相关解决方案