According to the linked document, your MainWindow
header and source file should have a function named NavViewCompactModeThresholdWidth
.
WinUI 3(C++/WinRT): "NavViewCompactModeThresholdWidth" not found
XiaoLi8848
1
Reputation point
According to the sample code of the the document in Microsoft Learn, I wrote almost the same code, but it cannot be compiled. There is an error, "NavViewCompactModeThresholdWidth": is not a member of "winrt::ProjectName::implementation::MainWindow" (compiled source file App.xaml.cpp), it seems that the definition of this member should be located in MainWindow.idl, but I have followed The members of this Double type are defined as written in the document, so how can I eliminate this error?
1 answer
Sort by: Most helpful
-
Xiaopo Yang - MSFT 12,726 Reputation points Microsoft Vendor
2021-08-26T03:18:02.72+00:00