0
次のコードで使用する識別子のタイプを決定する際に問題が発生しています。コードサンプルをMicrosoft UWP blogから取得しましたC++:どのタイプの識別子を使用するのですか?
しかし、私はそれを実装する方法を理解できないようですか? だから私はそれを正しく得るのを助けてください。おかげ
stackCount // is undefined in following code.
void StartPage::OnNavigatedTo(NavigationEventArgs^ e)
{
auto rootFrame = dynamic_cast<Windows::UI::Xaml::Controls::Frame^>(Window::Current->Content);
Platform::String^ myPages = "";
if (rootFrame == nullptr)
return;
for each (PageStackEntry^ page in rootFrame->BackStack)
{
myPages += page->SourcePageType.ToString() + "\n";
}
stackCount->Text = myPages; // stackCount is undefined here
if (rootFrame->CanGoBack)
{
// If we have pages in our in-app backstack and have opted in to showing back, do so
Windows::UI::Core::SystemNavigationManager::GetForCurrentView()->AppViewBackButtonVisibility =
Windows::UI::Core::AppViewBackButtonVisibility::Visible;
}
else
{
// Remove the UI from the title bar if there are no pages in our in-app back stack
Windows::UI::Core::SystemNavigationManager::GetForCurrentView()->AppViewBackButtonVisibility =
Windows::UI::Core::AppViewBackButtonVisibility::Collapsed;
}
}
これはC++ではなくC++/CLIです –
エラーの正確な説明は何ですか? –
stackCountは未定義です。 –