Comments (2)
Good afternoon. I would like to know if there is any feedback that can be shared. I would also like to know if there is any estimated time to have a solution. Thanks.
from microsoft-ui-xaml.
This is a known issue that results from the somewhat complicated (and possibly misnamed) loading/loaded/unloaded sequence that occurs. We are actively looking at how we can resolve this and make things clearer, but we have not yet settled on an approach that actually would achieve that goal while still providing the functionality that needs to be relied on.
Although these three events are part of the element load process, the triggers for them are not quite as straight forward.
- Loading occurs when an element is first measured. This is the first opportunity an application has to start the download of external resources that might be needed.
- Loaded occurs late in layout cycle after all templates have been applied. This is the first opportunity an application has to access the full tree that is generated from any templated controls beneath it.
- Unloaded occurs when the element is removed from the active Xaml tree. This is when the application knows that it can release any resources that it may have allocated.
The other important aspect is that Loading and Loaded are synchronous events and Unloaded is asynchronous (since there generally is no urgency in releasing resources no longer used).
Based on these triggering events, you can see why you get the behavior that you do. Adding a collapsed control to the tree will not get a loading event because we don't measure collapsed elements. But once the next layout pass occurs, the loaded event will fire because the element is now in a stable state (e.g. all templates that are going to be expanded already are).
If you make the element visible, you will then get the loading event because it will be measured for the first time.
We agree that this is not optimal and certainly not intuitive, but we are currently hampered in fixing this by two things. The first is, it just isn't clear (or nobody has had a good enough idea) how to implement these (or other) events to clear things up and still get the right functionality. The second is that anything that we come up with is most likely to be a significant breaking change which we cannot do in a dot release. Since WinAppSdk 2.0 is not currently on the calendar, we have no current timeline for a solution.
So technically, this is by design, but I am going to resolve it as a dup of #8342 as that is the issue that we are tracking while trying to come up with a better solution.
from microsoft-ui-xaml.
Related Issues (20)
- An improper shadow appears at the bottom of the CommandBarOverflowPresenter. HOT 1
- Error is API docs of UIElement
- AnnotatedScrollBar slides off screen HOT 2
- windows.appService extension doesn't work with WinUI3
- Programs Running WinUI don't scale to monitor's refresh rate. HOT 2
- unable to install Microsoft.ui.xami.2.8arm64 on windows arm 64/ Microsoft surface 11
- `FindName()` does not work in WinUI3 HOT 2
- Can't create WinUI3 project
- ShadowCaster position not updated when SplitView.PanePlacement is set to the right
- Title in TitleBar shows up after resizing the window when the window loses focus
- TabView.CornerRadius isn't applied
- Proposal:Hope to provide a CsWinRT Projection for WinUI 2
- Proposal:Hope to provide UWP CsWinRT VS template
- Different font display HOT 1
- Proposal:Python is supported! HOT 1
- The ItemsView crashes when it scrolls HOT 2
- Enable in-app Toolbar in XAML Hot Reload crashes in App SDK 1.5 HOT 2
- InvalidCastException in ItemsControl with custom container
- AnnotatedScrollBar doesn't dismiss tooltip on PointerLost HOT 2
- Proposal: Add ability to get hosting Window from XamlRoot or UIElement HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microsoft-ui-xaml.