コード例 #1
0
        /// <summary>
        ///     Gets the string value for the specified
        /// </summary>
        /// <param name="value">The value.</param>
        public static string ConvertToString(this ContentEditableOption value)
        {
            switch (value)
            {
            case ContentEditableOption.Inherit:
                return("inherit");

            case ContentEditableOption.On:
                return("true");

            case ContentEditableOption.Off:
                return("false");

            default:
                return(null);
            }
        }
コード例 #2
0
 /// <summary>
 /// Specifies whether a user can edit the content of an element or not
 /// </summary>
 public static TBuilder ContentEditable <TBuilder>(this TBuilder instance,
                                                   ContentEditableOption value) where TBuilder : IContentEditableAttributeBuilder
 {
     return(instance.Attr("contenteditable", value.ConvertToString()));
 }