/// <summary> /// Register an element behavior definition /// </summary> /// <param name="styleName">name of html element or css class name to apply behavior to</param> /// <param name="uniqueId">class id for behavior, actual value is irrelevant, this just signals MSHTML /// that it should query the behavior via the IElementBehaviorFactory registered on the editing site</param> /// <param name="behaviorCreator">callback function for creating behavior instances</param> public ElementBehaviorDefinition(string targetClass, Guid clsid, ElementBehaviorCreator createBehavior) { TargetClass = targetClass; Clsid = clsid.ToString("D"); HtmlId = String.Format(CultureInfo.InvariantCulture, "{0}_WRITER_BEHAVIOR", TargetClass.ToUpper(CultureInfo.InvariantCulture).Replace(" ", "_")); _createBehavior = createBehavior; }