ExcelDna System.Windows.Markup.XamlParseException

77 views
Skip to first unread message

Majed Oualha

unread,
Sep 11, 2025, 9:26:43 AMSep 11
to Excel-DNA

I am currently working with an Excel DNA project and have encountered an issue when using DevExpress.

The following exception is being thrown:

System.Windows.Markup.XamlParseException: 'The method or operation is not implemented.'
Exception thrown: 'System.Windows.Markup.XamlParseException' in PresentationFramework.dll

The source code is quite basic; I have just added the dxg:TreeListControl as shown below:

XAML
<Window x:Class="FrontAddin.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:local="clr-namespace:FrontAddin" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800"> <Grid> <dxg:TreeListControl></dxg:TreeListControl> </Grid> </Window>

Could you please provide any insights or solutions to resolve this issue? Your assistance would be greatly appreciated.
Thank you in advance for your help.


Govert van Drimmelen

unread,
Sep 16, 2025, 4:57:56 PMSep 16
to Excel-DNA
Have a look at this earlier discussion:  ExcelDNA with WPF/MaterialDesignInXAML

-Govert

Yahya NAJAR

unread,
Sep 18, 2025, 4:27:11 AMSep 18
to Excel-DNA

Hi Govert,

I hope this message finds you well.

I wanted to follow up regarding the solution you provided for pre-loading assemblies in the Excel DNA project. I implemented the code you suggested, which initializes the MaterialDesign assemblies by creating dummy objects. However, I am still experiencing issues.

Specifically, I am encountering the following exception when trying to instantiate the MainWindow:

System.Windows.Markup.XamlParseException: 'The initialization of 'DevExpress.Xpf.Grid.GridControl' raised an exception.' "

Here’s a summary of the relevant code I am using:

XAML:

<dx:DXWindow x:Class="TestDevxProject.MainWindow"    xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"

    Title="MainWindow" Height="450" Width="800">
    <Grid>
        <dxg:GridControl Name="gridControl" AutoGenerateColumns="AddNew">
            <dxg:GridControl.View>
                <dxg:TableView />
            </dxg:GridControl.View>
        </dxg:GridControl>
    </Grid>
</dx:DXWindow>

C# Code:
public void AutoOpen()
{
    _mainWindowInstance = new MainWindow()
    {
        ShowInTaskbar = false,
        WindowStartupLocation = WindowStartupLocation.CenterOwner,
    };
}

Despite the changes, I still face the same XAML parse exception. Could you please provide any further insights or suggestions on how to resolve this issue? Any assistance you can offer would be greatly appreciated.

Thank you in advance for your help!

Reply all
Reply to author
Forward
0 new messages