Answer the question
In order to leave comments, you need to log in
Serialization in WPF (Events)?
I am serializing my usercontrol to a WPF richtextbox.
With standard elements, everything is fine, but with its own control, trouble.
Events are not serialized, which is what MSDN says:
Event handling is not persisted
Event handlers that are added using XAML are not serialized when they are serialized. XAML without code-behind (also without an associated x:Code mechanism) has no way to serialize runtime procedural logic. Because serialization is self contained and limited to a logical tree, there is no facility to store event handlers. As a result, the event handler attributes, both the attribute itself and the string value of the handler name, are removed from the XAML output.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question