Пример #1
0
        private static void OnRestStateImageSourceChanged(object sender, DependencyPropertyChangedEventArgs args)
        {
            RadImageButton button = sender as RadImageButton;

            if (!button.isTemplateApplied)
            {
                return;
            }
            button.SetButtonImageSource();
            OnImageSourceChanged(sender, args);
        }
Пример #2
0
        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);
        }