Apply TiltEffect oblique effects on HubTile

Source: Internet
Author: User

TiltEffect in Silverlight for Windows Phone Toolkit can produce an oblique effect on the Applied Control token, so that users can know more clearly that there is a definite choice, however, TiltEffect does not support all the control roles if it is not set in the Toolkit. For example, if it is directly applied to the HubTile in the Toolkit, it will not be effective, however, because Tile like the first line of a Windows Phone has this oblique effect when it is selected, therefore, users may have the same effect when selecting HubTile. Therefore, there is still a simple method to apply TiltEffect to HubTile, produce the same user experience as the original mobile phone.

 

Next, add a class and inherit from the Grid, and add it to TiltableItems.

Using System. Windows. Controls;
Using Microsoft. Phone. Controls;
Namespace TilteffectTest
{
Public class Tiltable: Grid
{
}
Public partial class MainPage: PhoneApplicationPage
{
Public MainPage ()
{
InitializeComponent ();
TiltEffect. TiltableItems. Add (typeof (Tiltable ));
}

 

After namespace is added in XAML, it can be directly applied to HubTile. At this time, when Tile is selected, the oblique effect will be generated, this is consistent with the Tile in the Windows Phone System.

<Phone: PhoneApplicationPage
Xmlns: my = "clr-namespace: TilteffectTest"
...>
......
<Grid x: Name = "ContentPanel" Grid. Row = "1" Margin = "12,0, 12,0">
<My: Tiltable>
<Toolkit: HubTile toolkit: TiltEffect. IsTiltEnabled = "True"/>
</My: Tiltable>
</Grid>
</Phone: PhoneApplicationPage>
}
}

 

Thank you for your solution! But a problem is found! Reply at a.m. on February 11

# Re: [WP] apply TiltEffect oblique effects on HubTile

If you navigate back to another page, the effect of clicking HubTile will be incorrect. I thought it was back and didn't execute the constructor, so I triedTiltEffect.TiltableItems.Add(typeof(Tiltable); Code is added to the PageLoaded event and cannot be resolved. Then I tried to setMy: Tiltable. I don't know why? Consult ~

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.