日期:2014-05-20  浏览次数:20695 次

WPF ListView中一个列如果实现图片加字符
WPF ListView中一个列如果实现图片加字符 如这个列中是状态图标+名称,是通过数据绑定上去的,里面是一个Image和Labe,但是图片跟文字叠加了,我试过用grid来定他们的格局使他们不重叠,结果还是这样的。我应该怎样解决,使他们不重叠。

xaml代码如下

<GridViewColumn Header="状态" Width="80" x:Name="nameFine" >
                                                <GridViewColumn.CellTemplate>
                                                    <DataTemplate>                                                     
                                                       <Grid Width="60">
                                                            <Grid.ColumnDefinitions>
                                                                <ColumnDefinition Width="*" />
                                                                <ColumnDefinition Width="2*" />
                                                            </Grid.ColumnDefinitions>                                                           
                                                            <Image Height="18" Width="18"  Source="{Binding Path=Fine,Converter={StaticResource weekConvert}}">