Exception when loading WPF Control with ComponentOne elements) from library

Posted by: cchoongo on 15 January 2023, 10:40 pm EST

    • Post Options:
    • Link

    Posted 15 January 2023, 10:40 pm EST - Updated 15 January 2023, 11:12 pm EST

    Created a WPF Control library that uses ComponentOne elements (FlexGrid, C1Checkbox, etc)

    I have a separate application project which dynamically loads the WPF Control library .dll using ‘System.ComponentModel’

    When instantiating my control class, I get the following error:

    [code]

    System.Windows.Markup.XamlParseException: ‘The method or operation is not implemented.’

    Inner Exception:

    NotImplementedException: The method or operation is not implemented.[/code]

  • Posted 17 January 2023, 6:17 pm EST

    Hi,

    You have marked the post as answered. Could you please confirm if this issue is resolved?

    If not, then please share more information like a screenshot of Error List and StackTrace.

    Usually, this issue occurs, if there’s an error on the XAML code. And it would be helpful if we have more information to resolve this issue.

    Regards,

    Nitin

  • Posted 17 January 2023, 7:18 pm EST

    Hi Nitin,

    A workaround I found was to manually load the C1.WPF.Core.dll to into memory at program startup.

    public MainWindow()
    {
    	InitializeComponent();
    	Assembly.LoadFrom("C1.WPF.Core.dll")
    
    	var configuration = new CompositionContainer(new AssemblyCatalog("WpfControlLibrary.dll"));
          	var getUserControl = configuration.GetExport<IGetWPFControl>() 
    
    	this.MainGridControl.Children.Add( getUserControl.UserControl );
    }
    
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels