Scaling according to DPI sample

This sample describes how to build an app that scales according to the dots per inch (dpi) (pixel density) of the screen by loading images of the right scale or by overriding default scaling. This sample uses the Windows.Graphics.Display API.

 
 
 
 
 
4.5 Star
(2)
26,712 times
Add to favorites
11/26/2013
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C++
C#
JavaScript
VB.NET
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>SDK Sample</title>

    <!-- WinJS references -->
    <link rel="stylesheet" href="//Microsoft.WinJS.2.0/css/ui-light.css" />
    <script src="//Microsoft.WinJS.2.0/js/base.js"></script>
    <script src="//Microsoft.WinJS.2.0/js/ui.js"></script>

    <!-- SDK sample framework references -->
    <link rel="stylesheet" href="/sample-utils/sample-utils.css" />
    <link rel="stylesheet" href="/css/default.css" />
    <script src="/sample-utils/sample-utils.js"></script>
    <script src="/js/default.js"></script>
</head>
<body role="application">
    <div id="rootGrid">
        <div id="header" role="contentinfo" data-win-control="WinJS.UI.HtmlControl" data-win-options="{uri: '/sample-utils/header.html'}"></div>
        <div id="content">
            <h1 id="featureLabel"></h1>
            <div id="contentHost"></div>
        </div>
        <div id="footer" data-win-control="WinJS.UI.HtmlControl" data-win-options="{uri: '/sample-utils/footer.html'}"></div>
    </div>
</body>
</html>