示例#1
0
        private void PopulateCustomTags()
        {
            AllCustomTagNames = new ObservableCollection <string>();

            ViewCustomTagNames = CollectionViewSource.GetDefaultView(AllCustomTagNames);


            foreach (CustomTag tag in VM_ShokoServer.Instance.AllCustomTags.OrderBy(a => a.TagName.ToLower(CultureInfo.InvariantCulture)))
            {
                AllCustomTagNames.Add(tag.TagName);
            }


            ViewCustomTagNames.Filter = CustomTagFilter;
            ViewCustomTagNames.Refresh();
        }
        private void PopulateCustomTags()
        {
            AllCustomTagNames = new ObservableCollection <string>();

            ViewCustomTagNames = CollectionViewSource.GetDefaultView(AllCustomTagNames);

            List <SortPropOrFieldAndDirection> sortCriteria = new List <SortPropOrFieldAndDirection>();

            sortCriteria.Add(new SortPropOrFieldAndDirection("TagName", false, SortType.eString));
            List <CustomTagVM> tags = Sorting.MultiSort <CustomTagVM>(JMMServerVM.Instance.AllCustomTags.ToList(), sortCriteria);

            foreach (CustomTagVM tag in tags)
            {
                AllCustomTagNames.Add(tag.TagName);
            }


            ViewCustomTagNames.Filter = CustomTagFilter;
            ViewCustomTagNames.Refresh();
        }
 void txtCustomTagSearch_TextChanged(object sender, TextChangedEventArgs e)
 {
     ViewCustomTagNames.Refresh();
 }