






















to make the view itself simpler
to help a view control some distinct part of its behavior
context: we have a Trade screen that has seven different states depending upon whether you're creating or reviewing a Trade. The various user actions available on the screen differ from the state to state. As the screen changes state either upon opening the screen or a result of user actions while it's open we need to enable/disable and show/hide different screen elements.
fluent interface:
stateManager.OnState(TradeDetailState.Review)
.Show(updateTradeButtonPanel)
.IsReadOnly()
.Enable(
editTradeButton,
statusCheckBox,
Status2CheckBox,
cancelTradeButton);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。