public void SetTitleBar() { this.ApplyTemplate(); if (this.GetTemplateChild("TitleBackground") is FrameworkElement e) { TitleBarHelper.SetTranisentTitleBar(e); } }
public void Show() { StartShowAnimation(); this.Visibility = Visibility.Visible; // Focus the close button to ensure keyboard focus is retained inside the panel BtnClose.Focus(FocusState.Programmatic); ViewModel.PropertyChanged -= ViewModel_PropertyChanged; ViewModel.PropertyChanged += ViewModel_PropertyChanged; TitleBarHelper.SetTranisentTitleBar(TitleBackground); }