回复 9楼Alice的帖子
- <ItemsControl x:Name="itemsControl" ItemsSource="{Binding CVList}" Grid.ColumnSpan="3" Margin="0,4,0,0" Grid.Row="1">
- <ItemsControl.Template>
- <ControlTemplate>
- <ScrollViewer x:Name="ScrollViewer" Padding="{TemplateBinding Padding}">
- <ItemsPresenter />
- </ScrollViewer>
- </ControlTemplate>
- </ItemsControl.Template>
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Horizontal"/>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Border Padding="3">
- <WrapPanel>
- <c1:C1SlideTile Content="C1SlideTile" HorizontalAlignment="Left" Margin="0,0,0,0" ContentSource="{Binding Member}"
- VerticalAlignment="Top" c1:C1TileService.PointerDownAnimation="True" Width="277" Height="100" Padding="0">
- <c1:C1Tile.ContentTemplate>
- <DataTemplate>
- <Grid Width="277" Height="100">
- <Grid.Resources>
- <Style
- TargetType="Border">
- <Setter
- Property="BorderBrush"
- Value="LightGray"></Setter>
- <Setter
- Property="BorderThickness"
- Value="1"></Setter>
- </Style>
- </Grid.Resources>
- <Grid.RowDefinitions>
- <RowDefinition Height="27*"/>
- <RowDefinition Height="23*"/>
- <RowDefinition Height="28*"/>
- <RowDefinition Height="22*"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="26*"/>
- <ColumnDefinition Width="45*"/>
- <ColumnDefinition Width="23*"/>
- <ColumnDefinition Width="8*"/>
- <ColumnDefinition Width="88*"/>
- <ColumnDefinition Width="87*"/>
- </Grid.ColumnDefinitions>
- <Grid.Background>
- <LinearGradientBrush EndPoint="1,0" StartPoint="0.0,0.0">
- <GradientStop Color="White"/>
- <GradientStop Color="Thistle" Offset="1"/>
- </LinearGradientBrush>
- </Grid.Background>
- <Border Grid.ColumnSpan="6" Grid.RowSpan="4"/>
- <Label x:Name="bh" Foreground="DimGray" FontSize="13" FontFamily="微软雅黑" FontWeight="Bold" Height="26" VerticalAlignment="Center" VerticalContentAlignment="Center"
- Margin="8,1,3,0" HorizontalContentAlignment="Center" Opacity="0.5" Grid.Column="2"
- Content="{Binding OrderNo}" Grid.ColumnSpan="3"/>
- </Grid>
- </DataTemplate>
- </c1:C1Tile.ContentTemplate>
- <!--<c1:C1Tile.BackContentTemplate>
- <DataTemplate></DataTemplate>
- </c1:C1Tile.BackContentTemplate>-->
- </c1:C1SlideTile>
- </WrapPanel>
- </Border>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
复制代码
这里的CVList就是一个ObservableCollection<Member>集合,tile的contentsource绑定的是Member,然后里面有个label绑定的是Member的属性OrderNo |