Ejemplo n.º 1
0
        private static void OnRestStateImageSourceChanged(object sender, DependencyPropertyChangedEventArgs args)
        {
            RadImageButton button = sender as RadImageButton;

            if (!button.isTemplateApplied)
            {
                return;
            }
            button.SetButtonImageSource();
            OnImageSourceChanged(sender, args);
        }
Ejemplo n.º 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);
        }