コード例 #1
0
 public Index()
 {
     InitializeComponent();
     //IndexPage page1 = new IndexPage();
     IndexPageUserControl u1 = new IndexPageUserControl();
     //naviFrame.ShowPage(page1);
     naviFrame.ShowPage(u1);
 }
コード例 #2
0
 private new void MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     var n = e.Source as Ellipse;
     Debug.WriteLine(n);
     //Page p = new Page();
     //p = new IndexPage();
     UserControl p = new UserControl();
     p = new IndexPageUserControl();
     switch (n.Name)
     {
         case "index":
             //p = new IndexPage();
             p = new IndexPageUserControl();
             n.Opacity = 1;
             this.course.Opacity = 0.5;
             this.statistics.Opacity = 0.5;
             this.other.Opacity = 0.5;
             break;
         case "course":
             //p = new CoursePage();
             p = new CoursePageUserControl();
             n.Opacity = 1;
             this.index.Opacity = 0.5;
             this.statistics.Opacity = 0.5;
             this.other.Opacity = 0.5;
             break;
         case "statistics":
             //p = new StatisticsPage();
             p = new StatisticsPageUserControl();
             n.Opacity = 1;
             this.index.Opacity = 0.5;
             this.course.Opacity=0.5;
             this.other.Opacity = 0.5;
             break;
         case "other":
             //p = new MorePage();
             p = new MorePageUserControl();
             n.Opacity = 1;
             this.index.Opacity = 0.5;
             this.course.Opacity = 0.5;
             this.statistics.Opacity = 0.5;
             break;
         default: break;
     }
     //naviFrame.NavigationService.Navigate(p);
     naviFrame.ShowPage(p);
 }