0
这是我的xaml代码,其中我有2个字段放置在一个模板列下。如何格式化数据网格中的DataGridTemplateColumn中的数据
现在我得到的格式是这样的输出,这样我可以betweeen这2列
Color
red image1
green image2
green image2
white image6
使输出看起来不错指定的空间。
我如何定义它们之间的空间,使得它看起来像上面的一个
现在THW输出是这
color Redimage1 greenimage2 greenimage2 whiteimage6
<sdk:DataGridTemplateColumn Header="Color" Width="80">
<sdk:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel Loaded ="StackPanel_Loaded" Orientation="Horizontal" Background="Transparent">
<TextBlock Text="{Binding Color}" TextWrapping="NoWrap" HorizontalAlignment="Center" Foreground="Blue"></TextBlock>
<Image x:Name="imgTargetScore" Source ="{Binding ColorImage}" Width="20" Height="20" Stretch ="Fill"/>
</StackPanel>
</DataTemplate>
</sdk:DataGridTemplateColumn.CellTemplate>
</sdk:DataGridTemplateColumn>
寻找热塑成型前一个解决方案
感谢状提前
王子