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.