Skip to content

Not supported in Avalonia 11-preview4 #5

@TimB-rain

Description

@TimB-rain

After updating from Avalonia 10 to Avalonia 11-preview4 we have the exception in compiler

SettingsViewModel.cs(26, 34): [CS0012] The type 'IResourceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'Avalonia.Styling, Version=0.10.18.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b'.

using Avalonia;
using Avalonia.Styling;
using NP.Avalonia.Visuals.Behaviors;
using NP.Avalonia.Visuals.ThemingAndL10N;
using ReactiveUI;
using System;
using System.Reflection;
using System.Threading.Tasks;

namespace QxCode.Projector.Desktop.ViewModels {
    public class SettingsViewModel : ViewModelBase {
        private readonly IWindowsService _ws;
        private readonly ThemeLoader _languageThemeLoader;

        public SettingsViewModel(IWindowsService ws) {
            //some code
            _languageThemeLoader=Application.Current?.Resources.GetThemeLoader("LanguageLoader")!;
            //some code
        }
        //some code
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions