You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to support Experience 1758042: [Blazor Hybrid] Provide a Live Visual Tree/XAML Live Preview that works better with WebView
An object model is needed to allow walking the Blazor Component tree.
Similar to VisualTreeHelper Class (System.Windows.Media) | Microsoft Learn , Blazor also needs a navigable logical component tree. This allows an injected Agent to traverse and gather data to construct the JSON that is sent to the LVT tree via the VDEP protocol.
Source Info Annotation
Information known as Source Information is kept within the Blazor Component Tree to pinpoint the origin of the Blazor Component. During Hit Testing, which is conducted at the DOM level by the WebView, the DOM needs to retains information that aids in identifying the Blazor Web Component. This Source Info is crucial for the Blazor Web Component to locate and navigate to the original Source on the Razor page.
Based on a meeting with the Razor, we can solve 1) and 2) (DOM Mutation) by using 100% the DOM Element Tree to rebuild the Blazor Component Tree assuming that 3) contains the require annotation in the generate HTML.
So the request here is for 3) to have the Razor Compiler to
Generate DOM annotation that give the source location of the razor component. The annotation needs to contain:
The source filename (relative path)
Line Number
Column number of the the start tag
Annotation would be contain on the DOM Element similar to
The text was updated successfully, but these errors were encountered:
In order to support
Experience 1758042: [Blazor Hybrid] Provide a Live Visual Tree/XAML Live Preview that works better with WebView
An object model is needed to allow walking the Blazor Component tree.
Similar to VisualTreeHelper Class (System.Windows.Media) | Microsoft Learn , Blazor also needs a navigable logical component tree. This allows an injected Agent to traverse and gather data to construct the JSON that is sent to the LVT tree via the VDEP protocol.
An event system when the Blazor component tree changes
Similar to VisualTreeChangeEventArgs Class (System.Windows.Diagnostics) | Microsoft Learn, or MutationObserver - Web APIs | MDN (mozilla.org) on modern Browser, events plays a role in updating the Live Visual Tree when changes are made through Hot Reload.
Source Info Annotation
Information known as Source Information is kept within the Blazor Component Tree to pinpoint the origin of the Blazor Component. During Hit Testing, which is conducted at the DOM level by the WebView, the DOM needs to retains information that aids in identifying the Blazor Web Component. This Source Info is crucial for the Blazor Web Component to locate and navigate to the original Source on the Razor page.
Based on a meeting with the Razor, we can solve 1) and 2) (DOM Mutation) by using 100% the DOM Element Tree to rebuild the Blazor Component Tree assuming that 3) contains the require annotation in the generate HTML.
So the request here is for 3) to have the Razor Compiler to
Generate DOM annotation that give the source location of the razor component. The annotation needs to contain:
Annotation would be contain on the DOM Element similar to
The text was updated successfully, but these errors were encountered: