-
Notifications
You must be signed in to change notification settings - Fork 675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Navigationview: Fix init-once of the GlobalDependencyProperty #6762
Navigationview: Fix init-once of the GlobalDependencyProperty #6762
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Apparently you can't hash cppwinrt types. I guess you have to wrap them with a BTW I've figured out why I couldn't build this project. This is ill-formed: microsoft-ui-xaml/dev/inc/tracker_ref.h Lines 142 to 145 in 6225742
I don't know the exact language spec that makes this so, but since the assertion isn't dependent on a template parameter, the compiler can eagerly reject the code here. This will fail to compile with the v143 toolchain and later. |
9c2f7cc
to
b759b1d
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@lhecker looks good to me! |
This commit fixes a bug in
NavigationView
where aGlobalDependencyProperty
was repeatedly instantiated in the constructor. Using the atomicity
of statics we ensure it's treated as a singleton instead.
Description
Additionally this commit makes a minor change to use
references during loop iteration to avoid copies
Motivation and Context
Related to #6240, which introduced this code.
Closes #6760.