This project has moved and is read-only. For the latest updates, please go here.

IsEnabled does not Work as expected

Nov 16, 2012 at 4:22 PM

Hi @all,

I am just starting with MVVM Light in Windows 8 and work my way through Command ect.

I'd like to enable/disable Buttons as required without collapsing. I implemented the following in ViewModel

        private bool _isEnabledAusWahlClick;
        public bool IsEnabledAuswahlClick
            get { return _isEnabledAusWahlClick; }
                if (_isEnabledAusWahlClick==value)
                _isEnabledAusWahlClick = value;

When set to true, button appears, when set to false button disappears completely. Expected is, that Button cannot be clicked and is shown in a shaded layout.

Any suggestion what I did wrong?



Nov 16, 2012 at 4:58 PM


You don't provide much information. Anyway what is certain is that it is not an MVVM Light issue. Some buttons collapse when they are disabled (for example back button on a Win8 page) because the template specifies that in the disabled state. If you don't want this to happen, you have to edit the template in XAML or in Blend.


Nov 19, 2012 at 12:02 PM
Edited Nov 19, 2012 at 12:02 PM


sorry for this beginners mistake. Actually I came from this post [discussion:255905] and was uncertain where to look at. In den meantime I found that it seems to work OK, but white on white is unvisible...

Thanks for our effort.