Windows Phone Development Learning-hubtile

Source: Internet
Author: User

In the metro style, in addition to the tile displayed in the Start Menu, hubtile is also a very dazzling display of Metro, and is more dazzling than tile, because hubtile can not only implement flip, it also enables up and down image translation and scrolling. For example, the following is a hubtile

Each hubtile above is movable.

How can we implement hubtile? In fact, Microsoft has completed the control for us. You only need to download microsoft Silverlight for Windows Phone toolkit and then introduce the hubtile control in.

After the icon appears, drag it to the page, and then introduce Microsoft. Phone. Controls. toolkit. dll, This dll can be in the http://blog.humann.info/file.axd? File = 2011% 2f11% 2fmicrosoft. Phone. Controls. toolkit. dll download. This is the latest DLL and fixes the bug of displaying upside down in hubtile that many people have encountered before.

Declare a namespace in XAML

 
Xmlns: Toolkit = "CLR-namespace: Microsoft. Phone. controls; Assembly = Microsoft. Phone. Controls. toolkit"

Then you can set it in hubtile. The following is an example.

<Stackpanel X: Name = "contentpanel" grid. row = "1" margin = "12, 0, 12, 0" orientation = "horizontal"> <stackpanel> <Toolkit: hubtile X: name = "hubtile" Title = "hubtile title" message = "this is hubtile message! "Margin =" 10 "/> <Toolkit: hubtile X: Name =" hubtile1 "Source =" wpglogo.png "Title =" hubtile title "message =" this is hubtile message! "Margin =" 10 "/> <Toolkit: hubtile X: name = "hubtile2" background = "green" Source = "wpglogo.png" Title = "hubtile title" message = "this is hubtile message! "Margin =" 10 "/> </stackpanel> <Toolkit: hubtile Title =" London "grouptag =" Cities "margin =" 10 "/> <Toolkit: hubtile Title = "NewYork" grouptag = "Cities" margin = "10"/> <button X: name = "freeze" content = "freezegroup" Click = "freeze_click" margin = "10"/> <button X: name = "unfreeze" content = "unfreezegroup" Click = "unfreeze_click" margin = "10"/> </stackpanel>

Hubtile has many attributes, such as message, title, and image attributes, which can be modified in the background. The specific content contains a lot of information on the Internet, just in the background CSCodeAdd

 
Using Microsoft. Phone. controls;

The above is some of the hubtile I have learned. I feel that it is enough for the moment. If you want to make more complex results in the future, I will try again later.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.