0

i want to create a window based on infragistics XamRibbonWindow but with catel features. Within the catel documentation I found informations about how to archieve this using the catel:WindowBehavior.

<i:Interaction.Behaviors>
  <catel:WindowBehavior ViewModelType="viewmodels:DemoWindowViewModel" Save="okButton.Click" Cancel="cancelButton.Click" /> 
</i:Interaction.Behaviors>

Seems too easy right? Well, it is really all you have to do

But when I add this behavior to a standard wpf window, an exception is thrown. It tells me that the window class has to implement catel:IView to work.

So I've looked further and found another sample. But the interface IDataWindow has some more events and properties in v3.9 then in this sample.

So I've decided to download the advanced sample project for further investigation. But this one is based on catel v3.8 at the moment and it differs from 3.9.

alex.enjoy
  • 301
  • 3
  • 10

1 Answers1

0

For the latest version, see:

https://catelproject.atlassian.net/wiki/display/CTL/Using+a+custom+window

For older versions, see:

https://catelproject.atlassian.net/wiki/display/CTL/Catel+documentation+Home#CateldocumentationHome-Lookingfordocumentationofotherversions?

Geert van Horrik
  • 5,689
  • 1
  • 18
  • 32
  • Unfortunately this does not solve my problem. The mentioned documentation seems outdated, too. When I copy the sample code, the following interface members of IDataWindow are not implemented: PreventViewModelCreation, ViewModelPropertyChanged, ViewLoading, ViewLoaded, ViewUnloading, ViewUnloaded and Parent. It seems like the IDataWindow has been extended since the documentation was written. – alex.enjoy Jul 02 '14 at 14:04
  • Please take a look at the history of the latest docs. You should see exactly what you need. Implementing the members shouldn't be too hard, especially in 4.0 where some members are removed. – Geert van Horrik Jul 07 '14 at 16:29
  • @GeertvanHorrik: I fell on this sword also. How about either updating or removing the documentation referred to by the OP? Erroneous docs are worse than no docs. – Reilly Sep 01 '14 at 11:56
  • @Reilly not sure what you mean, but you can add discussions to the Confluence docs in Catel if you like to have something changed. – Geert van Horrik Sep 01 '14 at 12:01