Пример #1
0
 public AllControl()
 {
     InitializeComponent();
     ContentPage.Children.Clear();
     ContentPage.Children.Add(new Note());
     ContentPage.BeginAnimation(MarginProperty, new ThicknessAnimation(new Thickness(-50, 40, 50, 0), new Thickness(0, 0, 0, 0), TimeSpan.FromSeconds(0.2)));
 }
Пример #2
0
        private void Border_MouseDown(object sender, MouseButtonEventArgs e)
        {
            var Sende = (sender as Border).ToolTip.ToString();

            if (Sende == "新闻")
            {
                ContentPage.Children.Clear();
                ContentPage.Children.Add(new Note());
                ContentPage.BeginAnimation(MarginProperty, new ThicknessAnimation(new Thickness(-50, 40, 50, 0), new Thickness(0, 0, 0, 0), TimeSpan.FromSeconds(0.2)));
            }
            else if (Sende == "天气")
            {
                ContentPage.Children.Clear();
                ContentPage.Children.Add(new WeatherBox());
                ContentPage.BeginAnimation(MarginProperty, new ThicknessAnimation(new Thickness(-50, 40, 50, 0), new Thickness(0, 0, 0, 0), TimeSpan.FromSeconds(0.2)));
            }
            else if (Sende == "美图")
            {
                ContentPage.Children.Clear();
                ContentPage.Children.Add(new BingDayImage());
                ContentPage.BeginAnimation(MarginProperty, new ThicknessAnimation(new Thickness(-50, 40, 50, 0), new Thickness(0, 0, 0, 0), TimeSpan.FromSeconds(0.2)));
            }
            else if (Sende == "翻译")
            {
                ContentPage.Children.Clear();
                ContentPage.Children.Add(new FanyiBox());
                ContentPage.BeginAnimation(MarginProperty, new ThicknessAnimation(new Thickness(-50, 40, 50, 0), new Thickness(0, 0, 0, 0), TimeSpan.FromSeconds(0.2)));
            }
            else if (Sende == "便签")
            {
                Process.Start(AppDomain.CurrentDomain.BaseDirectory + @"/Note.exe");
            }
            else if (Sende == "搜索")
            {
                ContentPage.Children.Clear();
                ContentPage.Children.Add(new SearchBox());
                ContentPage.BeginAnimation(MarginProperty, new ThicknessAnimation(new Thickness(-50, 40, 50, 0), new Thickness(0, 0, 0, 0), TimeSpan.FromSeconds(0.2)));
            }
            else if (Sende == "地图")
            {
                ContentPage.Children.Clear();
                ContentPage.Children.Add(new MapControl());
                ContentPage.BeginAnimation(MarginProperty, new ThicknessAnimation(new Thickness(-50, 40, 50, 0), new Thickness(0, 0, 0, 0), TimeSpan.FromSeconds(0.2)));
            }
        }