Пример #1
0
        public override ApplyState Apply(ComputedStyle style, Value value)
        {
            // Request a layout:
            style.RequestLayout();

            // Convert to shaderset if it's text:
            Css.Units.TextUnit text = (value as Css.Units.TextUnit);

            if (text != null)
            {
                // is style[GlobalProperty]==value?
                // Otherwise we've just got inherit.
                if (style[GlobalProperty] == value)
                {
                    // Auto-wrap in shaderset("name")
                    style[GlobalProperty] = new ShaderSetFunction(text.Text);

                    // Reload value from computed:
                    return(ApplyState.ReloadValue);
                }
            }

            // Ok!
            return(ApplyState.Ok);
        }
Пример #2
0
 public Content()
 {
     // Note that it is not IsTextual - this is correct!
     GlobalProperty = this;
     InitialValue   = new Css.Units.TextUnit("");
 }