A
A
Alexey Gerasimov2014-04-12 15:52:44
Windows phone
Alexey Gerasimov, 2014-04-12 15:52:44

No overload matches delegate?

I created a UserControl with several elements on it - the problem is with the button, or rather with the delegate:

public delegate void NotifyCallUserHelpPageEventHandler(string settingName);

        public event NotifyCallUserHelpPageEventHandler CallUserHelpPage;

        protected virtual void OnCallUserHelpPage()
        {
            NotifyCallUserHelpPageEventHandler handler = CallUserHelpPage;
            if (handler != null) handler(Header);
        }
//Событие нажатия на кнопку
        private void HelpButtonClick(object sender, RoutedEventArgs e)
        {
            OnCallUserHelpPage();
        }

so the control is inserted on the page
<controls:ToggleSwitchWithHelp 
                        Header="Использование местонахождения"
                        IsChecked="{Binding IsAllowUseMyGeopositionSetting, Converter={StaticResource SettingsConverter}, Mode=TwoWay, Source={StaticResource AppSettings}}" 
                        CallUserHelpPage="ToggleSwitchWithHelp_OnCallUserHelpPage"/>

and not being processed yet.
private void ToggleSwitchWithHelp_OnCallUserHelpPage(string settingName)
        {
            
        }

The compiler claims that there is no suitable delegate overload, but the error message is weird, like it's not completely finished. To tell the truth I do not know, what redefinition is necessary and where it is necessary to redefine.4a7a92ce55e843ddba0581c49bedd126.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question