Skip to content

A case where XAML event is not found #69

@BentTranberg

Description

@BentTranberg

Description

There was no handler to override when the XAML looked like this.

<MenuItem Header="{Binding Source={x:Static lang:Resources.Exit}}" Click="MnExitClick"/>

The error message from the compiler was: "No abstract or interface member was found that corresponds to this override."

type MainWindowXaml = XAML<"Xaml/MainWindow.xaml">

type MainWindow() =
    inherit MainWindowXaml()
    override x.MnExitClick (o, e) = x.Close()

Known workarounds

I moved the handler declaration to the front, like this, and then it compiled and ran successfully.

<MenuItem Click="MnExitClick" Header="{Binding Source={x:Static lang:Resources.Exit}}"/>

Related information

Windows 10. VS 2015 with Update 3. NET Framework 4.5.2. FsXaml 3.1.6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions