Replies: 1 comment
-
In code /// <summary>
/// Loads a resource dictionary from a specified URL.
/// </summary>
/// <remarks>
/// If used from the XAML code, it is merged into the parent dictionary in the compile time.
/// When used in runtime, this type behaves like <see cref="ResourceInclude"/>.
/// </remarks>
[RequiresUnreferencedCode(TrimmingMessages.StyleResourceIncludeRequiresUnreferenceCodeMessage)]
public class MergeResourceInclude : ResourceInclude And according to its Cant tell why your previewer isn't compiling though. The previewer project doesnt have access to avares://ImagesTo2ScreenHelper? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, I've just started experimenting with Avalonia's templated controls, and I quite immediatly ran into a problem: when trying to include my resource for the control using the following code ( as per documentation )
( All of this is inside a Windows.Resources > ResourceDictionary )
the program compiles and runs apprently without issues, but the previewer ( VS2022 ) crashes saying this:
[Error] 129904 UpdateXamlResult error details: "XamlX.XamlTransformException: Node MergeResourceInclude is unable to resolve \"avares://ImagesTo2ScreenHelper/TemplatedControls/AudioPlayerController.axaml\" path
If I instead use just ResourceInclude instead of MergeResourceInclude ( so by changing just one line ) everything works, previewer included.
Can someone explain the difference to me? Because I couldn't fine anything online
Beta Was this translation helpful? Give feedback.
All reactions