private static void OnRestStateImageSourceChanged(object sender, DependencyPropertyChangedEventArgs args) { RadImageButton button = sender as RadImageButton; if (!button.isTemplateApplied) { return; } button.SetButtonImageSource(); OnImageSourceChanged(sender, args); }
private static void OnButtonTypeChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) { RadImageButton button = sender as RadImageButton; if (!button.isTemplateApplied) { return; } if (button.ButtonType != ImageButtonType.Custom) { button.isImageSourceUpdatingSilently = true; button.RestStateImageSource = null; button.isImageSourceUpdatingSilently = false; } button.SetButtonImageSource(); button.UpdateVisualState(true); }