To whom it may concern,
In our MVVM-project, we are using a derived implementation of the RadRibbonWindow to add some customized functions, for example to add EventHandlers firing when something changed in the view, for example language or culture setting changes from another window. With the EventToCommandBehavior binding, we would like to pass the fired custom event to our view model to execute an async command. Although the event is not shown for autocompletion, everything works fine during runtime, and the command is executed when the event was fired. Unfortunately, the VisualStudio XAML designer cannot bind the custom event handler for the EventToCommand Behavior tag and therefore shows an exception within the XAML code, and within the XAML designer. Because of that binding problem, we are unable to further use the designer to get a preview of our designed windows.
We tried to derive our window from the basic WPF window (System.Windows.Window) and simply add the custom event handler but it did not work, either. Is there any problem with our implementation, or with the EventToCommandBehavior leading to an exception during design time? I have attached a minimal working example. In the code, I have derived a customized window class from the basic WPF window (shows the same error as the RadRibbonWindow), and have added a new event handler. This window is used as main window and fires the custom event when the event OnContentRendered function is called. The view binds this event within XAML to a command of the view model. The command is implemented with our customized asynchronous command. The XAML designer throws the described exception (as shown in the provided picture) but when I debug the program, a break point set within the function called by the command is hit.
I have removed the package "Telerik.Windows.Controls.for.Wpf.Xaml.2021.3.1109" within the .zip-folder because the code would have exceeded the maximum file size.
Sincerely,
Matthias Jörg