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