/// <summary> /// Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class. /// </summary> protected override void OnApplyTemplate() { this.UnsubscribeEvents(); this.textBox = this.GetTemplateChild(TextBoxPropertyName) as UpDownTextBox; this.autoCompletePresenter = this.GetTemplateChild(AutoCompletePresenterPropertyName) as Popup; this.autoCompletePresenter.Width = this.ActualWidth; this.autocompleteItemsContainer = this.GetTemplateChild(AutocompleteItemsContainerPropertyName) as SimpleThemingListBox; this.autocompleteItemsContainer.Width = this.ActualWidth; this.SetBorderThickness(); base.OnApplyTemplate(); this.SubscribeEvents(); }
/// <summary> /// Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class. /// </summary> protected override void OnApplyTemplate() { this.UnsubscribeEvents(); this.textBox = this.GetTemplateChild(TextBoxPropertyName) as UpDownTextBox; this.autoCompletePresenter = this.GetTemplateChild(AutoCompletePresenterPropertyName) as Popup; this.autoCompletePresenter.Width = this.ActualWidth; this.autocompleteItemsContainer = this.GetTemplateChild(AutocompleteItemsContainerPropertyName) as SimpleThemingListBox; this.autocompleteItemsContainer.Width = this.ActualWidth; this.SetBorderThickness(); base.OnApplyTemplate(); this.SubscribeEvents(); }