概述 <data:DataGrid x:Name="results" RowHeight="60" IsReadOnly="True" Width="800" Margin="14" RowBackground="#99FFFFFF" AlternatingRowBackground="#66FFFFFF" HeadersVisibility="None" GridlinesV
<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> 总结
以上是内存溢出为你收集整理的使用Silverlight2dataGrid例子(完整XAML)全部内容,希望文章能够帮你解决使用Silverlight2dataGrid例子(完整XAML)所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
评论列表(0条)