Using the Tooltip control in WinJS for Windows Store App

Published on April 18, 2015 by abundantcode

Filed under Windows

Last modified April 18, 2015

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 4762 times

The tooltip WinJS control in Windows Store App can be used to display the customizable tooltip on the HTML element . When you hover over the element ,  the tooltip appears foe few seconds and disappears as soon as the cursor is moved away from the HTML element.

Using the Tooltip control in WinJS for Windows Store App

Below is a sample code snippet demonstrating the usage of the tooltip control in WinJS for Windows Store App.

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>AbundantcodeWinJSApp</title>

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

    <!-- AbundantcodeWinJSApp references -->
    <link href="/css/default.css" rel="stylesheet" />
    <script src="/js/default.js"></script>
</head>
<body>
    <button id="btnSubmit" data-win-control="WinJS.UI.Tooltip" data-win-options="{
         innerHTML : ' Click to submit the data'  }">
        Submit
    </button>
</body>
</html>

In the above code snippet , the following is used for creating the tooltip for button.

<button id="btnSubmit" data-win-control="WinJS.UI.Tooltip" data-win-options="{
     innerHTML : ' Click to submit the data'  }">
    Submit
</button>

image

Leave a Comment


x

You might be Interested in these Posts

How to delete user account from command line in Windows 10 ?

You can delete a user account from command line in Windows 10 using the net user command and specify...

How to add new user account from command line in Windows 10 ?

You can add a new user account in Windows 10 using command prompt using the net user command and pas...

How to open display settings from command line in Windows 10 ?

The display properties can be found in the settings app in Windows 10 which lets the users to config...