0

現在、実際の画面サイズをインチまたはその他の測定単位で取得するのに苦労しています。

その情報を入手することは可能ですか?

4

1 に答える 1

0
var bounds = Window.Current.Bounds;
    double w = bounds.Width;
    double h = bounds.Height;
    switch (DisplayProperties.ResolutionScale)
    {
       case ResolutionScale.Scale140Percent:
            w = Math.Ceiling(w * 1.4);
            h = Math.Ceiling(h * 1.4);
            break;
        case ResolutionScale.Scale180Percent:
            w = Math.Ceiling(w * 1.8);
            h = Math.Ceiling(h * 1.8);
            break;
    }

    Size resolution = new Size(w, h);

ここから取得した回答:リンク およびここ:リンク

于 2015-10-30T09:48:01.567 に答える