/// <summary> /// Raises the <see cref="E:System.Windows.FrameworkElement.Initialized"/> event. /// This method is invoked whenever <see cref="P:System.Windows.FrameworkElement.IsInitialized"/> is set to true internally. /// </summary> /// <param name="e">The <see cref="T:System.Windows.RoutedEventArgs"/> that contains the event data.</param> protected override void OnInitialized(EventArgs e) { base.OnInitialized(e); this.DefaultStyleKey = ThemeResourceKey.GetDefaultStyleKey(StyleManager.GetTheme(this), typeof(RadSplitButton)); }
private static void SetDefautStyleKeyFromTheme <T>(this T element, Theme theme) where T : FrameworkElement { element.SetValue(DefaultStyleKeyHelper.FindDefaultStyleKey(), ThemeResourceKey.GetDefaultStyleKey(theme, typeof(T))); }