FrameworkContentElement.OnStyleChanged(Style, Style) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Invoked when the style that is in use on this element changes.
protected public:
virtual void OnStyleChanged(System::Windows::Style ^ oldStyle, System::Windows::Style ^ newStyle);
protected internal virtual void OnStyleChanged (System.Windows.Style oldStyle, System.Windows.Style newStyle);
abstract member OnStyleChanged : System.Windows.Style * System.Windows.Style -> unit
override this.OnStyleChanged : System.Windows.Style * System.Windows.Style -> unit
Protected Friend Overridable Sub OnStyleChanged (oldStyle As Style, newStyle As Style)
Parameters
- oldStyle
- Style
The old style.
- newStyle
- Style
The new style.
Remarks
This method has a default implementation that sets an internal flag noting the style changed condition.
Notes to Inheritors
Always call the base implementation, otherwise styles cannot be applied. Scenarios for overriding this method might include if your derived class has a specialized style selector, or caches style values. Theme changes will potentially invoke this method.
Applies to
See also
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour