Inheritance: Windows.UI.Xaml.Controls.Control
コード例 #1
0
        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            LayoutRoot       = GetTemplateChild("LayoutRoot") as Grid;
            header           = GetTemplateChild("header") as CalendarHeader;
            yearheader       = GetTemplateChild("yearheader") as CalendarYearHeadar;
            semanticzoomDate = GetTemplateChild("semanticzoomDate") as SemanticZoom;
            gridviewDays     = GetTemplateChild("gridviewDays") as GridView;
            gridviewMonths   = GetTemplateChild("gridviewMonths") as GridView;

            Days   = new ObservableCollection <Day>();
            Months = new ObservableCollection <Month>();
            Years  = new ObservableCollection <Year>();

            this.Loaded += Calendar_Loaded;
            this.header.LeftButtonClick  += header_LeftButtonClick;
            this.header.RightButtonClick += header_RightButtonClick;

            this.yearheader.LeftButtonClick  += yearheader_LeftButtonClick;
            this.yearheader.RightButtonClick += yearheader_RightButtonClick;

            this.gridviewDays.ItemClick += gridviewDays_ItemClick;

            this.semanticzoomDate.ViewChangeStarted += semanticzoomDate_ViewChangeStarted;
        }
コード例 #2
0
        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            LayoutRoot = GetTemplateChild("LayoutRoot") as Grid;
            header = GetTemplateChild("header") as CalendarHeader;
            yearheader = GetTemplateChild("yearheader") as CalendarYearHeadar;
            semanticzoomDate = GetTemplateChild("semanticzoomDate") as SemanticZoom;
            gridviewDays = GetTemplateChild("gridviewDays") as GridView;
            gridviewMonths = GetTemplateChild("gridviewMonths") as GridView;

            Days = new ObservableCollection<Day>();
            Months = new ObservableCollection<Month>();
            Years = new ObservableCollection<Year>();

            this.Loaded += Calendar_Loaded;
            this.header.LeftButtonClick += header_LeftButtonClick;
            this.header.RightButtonClick += header_RightButtonClick;

            this.yearheader.LeftButtonClick += yearheader_LeftButtonClick;
            this.yearheader.RightButtonClick += yearheader_RightButtonClick;

            this.gridviewDays.ItemClick += gridviewDays_ItemClick;

            this.semanticzoomDate.ViewChangeStarted += semanticzoomDate_ViewChangeStarted;
        }