-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception in oxyplot.Avalonia's StyleInclude #65
Comments
I'm on Avalonia 11.07 and also having trouble to get it working. I'm also using StyleInclude Source="avares://OxyPlot.Avalonia/Themes/Default.axaml"/> This is the only line I have yet added and the error is: AVLN:0004 Resource "avares://OxyPlot.Avalonia/Themes/Default.axaml" is defined as "OxyPlot.Avalonia.Themes.Default" type in the "OxyPlot.Avalonia" assembly, but expected "Avalonia.Styling.IStyle". Line 9, position 17. AvaloniaApplication1 9 Any ideas? |
Had the same issue, change package reference to 2.1.0-Avalonia11 helps me
|
Even with that version and the following code I get exceptions and build errors. How did you resolve it? <Application.Styles>
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml" />
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml" />
<!-- Add the line below to get OxyPlot UI theme applied. -->
<StyleInclude Source="resm:OxyPlot.Avalonia.Themes.Default.xaml?assembly=OxyPlot.Avalonia" />
<!-- Add the line below to get OxyPlot UI theme applied in Avalonia 11. -->
<StyleInclude Source="avares://AvaloniaEdit/Themes/Simple/AvaloniaEdit.xaml" />
<SimpleTheme />
</Application.Styles>
|
+1, for anyone else who stumbles on this issue this is what fixed it for me. |
Hey,
I'm trying to update my project to Avalonia 11, but I had some problems with the Oxyplot.Avalonia nuget package.
On the oxyplot-avalonia main page on github there is an instruction for using oxyplot with Avalonia 11 which I think is wrong, it says AvaloniaEdit in StyleInclude (see screenshot below)
I've read the oxyplot.Avalonia examples and they use the code below to include the style:
StyleInclude Source="avares://OxyPlot.Avalonia/Themes/Default.axaml"/>
But in my project I get the following exception in this code: No precompiled XAML found for avares://OxyPlot.Avalonia/Themes/Default.axaml (baseUri: avares://Nimloth/App.axaml), make sure to specify x:Class and include your XAML file as AvaloniaResource
I'm using the latest version of the oxyplot.avalonia nuget package, 2.1.0, and Avalonia 11.0.6
The text was updated successfully, but these errors were encountered: