WPF XAML Button Click handler in InlineUIContainer problem
问题 I've got a FlowDocument which has some elements like so: <InlineUIContainer> <Button Click="Button_Click" Tag="123456789890"> <Image Source="Images\Image1.png" /> </Button> </InlineUIContainer> This is stored off in a .xaml file and gets loaded at some point by doing something like so: flowDocument = XamlReader.Load(xamlFile, parserContext) as FlowDocument; flowDocumentReader.Document = flowDocument; The loading fails with the following error: XamlParseException - Failed to create a 'Click'