void ManageDomBoolProperty_Changed(string htmlPropertyName, bool newValue) { if (INTERNAL_VisualTreeManager.IsElementInVisualTree(this) && _mediaElement != null) { if (newValue) { INTERNAL_HtmlDomManager.SetDomElementAttribute(_mediaElement, htmlPropertyName, "true"); } else { INTERNAL_HtmlDomManager.RemoveDomElementAttribute(_mediaElement, htmlPropertyName, forceSimulatorExecuteImmediately: true); } } }
internal protected virtual void ManageIsEnabled(bool isEnabled) { if (INTERNAL_VisualTreeManager.IsElementInVisualTree(this)) { var domElementToEnableOrDisable = (INTERNAL_OptionalSpecifyDomElementConcernedByIsEnabled != null ? INTERNAL_OptionalSpecifyDomElementConcernedByIsEnabled : INTERNAL_OuterDomElement); if (isEnabled) { INTERNAL_HtmlDomManager.RemoveDomElementAttribute(domElementToEnableOrDisable, "disabled", forceSimulatorExecuteImmediately: true); } else { INTERNAL_HtmlDomManager.SetDomElementAttribute(domElementToEnableOrDisable, "disabled", true, forceSimulatorExecuteImmediately: true); } } }
public void removeAttribute(string attributeName) //todo: generalize to all the methods (thanks to DynamicObject) { INTERNAL_HtmlDomManager.RemoveDomElementAttribute(_domElementRef, attributeName, forceSimulatorExecuteImmediately: true); }