Beispiel #1
0
 static Size()
 {
     emptySize = new Size
     {
         _width  = double.NegativeInfinity,
         _height = double.NegativeInfinity
     };
     TypeFromStringConverters.RegisterConverter(typeof(Size), s => Parse(s));
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 static Matrix()
 {
     TypeFromStringConverters.RegisterConverter(typeof(Matrix), s => Parse(s));
 }
Beispiel #4
0
 static Color()
 {
     TypeFromStringConverters.RegisterConverter(typeof(Color), INTERNAL_ConvertFromString);
 }
Beispiel #5
0
 static Matrix()
 {
     TypeFromStringConverters.RegisterConverter(typeof(Matrix), INTERNAL_ConvertFromString);
 }
Beispiel #6
0
 static RelativeSource()
 {
     TypeFromStringConverters.RegisterConverter(typeof(RelativeSourceMode), INTERNAL_ConvertFromString);
 }
Beispiel #7
0
 static FontWeight()
 {
     TypeFromStringConverters.RegisterConverter(typeof(FontWeight), INTERNAL_ConvertFromString);
 }
Beispiel #8
0
 static Size()
 {
     TypeFromStringConverters.RegisterConverter(typeof(Size), INTERNAL_ConvertFromString);
 }
Beispiel #9
0
 static Duration()
 {
     TypeFromStringConverters.RegisterConverter(typeof(Duration), INTERNAL_ConvertFromString);
 }
Beispiel #10
0
 static Thickness()
 {
     TypeFromStringConverters.RegisterConverter(typeof(Thickness), INTERNAL_ConvertFromString);
 }
Beispiel #11
0
 static DataPointBinding()
 {
     TypeFromStringConverters.RegisterConverter(typeof(DataPointBinding), INTERNAL_ConvertFromString);
 }
Beispiel #12
0
 static Geometry()
 {
     TypeFromStringConverters.RegisterConverter(typeof(Geometry), INTERNAL_ConvertFromString);
 }
Beispiel #13
0
        //// <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));
        }
Beispiel #14
0
 static RepeatBehavior()
 {
     TypeFromStringConverters.RegisterConverter(typeof(RepeatBehavior), INTERNAL_ConvertFromString);
 }
Beispiel #15
0
 static PointCollection()
 {
     TypeFromStringConverters.RegisterConverter(typeof(PointCollection), s => Parse(s));
 }
Beispiel #16
0
 static FontStretch()
 {
     TypeFromStringConverters.RegisterConverter(typeof(FontStretch), INTERNAL_ConvertFromString);
 }
Beispiel #17
0
 static PropertyPath()
 {
     TypeFromStringConverters.RegisterConverter(typeof(PropertyPath), INTERNAL_ConvertFromString);
 }
Beispiel #18
0
 static CornerRadius()
 {
     TypeFromStringConverters.RegisterConverter(typeof(CornerRadius), INTERNAL_ConvertFromString);
 }
Beispiel #19
0
 static Brush()
 {
     TypeFromStringConverters.RegisterConverter(typeof(Brush), INTERNAL_ConvertFromString);
 }
Beispiel #20
0
        //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);
        }
Beispiel #21
0
 static CacheMode()
 {
     TypeFromStringConverters.RegisterConverter(typeof(CacheMode), INTERNAL_ConvertFromString);
 }
Beispiel #22
0
 static ImageSource()
 {
     TypeFromStringConverters.RegisterConverter(typeof(ImageSource), INTERNAL_ConvertFromString);
 }
Beispiel #23
0
 static DoubleCollection()
 {
     TypeFromStringConverters.RegisterConverter(typeof(DoubleCollection), INTERNAL_ConvertFromString);
 }
Beispiel #24
0
 static FontFamily()
 {
     TypeFromStringConverters.RegisterConverter(typeof(FontFamily), INTERNAL_ConvertFromString);
 }
Beispiel #25
0
 static KeyTime()
 {
     TypeFromStringConverters.RegisterConverter(typeof(KeyTime), INTERNAL_ConvertFromString);
 }
Beispiel #26
0
 static Cursor()
 {
     TypeFromStringConverters.RegisterConverter(typeof(Cursor), INTERNAL_ConvertFromString);
     Cursors.FillCursorTypeToStringDictionary();
 }
Beispiel #27
0
 static Rect()
 {
     TypeFromStringConverters.RegisterConverter(typeof(Rect), INTERNAL_ConvertFromString);
 }
Beispiel #28
0
 static TextDecorationCollection()
 {
     TypeFromStringConverters.RegisterConverter(typeof(TextDecorationCollection), INTERNAL_ConvertFromString);
 }
Beispiel #29
0
        //// <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);
        }