- <data:DataGrid x:Name="results" RowHeight="60" IsReadOnly="True" Width="800" Margin="14"
- RowBackground="#99FFFFFF" AlternatingRowBackground="#66FFFFFF"
- HeadersVisibility="None" GridlinesVisibility="Horizontal"
- RowDetailsVisibility="VisibleWhenSelected" SelectionMode="SingleFullRow">
- <data:DataGrid.Columns>
- <data:DataGridTemplateColumn Width="80">
- <data:DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Border CornerRadius="5" BorderThickness="1" Margin="5" BorderBrush="DarkGray" Background="Black">
- <Image Source="{Binding ImageUrl}" Stretch="UniformToFill" Margin="1"/>
- </Border>
- </DataTemplate>
- </data:DataGridTemplateColumn.CellTemplate>
- </data:DataGridTemplateColumn>
- <data:DataGridTextBoxColumn displayMemberBinding="{Binding Title}" FontSize="20" FontWeight="Bold" Width="527"/>
- <data:DataGridTemplateColumn Width="165">
- <data:DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <StackPanel VerticalAlignment="Center">
- <TextBlock Text="Source" Foreground="#666666" FontWeight="Bold" FontFamily="Trebuchet MS" FontSize="14"/>
- <TextBlock Text="{Binding Source}" FontFamily="Trebuchet MS" FontSize="14"/>
- </StackPanel>
- </DataTemplate>
- </data:DataGridTemplateColumn.CellTemplate>
- </data:DataGridTemplateColumn>
- </data:DataGrid.Columns>
- <data:DataGrid.RowDetailstemplate>
- <DataTemplate>
- <!-- MouseLeave -->
- <Grid Margin="5,5,0" Background="Transparent">
- <Grid.ColumnDeFinitions>
- <ColumnDeFinition />
- <ColumnDeFinition Width="Auto"/>
- </Grid.ColumnDeFinitions>
- <Grid.RowDeFinitions>
- <RowDeFinition Height="Auto"/>
- <RowDeFinition Height="10" />
- </Grid.RowDeFinitions>
- <StackPanel>
- <TextBlock Text="{Binding Description}" textwrapping="Wrap" Margin="5" FontFamily="Trebuchet MS" FontSize="16"/>
- <TextBlock Text="Posted On:" Foreground="#666666" Margin="5,0" FontFamily="Trebuchet MS" FontSize="14" FontWeight="Bold"/>
- <TextBlock Text="{Binding PublishDate}" Margin="5,5" FontFamily="Trebuchet MS" FontSize="14"/>
- <TextBlock Text="View Count:" Foreground="#666666" Margin="5,0" FontFamily="Trebuchet MS" FontSize="14" FontWeight="Bold"/>
- <TextBlock Text="{Binding ViewCount}" Margin="5,5" FontFamily="Trebuchet MS" FontSize="14"/>
- </StackPanel>
- <Border Grid.Column="1" Height="330" Width="440" CornerRadius="5" BorderThickness="1" Margin="5" BorderBrush="DarkGray" Background="Black" VerticalAlignment="Top">
- <Grid>
- <MediaElement Margin="2" Source="{Binding VideoUrl}" Autoplay="True"/>
- <Button Content="Play" Width="50" Height="50" Margin="0,35" Opacity="0"/>
- </Grid>
- </Border>
- </Grid>
- </DataTemplate>
- </data:DataGrid.RowDetailstemplate>
- </data:DataGrid>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。