static Size() { emptySize = new Size { _width = double.NegativeInfinity, _height = double.NegativeInfinity }; TypeFromStringConverters.RegisterConverter(typeof(Size), s => Parse(s)); }
static Cursor() { HtmlCursors = new string[Cursors._cursorTypeCount]; HtmlCursors[(int)CursorType.None] = "none"; HtmlCursors[(int)CursorType.No] = "not-allowed"; HtmlCursors[(int)CursorType.Arrow] = "default"; HtmlCursors[(int)CursorType.AppStarting] = "progress"; HtmlCursors[(int)CursorType.Cross] = "crosshair"; HtmlCursors[(int)CursorType.Help] = "help"; HtmlCursors[(int)CursorType.IBeam] = "text"; HtmlCursors[(int)CursorType.SizeAll] = "move"; HtmlCursors[(int)CursorType.SizeNESW] = "nesw-resize"; HtmlCursors[(int)CursorType.SizeNS] = "ns-resize"; HtmlCursors[(int)CursorType.SizeNWSE] = "nwse-resize"; HtmlCursors[(int)CursorType.SizeWE] = "ew-resize"; HtmlCursors[(int)CursorType.UpArrow] = "auto"; // not implemented HtmlCursors[(int)CursorType.Wait] = "wait"; HtmlCursors[(int)CursorType.Hand] = "pointer"; HtmlCursors[(int)CursorType.Pen] = "auto"; // not implemented HtmlCursors[(int)CursorType.ScrollNS] = "auto"; // not implemented HtmlCursors[(int)CursorType.ScrollWE] = "auto"; // not implemented HtmlCursors[(int)CursorType.ScrollAll] = "all-scroll"; HtmlCursors[(int)CursorType.ScrollN] = "auto"; // not implemented HtmlCursors[(int)CursorType.ScrollS] = "auto"; // not implemented HtmlCursors[(int)CursorType.ScrollW] = "auto"; // not implemented HtmlCursors[(int)CursorType.ScrollE] = "auto"; // not implemented HtmlCursors[(int)CursorType.ScrollNW] = "auto"; // not implemented HtmlCursors[(int)CursorType.ScrollNE] = "auto"; // not implemented HtmlCursors[(int)CursorType.ScrollSW] = "auto"; // not implemented HtmlCursors[(int)CursorType.ScrollSE] = "auto"; // not implemented HtmlCursors[(int)CursorType.ArrowCD] = "auto"; // not implemented HtmlCursors[(int)CursorType.Stylus] = "auto"; // not implemented HtmlCursors[(int)CursorType.Eraser] = "auto"; // not implemented TypeFromStringConverters.RegisterConverter(typeof(Cursor), INTERNAL_ConvertFromString); }
static Matrix() { TypeFromStringConverters.RegisterConverter(typeof(Matrix), s => Parse(s)); }
static Color() { TypeFromStringConverters.RegisterConverter(typeof(Color), INTERNAL_ConvertFromString); }
static Matrix() { TypeFromStringConverters.RegisterConverter(typeof(Matrix), INTERNAL_ConvertFromString); }
static RelativeSource() { TypeFromStringConverters.RegisterConverter(typeof(RelativeSourceMode), INTERNAL_ConvertFromString); }
static FontWeight() { TypeFromStringConverters.RegisterConverter(typeof(FontWeight), INTERNAL_ConvertFromString); }
static Size() { TypeFromStringConverters.RegisterConverter(typeof(Size), INTERNAL_ConvertFromString); }
static Duration() { TypeFromStringConverters.RegisterConverter(typeof(Duration), INTERNAL_ConvertFromString); }
static Thickness() { TypeFromStringConverters.RegisterConverter(typeof(Thickness), INTERNAL_ConvertFromString); }
static DataPointBinding() { TypeFromStringConverters.RegisterConverter(typeof(DataPointBinding), INTERNAL_ConvertFromString); }
static Geometry() { TypeFromStringConverters.RegisterConverter(typeof(Geometry), INTERNAL_ConvertFromString); }
//// <summary> //// Creates a System.String representation of this Windows.Foundation.Point. //// </summary> //// <param name="provider">Culture-specific formatting information.</param> //// <returns> //// A System.String containing the Windows.Foundation.Point.X and Windows.Foundation.Point.Y //// values of this Windows.Foundation.Point structure. //// </returns> //public string ToString(IFormatProvider provider) //{ // throw new NotImplementedException(); // //var provider.GetFormat(typeof(Point)); // //todo: I don't know how a FormatProvider should be used // return X + "," + Y; //} static Point() { TypeFromStringConverters.RegisterConverter(typeof(Point), s => Parse(s)); }
static RepeatBehavior() { TypeFromStringConverters.RegisterConverter(typeof(RepeatBehavior), INTERNAL_ConvertFromString); }
static PointCollection() { TypeFromStringConverters.RegisterConverter(typeof(PointCollection), s => Parse(s)); }
static FontStretch() { TypeFromStringConverters.RegisterConverter(typeof(FontStretch), INTERNAL_ConvertFromString); }
static PropertyPath() { TypeFromStringConverters.RegisterConverter(typeof(PropertyPath), INTERNAL_ConvertFromString); }
static CornerRadius() { TypeFromStringConverters.RegisterConverter(typeof(CornerRadius), INTERNAL_ConvertFromString); }
static Brush() { TypeFromStringConverters.RegisterConverter(typeof(Brush), INTERNAL_ConvertFromString); }
//todo: add SizeToCell and SizeToHeader everywhere when we'll know how to handle them (idea: add in the grid's cell something like INTERNAL_IsRelevantToAuto (depends on how auto works) static DataGridLength() { TypeFromStringConverters.RegisterConverter(typeof(DataGridLength), INTERNAL_ConvertFromString); }
static CacheMode() { TypeFromStringConverters.RegisterConverter(typeof(CacheMode), INTERNAL_ConvertFromString); }
static ImageSource() { TypeFromStringConverters.RegisterConverter(typeof(ImageSource), INTERNAL_ConvertFromString); }
static DoubleCollection() { TypeFromStringConverters.RegisterConverter(typeof(DoubleCollection), INTERNAL_ConvertFromString); }
static FontFamily() { TypeFromStringConverters.RegisterConverter(typeof(FontFamily), INTERNAL_ConvertFromString); }
static KeyTime() { TypeFromStringConverters.RegisterConverter(typeof(KeyTime), INTERNAL_ConvertFromString); }
static Cursor() { TypeFromStringConverters.RegisterConverter(typeof(Cursor), INTERNAL_ConvertFromString); Cursors.FillCursorTypeToStringDictionary(); }
static Rect() { TypeFromStringConverters.RegisterConverter(typeof(Rect), INTERNAL_ConvertFromString); }
static TextDecorationCollection() { TypeFromStringConverters.RegisterConverter(typeof(TextDecorationCollection), INTERNAL_ConvertFromString); }
//// <summary> //// Creates a System.String representation of this Windows.Foundation.Point. //// </summary> //// <param name="provider">Culture-specific formatting information.</param> //// <returns> //// A System.String containing the Windows.Foundation.Point.X and Windows.Foundation.Point.Y //// values of this Windows.Foundation.Point structure. //// </returns> //public string ToString(IFormatProvider provider) //{ // throw new NotImplementedException(); // //var provider.GetFormat(typeof(Point)); // //todo: I don't know how a FormatProvider should be used // return X + "," + Y; //} static Point() { TypeFromStringConverters.RegisterConverter(typeof(Point), INTERNAL_ConvertFromString); }