TiltEffect and LongListSelector

前端 未结 6 1314
遇见更好的自我
遇见更好的自我 2021-02-19 07:26

I am trying to use the TiltEffect from the Silverlight toolkit within a LongListSelector. This is how the element is declared in XAML:

         


        
6条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-19 07:53

    Create a new control inherits stackpanel

    public class TiltStackPanel : StackPanel
        {
            public TiltStackPanel() {}
        }
    

    then add this control TiltEffect.cs

    static TiltEffect()
        {
          // For extra fun, add this to the list: typeof(Microsoft.Phone.Controls.PhoneApplicationPage)
          TiltableItems = new List() { typeof(ButtonBase), typeof(ListBoxItem), typeof(TiltStackPanel)};
          UseLogarithmicEase = false;
        }
    

    Use this TiltStackPanel inside your template of longlistselector

提交回复
热议问题