Bloom.Edit.PageListView.UpdateDisplay C# (CSharp) Method

UpdateDisplay() public method

public UpdateDisplay ( ) : void
return void
        public void UpdateDisplay()
        {
            //Enhance: when you go to another book, currently this shows briefly before we get a
            //chance to select how to display it. I haven't found any existing event I can use
            //to hide it first.

            //What we're doing here is unusual; we want to always get clicks, so that if the button is
            //disabled, we can at least tell the user *why* its disabled.
            //Whereas this class has an ImageNormal and ImageDisabled, in order to never be truly
            //disabled, we don't use that. The button always thinks its in the "Normal" (enabled) state.
            //But we switch its "normal" image and forecolor in order to get this "soft disabled" state
            _addPageButton.ImageNormal = _model.CanAddPages ? Resources.AddPageButton : Resources.AddPageButtonDisabled;
            _addPageButton.ForeColor = _model.CanAddPages ? Palette.BloomRed : Color.FromArgb(87,87,87);
        }