public virtual UIElement CreateMaybeUnoccupiedState(IStateCell cell,
                                                            ModifyPredicateListDelegate checkedAction   = null,
                                                            ModifyPredicateListDelegate uncheckedAction = null)
        {
            //Style style = Application.Current.FindResource("ToggleButtonStyle") as Style;
            //var result = new ToggleButton() {
            //    ToolTip = cell.ToString() ,
            //    Style = style
            //};
            var result = new MaybeUnoccupiedToggleButton
            {
                ToolTip = cell.ToString()
            };

            if (checkedAction != null)
            {
                result.Checked += (sender, args) => { checkedAction(cell.ConstraintPredicate); }
            }
            ;
            if (uncheckedAction != null)
            {
                result.Unchecked += (sender, args) => { uncheckedAction(cell.ConstraintPredicate); }
            }
            ;
            return(result);
        }
 public override UIElement CreateMaybeUnoccupiedState(IStateCell cell, ModifyPredicateListDelegate checkedAction = null,
                                                      ModifyPredicateListDelegate uncheckedAction = null)
 {
     return(base.CreateMaybeUnoccupiedState(cell, _checkAction, _uncheckedAction));
 }
 public RealStateElementFactory(ModifyPredicateListDelegate checkAction, ModifyPredicateListDelegate uncheckedAction)
 {
     this._checkAction     = checkAction;
     this._uncheckedAction = uncheckedAction;
 }