C++/CX 中对成员函数的引用

Reference to member function in C++/CX

我正在尝试制作一个以预设时间间隔调用函数的计时器。这是我目前的代码。

void MainPage::startTimer()
{
    DispatcherTimer^ refreshTimer = ref new DispatcherTimer;
    refreshTimer->Tick += ref new Windows::Foundation::EventHandler<Platform::Object^>(this, &MainPage::refreshFunc);
    TimeSpan t;
    t.Duration = 500;
    refreshTimer->Interval = t;
    refreshTimer->Start();
}

void MainPage::refreshFunc(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{
    ...
}

当我尝试编译时,我收到一条错误消息:

invalid delegate initializer -- function does not match the delegate type

这一行(上面第4行)错误指向EventHandler的第二个参数:

refreshTimer->Tick += ref new Windows::Foundation::EventHandler<Platform::Object^>(this, &MainPage::refreshFunc);

我做错了什么?

我正在使用 C++/CX 并使用 VS2015 社区进行编译

将第二个参数的类型改为Platform::Object^:

void MainPage::refreshFunc(Platform::Object^ sender, Platform::Object^ e)