ModernWpf icon indicating copy to clipboard operation
ModernWpf copied to clipboard

RoutedEvents, NavigationView.ContentTemplate not binded and ContentPresenter instead of ContentControl.

Open Aberro opened this issue 4 years ago • 3 comments

I don't know about other controls and events, but I've noticed that at least NavigationView.ItemInvoked has no declared RoutedEvent. This breaks Caliburn.Micro compatibility.

Aberro avatar May 15 '20 02:05 Aberro

I've changed NavigationView events to RoutedEvent in my fork. If you wish, I could make a pull request.

Aberro avatar May 15 '20 04:05 Aberro

Also, Caliburn doesn't work with NavigationView at all, seems like ContentTemplate's not setting as template for ContentPresenter (and are you sure NavMenu should use ContentPresenter and not ContentControl? But either way, I've tried to change presenter to control with no luck, neither presenter nor control is working with Caliburn). Yup, ContentTemplate is not working.

Aberro avatar May 15 '20 09:05 Aberro

This seems to explain everything: https://alexfeinberg.wordpress.com/2014/10/11/wpf-the-real-difference-between-contentcontrol-and-contentpresenter/

Either I don't undestrand WPF/XAML (which actually I don't), or you have to use ContentControl with ContentSource, ContentSourceTemplate, ContentSourceTemplateSelector and ContentSourceStringFormat binded by template binding instead of ContentPresenter.

Aberro avatar May 15 '20 13:05 Aberro