<转>[卤面网_原创]简单实现UCWeb的新特性展示

如图所示,第一次加载会展示新特性.
以后直接转到主页面.
很简单.上代码.

/// <summary>
    /// 应用主页面
    /// </summary>
    public partial class MainPage : PhoneApplicationPage
    {
        // 构造函数
        public MainPage()
        {
            InitializeComponent();
            
        }
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
             
             if (WPHelper.IsFirstStart())
            {//如果是第一次加载,跳到特性展示页面.
                NavigationService.Navigate(new Uri("/NewFeaturesShow/PanoramaPage1.xaml", UriKind.Relative));
            }
        }
    }
    public class WPHelper
    {
        /// <summary>
        /// 是否第一次启动
        /// </summary>
        /// <returns>true 为第一次启动</returns>
        public static bool IsFirstStart()
        {
            IsolatedStorageSettings userSetting = IsolatedStorageSettings.ApplicationSettings;
            try
            {
                string isFirstStart = userSetting["isFirstStart"] as string;
                if (isFirstStart == "1")
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            catch (System.Collections.Generic.KeyNotFoundException)
            {
                userSetting.Add("isFirstStart", "0");
                return true;
            }



        }

    }

 这里xaml里用的是Panorama而不是Pivot.
Pivot在滑动的时候会出现一个图片与图片之间的空白区域,如果背景是黑色.显得很突兀.

原文地址:https://www.cnblogs.com/hyxf/p/2404206.html