DisplayProperties.ResolutionScale | resolutionScale property

1 out of 1 rated this helpful - Rate this topic

Gets the scale factor of the immersive environment.

Syntax


public:
static property ResolutionScale ResolutionScale { 
   ResolutionScale get();
}

Property value

Type: ResolutionScale

The scale factor of the immersive environment.

Remarks

The Scaling according to DPI sample shows how to use the ResolutionScale property.

Examples


//Manually load images based on the scaling factors.
void MainPage::ManualLoadImagePath()
{
    switch (DisplayProperties::ResolutionScale)
    {
        case ResolutionScale::Scale100Percent:
            scenario1ManualLoad->Source = ref new BitmapImage(ref new Uri("pack://application/Images/projector.scale-100.png"));
            break;
        case ResolutionScale::Scale140Percent:
            scenario1ManualLoad->Source = ref new BitmapImage(ref new Uri("pack://application/Images/projector.scale-140.png"));
            break;
        case ResolutionScale::Scale180Percent:
            scenario1ManualLoad->Source = ref new BitmapImage(ref new Uri("pack://application/Images/projector.scale-180.png"));
            break;
        default:
            throw "Unknown Scaling Factor";
    }
}


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.Graphics.Display
Windows::Graphics::Display [C++]

Metadata

Windows.winmd

See also

DisplayProperties

 

 

Build date: 2/25/2013

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.