wpf 中的DataTemplate 绑定控件

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tk="using:Microsoft.Toolkit.Uwp.UI.Controls"
xmlns:local="using:Xiaowei.Themes"
xmlns:controls="using:Xiaowei.Controls">
  <Style TargetType="ListViewItem"
    x:Key="ListItemStyleForPlayer">
    <Setter Property="Margin"
    Value="0, 0, 0, 0" />
    <Setter Property="TabNavigation"
    Value="Local" />
    <Setter Property="Template"
    Value="{ThemeResource ListItemControlTemplateForPlayer}"></Setter>
  </Style>  

 

 

<DataTemplate x:Key="DriverMessageDataTemplate">
  <tk:DropShadowPanel>
  <Grid HorizontalAlignment="Left">
  <Grid Background="#ffffff" CornerRadius="0,8,8,8">
  <controls:DriverListBubble DriverMessage="{Binding Self}"/>
  </Grid>
  </Grid>
  </tk:DropShadowPanel>
</DataTemplate>

posted @ 2021-04-29 10:40  MaxBruce  阅读(303)  评论(0编辑  收藏  举报