Is there any way to embed a custom control into the flowdocument and have it correctly displayed by the FlowDocument viewers (export it to Xaml text file and open it by a viewer)?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
If by custom control you mean UserControl or any custom control inherited from a WPF control, you can't: This custom control is in its own XML namespace, and requires code deployed in an assembly. Your XAML reader won't have access to it when attempting to parse the file, and won't succed.
You can only use controls provided by Microfost, and deployed with the viewer. Maybe it's possible to make viewers know of assemblies deployed in the GAC, but it's a solution only if you can deploy in the client GAC.
yes use a BlockUIContainer or InlineUIContainer
note that wherever your viewer is will need to have access + trust to use the assembly with the custom control in. The easiest way to achieve this is to have the viewer in the same assembly as the the control.