當前位置: 首頁>>代碼示例>>C#>>正文


C# Data.FilterEventArgs類代碼示例

本文整理匯總了C#中System.Windows.Data.FilterEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# FilterEventArgs類的具體用法?C# FilterEventArgs怎麽用?C# FilterEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


FilterEventArgs類屬於System.Windows.Data命名空間,在下文中一共展示了FilterEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: CollectionViewSource_Filter

 private void CollectionViewSource_Filter(object sender, FilterEventArgs e)
 {
     if (e.Item is PersonViewModel)
         e.Accepted = ((PersonViewModel)e.Item).IsGuest;
     else
         e.Accepted = false;
 }
開發者ID:apazureck,項目名稱:bierstrichler,代碼行數:7,代碼來源:PersonListview.xaml.cs

示例2: CollectionViewSource_Filter

 private void CollectionViewSource_Filter(object sender, FilterEventArgs e)
 {
     if (e.Item is ItemViewModel)
         e.Accepted = ((ItemViewModel)e.Item).Model.Available;
     else
         e.Accepted = false;
 }
開發者ID:apazureck,項目名稱:bierstrichler,代碼行數:7,代碼來源:DrinkList.xaml.cs

示例3: SortedApplications_OnFilter

        private void SortedApplications_OnFilter(object sender, FilterEventArgs e)
        {
            if (_vm == null && DataContext != null)
            {
                _vm = (ApplicationsViewModel)DataContext;
            }

            if (_vm == null || e.Item == null)
                return;

            if (e.Item.GetType() == typeof(DirectoryItemViewModel))
            {
                e.Accepted = false;
                return;
            }

            FileItemViewModel fileItem = (FileItemViewModel)e.Item;
            if (!fileItem.Pinned && fileItem.Accesses == 0)
            {
                e.Accepted = false;
                return;
            }

            e.Accepted = string.IsNullOrEmpty(_vm.SearchFilter) || fileItem.Name.Contains(_vm.SearchFilter);
        }
開發者ID:larrybeall,項目名稱:RemoteAppLauncher,代碼行數:25,代碼來源:Pinned.xaml.cs

示例4: FilterIconList

        /// <summary>
        /// Filters the icon list.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="FilterEventArgs"/> instance containing the event data.</param>
        private void FilterIconList(object sender, FilterEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(FilterString))
                return;

            var icon = (IconInfo)e.Item;
            e.Accepted = !string.IsNullOrWhiteSpace(icon.Name) && icon.Name.ToUpper(CultureInfo.InvariantCulture).Contains(FilterString.ToUpper(CultureInfo.InvariantCulture));
        }
開發者ID:mparsin,項目名稱:Elements,代碼行數:13,代碼來源:IconListViewModel.cs

示例5: CharactersSource_Filter

		private void CharactersSource_Filter(object sender, FilterEventArgs e)
		{
			Character character = e.Item as Character;
			if (character != null)
				e.Accepted = !character.IsMob;
			else
				e.Accepted = true;
		}
開發者ID:codelicious,項目名稱:TSW.CombatTracker,代碼行數:8,代碼來源:CombatDisplay.xaml.cs

示例6: IconSource_OnFilter

        private void IconSource_OnFilter(object sender, FilterEventArgs e)
        {
            var icon = e.Item as IconDescription;

            if (icon == null) return;

            e.Accepted = icon.Description.ToLower().Contains(FilterText.Text.ToLower());
        }
開發者ID:ImaginaryDevelopment,項目名稱:Font-Awesome-WPF,代碼行數:8,代碼來源:MainWindow.xaml.cs

示例7: RecentItems_Filter

        private void RecentItems_Filter(object sender, FilterEventArgs e)
        {
            ItemViewModel itemVM = e.Item as ItemViewModel;

            if (itemVM == null)
                e.Accepted = false;
            else
                e.Accepted = itemVM.Item.LastModified > DateTime.Now.Subtract(recentTimeSpan);
        }
開發者ID:yadyn,項目名稱:ItsBeen,代碼行數:9,代碼來源:RecentListView.xaml.cs

示例8: ShowOnlyBargainsFilter

 private void ShowOnlyBargainsFilter(object sender, FilterEventArgs e)
 {
     var product = e.Item as AuctionItem;
     if (product != null)
     {
         // Filter out products with price 25 or above
         e.Accepted = product.CurrentPrice < 25;
     }
 }
開發者ID:ClemensT,項目名稱:WPF-Samples,代碼行數:9,代碼來源:MainWindow.cs

示例9: PlayerList_Filter

        void PlayerList_Filter(object sender, FilterEventArgs e)
        {
            var player = e.Item as GlobalPlayer;

            if (player == null)
                e.Accepted = false;
            else if (!player.Name.Contains(_searchFilter, StringComparison.OrdinalIgnoreCase))
                e.Accepted = false;
        }
開發者ID:Hertizch,項目名稱:HrtzCraft,代碼行數:9,代碼來源:MainWindow.xaml.cs

示例10: FilteredItems_Filter

        private void FilteredItems_Filter(object sender, FilterEventArgs e)
        {
            ItemViewModel itemVM = e.Item as ItemViewModel;
            string category = (CategoryComboBox.SelectedValue ?? String.Empty).ToString();

            if (itemVM == null)
                e.Accepted = false;
            else
                e.Accepted = itemVM.Item.Category == category;
        }
開發者ID:yadyn,項目名稱:ItsBeen,代碼行數:10,代碼來源:CategoryListView.xaml.cs

示例11: FilterItem

        private void FilterItem(object sender, FilterEventArgs e)
        {
            if (Filter == null) {
                e.Accepted = true;

                return;
            }

            e.Accepted = Filter(e.Item);
        }
開發者ID:strager,項目名稱:NoCap,代碼行數:10,代碼來源:Filterer.cs

示例12: OnFilter

 private void OnFilter(object sender, FilterEventArgs e)
 {
     var item = e.Item as ProductName;
     if (item != null)
     {
         if (!item.Name.ContainsIgnoreKey(searchQuery))
         {
             e.Accepted = false;
         }
     }
 }
開發者ID:hva,項目名稱:warehouse.net,代碼行數:11,代碼來源:ProductPickerViewModel.cs

示例13: Filter

        private void Filter(object obj, FilterEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(_searchText))
            {
                e.Accepted = true;
                return;
            }

            JsonManga manga = e.Item as JsonManga;
            e.Accepted = (manga != null && manga.Title.ToLowerInvariant().Contains(_searchText.ToLowerInvariant()));
        }
開發者ID:BinaryTENSHi,項目名稱:MangaEden,代碼行數:11,代碼來源:ListViewModel.cs

示例14: CollectionViewSource_Filter

        private void CollectionViewSource_Filter(object sender, FilterEventArgs e)
        {
            var res = true;
            var versionToDiaply = this.VersionToDisplay;

            var a = e.Item as CommentViewModel;
            if (a != null)
            {
                res = versionToDiaply <= 0 || a.VersionNumber == versionToDiaply;
            }
            e.Accepted = res;
        }
開發者ID:killbug2004,項目名稱:WSProf,代碼行數:12,代碼來源:CommentsViewer.xaml.cs

示例15: ApplyFilter

        void ApplyFilter(object sender, FilterEventArgs e)
        {
            UserInfo svm = (UserInfo)e.Item;

            if (string.IsNullOrWhiteSpace(this.Filter) || this.Filter.Length == 0)
            {
                e.Accepted = true;
            }
            else
            {
                e.Accepted = svm.Name.Contains(Filter) || svm.Pinyin.Contains(Filter) || svm.UserName.Contains(Filter) || svm.OrganizationName.Contains(Filter) || svm.OrganizationNamePinyin.Contains(Filter) || (!string.IsNullOrEmpty(svm.Phone) && svm.Phone.Contains(Filter));
            }
        }
開發者ID:GavinHome,項目名稱:REVOLUTION,代碼行數:13,代碼來源:SearchUsersViewModel.cs


注:本文中的System.Windows.Data.FilterEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。