23.01.2018 Views

MICROSOFT_PRESS_EBOOK_PROGRAMMING_WINDOWS_8_APPS_WITH_HTML_CSS_AND_JAVASCRIPT_PDF

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

This example is taken directly from the <strong>HTML</strong> Tooltip control sample, so you can go there to see how<br />

all this works directly.<br />

Working with Controls in Blend<br />

Before we move onto the subject of control styling, it’s a good time to highlight a few additional<br />

features of Blend for Visual Studio where controls are concerned. As I mentioned in Video 2-2, the<br />

Assets tab in Blend gives you quick access to all the <strong>HTML</strong> elements and WinJS controls (among many<br />

other elements) that you can just drag and drop into whatever page is showing in the artboard. (See<br />

Figure 4-4.) This will create basic markup, such as a div with a data-win-control attribute for WinJS<br />

controls; then you can go to the <strong>HTML</strong> Attributes pane (on the right) to set options in the markup. (See<br />

Figure 4-5.)<br />

FIGURE 4-4 <strong>HTML</strong> elements (left) and WinJS control (right) as shown in Blend’s Assets tab.<br />

FIGURE 4-5 Blend’s <strong>HTML</strong> Attributes tab shows WinJS control options, and editing them will affect the<br />

data-win-options attribute in markup.<br />

149

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!