question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it expected that x:DeferLoadStrategy changes order of loading?

See original GitHub issue

Create a custom control Widget (note: not a user control!) and the consumer of that control adds the attribute x:DeferLoadStrategy="Lazy" to it in their XAML the order of the following calls and events changes like so:

Without the attribute:

  1. Widget() constuctor
  2. OnApplyTemplate()
  3. Loaded()

But with the attribute:

  1. Widget() constuctor
  2. Loaded()
  3. OnApplyTemplate()

This has the effect that calls to GetTemplateChild() in Loaded will succeed in the first scenario but not the second.

Is this an intended effect of the attribute? If so could it be added to the documentation here, thanks!

https://docs.microsoft.com/en-us/windows/uwp/xaml-platform/x-deferloadstrategy-attribute

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
phraemercommented, Jan 8, 2021

@stevenbrix I’ve actually moved on from this job but @gabrielbunselmeyer should be able to check for you

1reaction
StephenLPeterscommented, Oct 9, 2020

That is generally the strategy we take (to save member pointers to template parts in on apply template), however you do need to be careful to clean these up properly. The WinUI 2 project does this via the Tracker_Ref object.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Load order doesnt matter right? : r/starbound
Load order doesn't matter, if and only if: 1) your mods are all independent of one another, 2) your mods don't conflict, and...
Read more >
Library load order different on two machines - java
Jar loading order is determined by the file system. If the default order changes in the file system the load order changes.
Read more >
Changing order of module loading in kernel
I have two type of ports, em and igb. Is it possible to change the order of loading of these two modules? By...
Read more >
Untitled
News Blogs Links Lazy Loading JS TS Apply Changes Info hera pheri movie song ... Expected: QTreeView items with children that aren't loaded...
Read more >
Untitled
I need to display a list of data (100,000~500,000) in DataGrid, in which several columns ... we are going to implement lazy loading...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found