public static void Update(ComputedStyle style) { // Get the ordinal: string ordinal = PowerUI.HtmlOListElement.GetOrdinal(style, true); if (ordinal == "") { // (None). Remove the marker: style.RemoveVirtual(MarkerSelector.Priority); } else { // Require marker: Dom.Element node = style.GetOrCreateVirtual(MarkerSelector.Priority, "span", true) as Dom.Element; node.style.display = "inline-block"; node.style.width = "40px"; node.style.left = "-40px"; node.style.textAlign = "right"; node.style.position = "-spark-absolute"; // Write its content now: node.innerHTML = ordinal; } }
/// <summary>Gets or creates the virtual.</summary> internal void CreateVirtual(CssEvent e, int priority) { // Get the CS: ComputedStyle cs = e.SelectorTarget.computedStyle; // Create and apply: Node node = cs.GetOrCreateVirtual(priority, "span", true); e.SelectorTarget = (node as IRenderableNode).RenderData; }