Пример #1
0
        private static Thickness GetFromMinimizedMarginForDpi()
        {
            var currentDpi = SystemHelper.GetCurrentDPI();
            var thickness  = new Thickness(7, 7, 5, 7);

            switch (currentDpi)
            {
            case 120:
                thickness = new Thickness(6, 6, 4, 6);
                break;

            case 144:
                thickness = new Thickness(7, 7, 4, 4);
                break;

            case 168:
            case 192:
                thickness = new Thickness(6, 6, 2, 2);
                break;

            case 240:
                thickness = new Thickness(6, 6, 0, 0);
                break;
            }

            return(thickness);
        }
Пример #2
0
        private Thickness GetDefaultMarginForDpi()
        {
            var currentDpi = SystemHelper.GetCurrentDPI();
            var thickness  = new Thickness(8, 8, 8, 8);

            switch (currentDpi)
            {
            case 120:
                thickness = new Thickness(7, 7, 4, 5);
                break;

            case 144:
                thickness = new Thickness(7, 7, 3, 1);
                break;

            case 168:
                thickness = new Thickness(6, 6, 2, 0);
                break;

            case 192:
            case 240:
                thickness = new Thickness(6, 6, 0, 0);
                break;
            }

            return(thickness);
        }