Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7882749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:21:30+00:00 2026-06-03T04:21:30+00:00

I have a WPF form that has some buttons to save user input, delete,

  • 0

I have a WPF form that has some buttons to save user input, delete, and cancel. I was trying to add functionality such that whenever the user clicks the cancel button, there is a pop up a message. Instead it throws an exception in my controller:

"The call is ambiguous between the following methods or properties"

Here is my view:

 <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,0">                        
    <Button Name="DeleteButton" Command="{Binding DeleteCommand}" CommandParameter="{Binding Path=SelectedStory}"  Cursor="Hand" Height="25" IsEnabled="{Binding CanDelete}" Margin="5 0 0 0">Delete</Button>
    <Button Name="SubmitButton" Command="{Binding SubmitCommand}" CommandParameter="{Binding Path=SelectedStory}"  Cursor="Hand" Height="25"  Margin="5 0 0 0">Submit</Button>
    <Button Name="CancelButton" Command="{Binding CloseCommand}" CommandParameter="{Binding Path=SelectedStory}"  Cursor="Hand" Height="25" Margin="5 0 0 0" >Cancel</Button>
 </StackPanel>

My controller code:

    public MetadataController(IGatewayService gateway, IEventAggregator eventAggregator, IDialogService dialog)
    {
        this.gateway = gateway;
        this.eventAggregator = eventAggregator;
        this.dialog = dialog;

        // commands            
        this.CloseCommand = new DelegateCommand<StoryItem>(this.Close);//here i got the exception throwing "the call is ambiguous between the following methods or properties"
        this.DeleteCommand = new DelegateCommand<StoryItem>(this.Delete);
        this.SubmitCommand = new DelegateCommand<StoryItem>(this.Submit, this.HasFieldsRequiredBeforeSubmit);

        this.eventAggregator.GetEvent<StorySelectedEvent>().Subscribe(OnStorySelected);
    }

    private void Close(StoryItem selsectedStory)//when i click my close button its not calling this method at all.
    {
        bool isConfirmed = this.dialog.ShowConfirmation("Are you sure you want to close?");
    }

    private void Delete(StoryItem selectedStory)
    {
        bool isConfirmed = this.dialog.ShowConfirmation("Are you sure you want to permanently delete ?");

        if (isConfirmed)
        {
            this.gateway.DeleteStoryItem(selectedStory);

            this.eventAggregator.GetEvent<CommandCompletedEvent>().Publish(CommandTypes.MetadataEntry);
        }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:21:32+00:00Added an answer on June 3, 2026 at 4:21 am

    The reason for the exception ,i do have the method already and i was trying to create one,that’s why it throws that error.Thanks lot for the help guys.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a login button in wpf login form. I want that user has
I have a grid on WPF form and another class, that has some events.
I have a WPF form that uses ClientLogin to log a user into their
I have WPF Form which has many buttons with the same code. Appearance of
I have a WPF form where I'm trying to make a simple input form.
I have a WPF form that has a toolbar then a StackPanel under it
I have WPF application that has a login form. I would like to make
I have to add an unknown number of buttons to a form in WPF
I have a WPF application with form that has a textbox named txtStatusWindow. I
I have a main wpf form that opens a new form. However when that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.