/// <summary>
        /// データバインド項目を生成する(2)
        /// </summary>
        /// <typeparam name="T">型</typeparam>
        /// <param name="name">string : 項目名</param>
        /// <param name="value">T : 値</param>
        /// <param name="act">Action : 初期設定デリゲート</param>
        /// <returns>DataBindPropertyItem</returns>
        protected DataBindPropertyItem <T> CreateDataBindProperty <T>(string name, T value, Action <DataBindPropertyItem <T> > act)
        {
            var property = new DataBindPropertyItem <T>(name, value, false, false);

            act(property);
            return(AddProperty(property) as DataBindPropertyItem <T>);
        }
Exemple #2
0
        /// <summary>
        /// データバインド項目を生成する(1)
        /// </summary>
        /// <typeparam name="T">型</typeparam>
        /// <param name="name">string : 項目名</param>
        /// <param name="value">T : 値</param>
        /// <param name="acceptInvalidValue">bool : 不正な値を受け入れる?</param>
        /// <param name="isReadOnly">bool : 読み込み専用?</param>
        /// <returns>DataBindPropertyItem</returns>
        protected DataBindPropertyItem <T> CreateDataBindProperty <T>(string name, T value, bool acceptInvalidValue = true, bool isReadOnly = false)
        {
            var property = new DataBindPropertyItem <T>(name, value, acceptInvalidValue, isReadOnly);

            AddProperty(property);
            return(property);
        }