<RichTextBox IsDocumentEnabled="True" x:Name="first" HorizontalAlignment="Left" Height="174" Margin="21,119,0,0" VerticalAlignment="Top" Width="254"><FlowDocument><Paragraph><Run Text="RichTextBox"/></Paragraph><BlockUIContainer><RichTextBox MouseDoubleClick="second_MouseDoubleClick" IsReadOnly="True" x:Name="second" Width="239"><FlowDocument><Paragraph><Run Text="RichTextBox1"/><Run Language="en" Text="hh"/></Paragraph></FlowDocument></RichTextBox></BlockUIContainer> </FlowDocument></RichTextBox>
I use XamlWriter and XamlReader to save and load a Xaml (see above) to disk, but the problem is, after i load it back, the event MouseDoubleClick="second_MouseDoubleClick" can not work, no action after i double clicked it. I guess the problem probably is I only load back the Xaml file, not the code behind the MouseDoubleClick event.
I want the douleclick event still works after I load back the Xaml, how should i do?