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; }
void rootPage_OutputFrameLoaded(object sender, object e) { // At this point, we know that the Output Frame has been loaded and we can go ahead // and reference elements in the page contained in the Output Frame. // Get a pointer to the content within the OutputFrame. Page outputFrame = (Page)rootPage.OutputFrame.Content; // Go find the elements that we need for this scenario. // ex: flipView1 = outputFrame.FindName("FlipView1") as FlipView; semanticZoom = outputFrame.FindName("semanticZoom") as SemanticZoom; }
protected override void OnApplyTemplate() { base.OnApplyTemplate(); _listItems = GetTemplateChild(ListItemsName) as ListView; if (_listItems != null) { _listItems.SelectionChanged += ListItemsSelectionChanged; } _semanticZoom = GetTemplateChild(SemanticZoomName) as SemanticZoom; _listChampsRecherche = GetTemplateChild(ListChampsRechercheName) as ComboBox; _suggestBox = GetTemplateChild(SuggestBoxName) as AutoSuggestBox; //Construction de la liste des champs dispos pour la recherche CreateItemsListChampsRecherche(); if (_suggestBox != null && _listChampsRecherche != null) { if (_listChampsRecherche.ItemsSource == null) { _suggestBox.IsEnabled = false; _listChampsRecherche.IsEnabled = false; } _suggestBox.TextChanged += SuggestBoxTextChanged; _suggestBox.SuggestionChosen += SuggestBoxSuggestionChosen; _suggestBox.QuerySubmitted += SuggestBoxQuerySubmitted; _suggestBox.ItemsSource = _searchResults; } //Construction des items groupés pour la liste CreateItemsSource(); }
public GroupedListView() { Name = Guid.NewGuid().ToString(); Loaded += ( _, __ ) => { HorizontalAlignment = HorizontalAlignment.Stretch; HorizontalContentAlignment = HorizontalAlignment.Stretch; Content = new SemanticZoom { ZoomedInView = GetZoomedInView(), ZoomedOutView = GetZoomedOutView() }; }; }
public SemanticZoomEvents(SemanticZoom This) : base(This) { this.This = This; }