资源简介

WPF自定义搜索控件,详情可见博文:http://blog.csdn.net/zhuo_wp/article/details/78821711

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;

namespace Client.MVVM
{
    /// 
    /// A command whose sole purpose is to relay its functionality to other objects by invoking delegates. 
    /// The default return value for the CanExecute method is ‘true‘.
    /// 

    public class RelayCommand : ICommand
    {

        #region Declarations

        private readonly Func _canExecute;
        private readonly Action _execute;

        #endregion

        #region Constructors

        /// 
        /// Initializes a new instance of the  class and the command can always be executed.
        /// 

        /// The execution logic.
        public RelayCommand(Action execute) : this(execute null)
        {
        }

        /// 
        /// Initializes a new instance of the  class.
        /// 

        /// The execution logic.
        /// The execution status logic.
        public RelayCommand(Action execute Func canExecute)
        {
            if (execute == null)
                throw new ArgumentNullException(“execute“);
            _execute = execute;
            _canExecute = canExecute;
        }

        #endregion

        #region ICommand Members

        public event EventHandler CanExecuteChanged
        {
            add
            {
                if (_canExecute != null)
                    CommandManager.RequerySuggested += value;
            }
            remove
            {

                if (_canExecute != null)
                    CommandManager.RequerySuggested -= value;
            }
        }

        public Boolean CanExecute(object parameter)
        {
            return _canExecute == null ? true : _canExecute();
        }

        public void Execute(object parameter)
        {
            _execute();
        }

        #endregion
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-12-16 21:10  SearchableTextBoxExample\
     目录           0  2017-12-16 20:48  SearchableTextBoxExample\.vs\
     目录           0  2017-12-16 20:48  SearchableTextBoxExample\.vs\SearchableTextBoxExample\
     目录           0  2017-12-16 20:48  SearchableTextBoxExample\.vs\SearchableTextBoxExample\v15\
     文件       96768  2017-12-16 21:14  SearchableTextBoxExample\.vs\SearchableTextBoxExample\v15\.suo
     目录           0  2017-12-16 21:10  SearchableTextBoxExample\Client.MVVM\
     文件        2677  2017-12-16 20:12  SearchableTextBoxExample\Client.MVVM\Client.MVVM.csproj
     目录           0  2017-12-16 21:10  SearchableTextBoxExample\Client.MVVM\Properties\
     文件        1358  2017-12-16 20:12  SearchableTextBoxExample\Client.MVVM\Properties\AssemblyInfo.cs
     文件        2183  2017-12-16 20:12  SearchableTextBoxExample\Client.MVVM\RelayCommand.cs
     文件        1026  2017-12-16 20:12  SearchableTextBoxExample\Client.MVVM\UIManager.cs
     文件        1154  2017-12-16 20:12  SearchableTextBoxExample\Client.MVVM\ViewModelbase.cs
     目录           0  2017-12-16 21:10  SearchableTextBoxExample\Client.MVVM\bin\
     目录           0  2017-12-16 21:10  SearchableTextBoxExample\Client.MVVM\bin\Debug\
     文件        6656  2017-12-16 20:16  SearchableTextBoxExample\Client.MVVM\bin\Debug\Client.MVVM.dll
     文件       17920  2017-12-16 20:16  SearchableTextBoxExample\Client.MVVM\bin\Debug\Client.MVVM.pdb
     目录           0  2017-12-16 22:06  SearchableTextBoxExample\Client.MVVM\bin\Release\
     目录           0  2017-12-16 21:10  SearchableTextBoxExample\Client.MVVM\obj\
     目录           0  2017-12-16 21:10  SearchableTextBoxExample\Client.MVVM\obj\Debug\
     文件         468  2017-12-16 20:16  SearchableTextBoxExample\Client.MVVM\obj\Debug\Client.MVVM.csproj.FileListAbsolute.txt
     文件        2213  2017-12-16 20:16  SearchableTextBoxExample\Client.MVVM\obj\Debug\Client.MVVM.csprojResolveAssemblyReference.cache
     文件        6656  2017-12-16 20:16  SearchableTextBoxExample\Client.MVVM\obj\Debug\Client.MVVM.dll
     文件       17920  2017-12-16 20:16  SearchableTextBoxExample\Client.MVVM\obj\Debug\Client.MVVM.pdb
     文件          42  2017-12-16 21:11  SearchableTextBoxExample\Client.MVVM\obj\Debug\CoreCompileInputs.cache
     文件         711  2017-12-16 20:53  SearchableTextBoxExample\Client.MVVM\obj\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        6883  2017-12-16 21:11  SearchableTextBoxExample\Client.MVVM\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     目录           0  2017-12-16 22:06  SearchableTextBoxExample\Client.MVVM\obj\Debug\TempPE\
     目录           0  2017-12-16 21:10  SearchableTextBoxExample\Client.MVVM\obj\Release\
     文件          42  2017-12-16 20:12  SearchableTextBoxExample\Client.MVVM\obj\Release\CoreCompileInputs.cache
     目录           0  2017-12-16 21:15  SearchableTextBoxExample\SearchableTextBox\
     目录           0  2017-12-16 21:02  SearchableTextBoxExample\SearchableTextBox\Converters\
............此处省略103个文件信息

评论

共有 条评论