首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Win8/XAML排序CollectionViewSource

Win8/XAML排序CollectionViewSource
EN

Stack Overflow用户
提问于 2014-04-17 08:59:31
回答 1查看 106关注 0票数 0

我正在尝试对我的CollectionViewSource进行排序。我尝试过SortDescriptions,但是它给出了一个未知的成员错误(即使在添加了引用之后)

代码语言:javascript
复制
    <common:LayoutAwarePage.Resources>

<common:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>

    <!--
        Collection of grouped items displayed by this page, bound to a set
        of the complete item list because items in groups cannot be virtualized
    -->
    <!--Replace d:Source... with the following to obtain data from the actual Azure Service-->
    <!--Source="{Binding ItemGroups, Source={d:DesignInstance IsDesignTimeCreatable=True, Type=ViewModels:ItemsShowcaseViewModel}}"-->
    <CollectionViewSource
        x:Name="groupedItemsViewSource"
        Source="{Binding ItemGroups}"
        d:Source="{Binding ItemGroups, Source={d:DesignInstance IsDesignTimeCreatable=True, Type=sampleData:ItemsShowcaseSampleData}}" IsSourceGrouped="True" 
        >


    </CollectionViewSource>


</common:LayoutAwarePage.Resources>
EN

回答 1

Stack Overflow用户

发布于 2014-04-18 01:58:05

排序没有内置到WinRT/XAML中的CollectionViewSource中。您需要在数据/视图模型中对数据进行排序。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23122809

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档