public override string ToString() { switch (Type) { case PropertyType.Null: return("null"); case PropertyType.Calculated: return("calculated"); case PropertyType.Bool: return(Bool.ToString()); case PropertyType.String: return("string: " + StringHandle.ToString()); case PropertyType.MultiValue: return("multi: " + MultiValueHandle.ToString()); case PropertyType.Enum: return("enum: " + Enum.ToString()); case PropertyType.Color: return("color: " + Color.ToString()); case PropertyType.Integer: return(Integer.ToString() + " (integer)"); case PropertyType.Fractional: return(Fractional.ToString() + " (fractional)"); case PropertyType.Percentage: return(Percentage.ToString() + "%"); case PropertyType.AbsLength: return(Points.ToString() + "pt (" + Inches.ToString() + "in, " + Millimeters.ToString() + "mm) (abs)"); case PropertyType.RelLength: return(Points.ToString() + "pt (" + Inches.ToString() + "in, " + Millimeters.ToString() + "mm) (rel)"); case PropertyType.HtmlFontUnits: return(HtmlFontUnits.ToString() + " (html font units)"); case PropertyType.RelHtmlFontUnits: return(RelativeHtmlFontUnits.ToString() + " (relative html font units)"); case PropertyType.Multiple: return(Integer.ToString() + "*"); case PropertyType.Pixels: return(Pixels.ToString() + "px"); case PropertyType.Ems: return(Ems.ToString() + "em"); case PropertyType.Exs: return(Exs.ToString() + "ex"); case PropertyType.Milliseconds: return(Milliseconds.ToString() + "ms"); case PropertyType.kHz: return(kHz.ToString() + "kHz"); case PropertyType.Degrees: return(Degrees.ToString() + "deg"); } return("unknown value type"); }
private static uint ComposeRawValue(MultiValueHandle handle) { InternalDebug.Assert(handle.Handle < ValueMask); return(GetRawType(PropertyType.MultiValue) | handle.Handle); }
public void Set(MultiValueHandle handle) { this.rawValue = ComposeRawValue(handle); }
public PropertyValue(MultiValueHandle handle) { this.rawValue = ComposeRawValue(handle); }