I am reimplementing options dialog in order to support cancellation of changes. I am trying to use Catel's DataWindow with IMementoService for that. Noticed that DataWindow already has OK and Cancel buttons but not Apply. Just wonder whether I should add it as a custom button by calling AddCustomButton or there is some API part that I missed.

有帮助吗?

解决方案

You can specify the buttons via the DataWindowMode enum which can be found here:

https://github.com/Catel/Catel/blob/ff35f69386ef9aeed83c28d9f7e363d246305a17/src/Catel.MVVM/Catel.MVVM.NET40/Windows/Windows/DataWindow/DataWindow.cs#L34

So:

public MyDataWindow()
  : base(DataWindowMode.OkCancelApply)
{

}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top