How to load xaml from StreamingAssets?
I want load xaml from StreamingAssets, so I try below code, which changed from Samples\Gallery\MainWindow.xaml.cs
But the Unity report error:
How to load xaml from StreamingAssets?
Best regards!
Code: Select all
//string sampleName = string.Format("Assets/NoesisGUI/Samples/Gallery/Samples/{0}.xaml", _selectedSample.Name);
//FrameworkElement sample = (FrameworkElement)Application.LoadComponent(new Uri(sampleName, UriKind.Relative));
string sampleName = UnityEngine.Application.streamingAssetsPath + "/Button.xaml";
FrameworkElement sample = (FrameworkElement)Application.LoadComponent(new Uri(sampleName, UriKind.Absolute));
[NOESIS/E] Xaml not found 'D:/temp/Tutorials-master/Samples/Gallery/Unity/Assets/StreamingAssets/Button.xaml'
How to load xaml from StreamingAssets?
Best regards!
Re: How to load xaml from StreamingAssets?
I am sorry to say this is not supported. You have the following alternatives:
But they don't work if you have dependencies (fonts, images, dictionaries, etc).
Code: Select all
Noesis.GUI.LoadXaml(Stream stream, string filename)
Noesis.GUI.ParseXaml(string xamlText)
Who is online
Users browsing this forum: Google [Bot] and 64 guests