Hello,
How to set it as parameter in c++ ??? (I don't get it)
ContentFrame().Navigate(winrt::xaml_typename<winrt::App1::Page1>(), NULL, ???);
Regards
Edited:
Ok,
I have an other issue.
I've got 2 pages which i load into the frame within the MainWindow.xaml.
I've created a static variable to have access to the frame:
winrt::App1::implementation::MainWindow *MainWindow::s_mainWindow;
If i call a page with 1 parameter, it works.
MainWindow::s_mainWindow->ContentFrame().Navigate(winrt::xaml_typename<winrt::App1::EditProcess>());
If i call it with 3 parameters, i have an unresolved external symbol...
#include "pch.h"
#include "MainPage.xaml.h"
#if __has_include("MainPage.g.cpp")
#include "MainPage.g.cpp"
#endif
#include "winrt/Windows.UI.Xaml.Interop.h"
#include "EditProcess.xaml.h"
#include "MainWindow.xaml.h"
using namespace winrt;
using namespace Microsoft::UI::Xaml;
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
namespace winrt::App1::implementation
{
MainPage::MainPage()
{
InitializeComponent();
}
int32_t MainPage::MyProperty()
{
throw hresult_not_implemented();
}
void MainPage::MyProperty(int32_t /* value */)
{
throw hresult_not_implemented();
}
}
void winrt::App1::implementation::MainPage::MenuFlyoutItem_New_Click(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::RoutedEventArgs const& e)
{
MainWindow::s_mainWindow->ContentFrame().Navigate(winrt::xaml_typename<winrt::App1::EditProcess>(), nullptr,
Microsoft::UI::Xaml::Media::Animation::EntranceNavigationTransitionInfo());
}
Is it because of the way accessing the frame?