memory card game wpf problem

后端 未结 1 1500
礼貌的吻别
礼貌的吻别 2021-01-15 05:11

I have a memorey card game where my binding is to

public ObservableCollection> MyCollection { get; set; }//holding the array 


        
相关标签:
1条回答
  • 2021-01-15 05:42

    When you set your ButtonColor, call PropertyChanged. So:

    #region colorofbutton
    
        private Brush buttonColor; // Use the property accessors instead
        public Brush ButtonColor
        {
            get
            {
                return buttonColor;
            }
            set
            {
                buttonColor = value;
                OnPropertyChanged("ButtonColor");
            }
    
        }
        #endregion
    
    0 讨论(0)
提交回复
热议问题