Reputation: 43
I'm creating a custom control for windows phone 8, in this control I use a class from a Windows Runtime Component (.winmd).
The problem is in the xaml designr my custom control not appear, but the control works fine in rut mode.
(As I mentioned above this is in design time (Xaml designer)) :
"Cannot create instance of MyControl", and the inner exception is:
TypeLoadException: Requested Windows Runtime type "WindowsPhoneRuntimeComponent1.WindowsPhoneRuntimeComponent" is not registered.
Upvotes: 1
Views: 799
Reputation: 26344
The designer can't initialize WinRT (COM) objects. You'll have to use the DesignerProperties.IsInDesignTool to prevent your WinRT objects being instantiated while in design mode.
Upvotes: 1