Frage

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.

War es hilfreich?

Lösung

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)
{

}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top