vendredi 12 janvier 2018

WPF Checkbox IsChecked property not working when msi is deployed in VM

I have a checkbox which hides the excel sheet on uncheck and shows on checked. Below is my code:

Xaml:

<CheckBox Foreground="White" x:Name="chkShowExcelPanel" Content="Show Excel Sheet" Checked="AdjustGrid" Unchecked="AdjustGrid" IsChecked="{Binding Path= _ShowExcel, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

MVVM:

private bool _showExcel;
        public bool _ShowExcel
        {
            get { return _showExcel; }
            set
            {
                _showExcel = value;
                OnPropertyChanged("_showExcel");
            }
        }

Its working Fine on the local machine but as soon as I run it on VM I can't see it's checked unless I get the mouse on it.




Aucun commentaire:

Enregistrer un commentaire