开发者

DisplayMemberBinding when my ItemsSource is a List<string[]>

How do I bind DisplayMemberBinding when my ItemsSource is a List<string[]> in my GridView?

EDIT: Figured it out! No need to answer. (开发者_如何学Cbinded to [i], where i is array index)


You can use-

    <ListView ItemsSource="{Binding ListOfStringArrays}">
        <ListView.View>
            <GridView>
                <GridViewColumn Width="140" DisplayMemberBinding="{Binding [0]}" />
                <GridViewColumn Width="140" DisplayMemberBinding="{Binding [1]}"/>
                <GridViewColumn Width="140" Header="Column 3" DisplayMemberBinding="{Binding [2]}"/>
            </GridView>
        </ListView.View>
    </ListView>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜