开发者

ListView binding

I binded my column (Status) to value. But I need to show image for each values. For example, Status column has values : 0, 1, 2, 0, 1, 1,0 So, for each values should correspond to the image. I want to see not value, but image!!! How I can do this ? please help me.

<GridView>
    <GridView.ColumnHeaderContainerStyle>
        <Style>
            <Setter Property="FrameworkElement.Visibility" Value="Collapsed"/>
        </Style>
    </GridView.ColumnHeaderContainerStyle开发者_Go百科>                            
    <GridViewColumn Header="ID" Width="0" DisplayMemberBinding="{Binding ID}" />
    <GridViewColumn Header="Login" Width="90" DisplayMemberBinding="{Binding Login}" />
    <GridViewColumn Width="65" Header="Status" DisplayMemberBinding="{Binding UserStatus}">
    </GridViewColumn>

</GridView>


You might need to use the Itemtemplate

An example can be found here

http://huydinhpham.blogspot.com/2008/11/using-listvew-to-display-complex-data.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜