以编程方式折叠 HubSection 崩溃 - WP8 C++

Collapse HubSection programmatically crashes - WP8 C++

我正在尝试将 HubSection 的可见性设置为 Collapsed,但是当我这样做时,我的应用程序崩溃并出现以下错误。

accountSection->Visibility = Windows::UI::Xaml::Visibility::Collapsed; // Executed on the main thread.


Error Message: The parameter is incorrect.

谁能帮帮我?
谢谢

这是一个known issue。不要设置该部分的可见性,而是为该中心命名并使用 add(), insert(), remove()

private void hideSection1Button_Click(object sender, RoutedEventArgs e)
{
    HubName.Sections.Remove(section1);
}