Skip to content
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

AXAML designer does not work when code behind class has internal modifier #440

Open
marinobjelopera26 opened this issue Jan 23, 2024 · 1 comment
Labels

Comments

@marinobjelopera26
Copy link

Describe the bug

Avalonia AXAML designer does not open when x:ClassModifier="internal" is added to the UserControl definition and also internal modifier is added to the code behind class.
AXAML designer says that it's an Invalid Markup and to check the Error List, however there is nothing in the Error List. The application performs as expected during runtime.

With internal modifier:
1

Without internal modifier:
2

To Reproduce

  1. Create a new Avalonia WPF application
  2. Add new/modify existing UserControl - add x:ClassModifier="internal" in UserControl definition, i.e.:
<UserControl xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="Foo.Views.FooBar"
             x:ClassModifier="internal">
Welcome to Avalonia!
</UserControl>

Code behind:

using Avalonia.Controls;

namespace Foo.Views
{
    internal partial class FooBar : UserControl
    {
        public FooBar()
        {
            InitializeComponent();
        }
    }
}
  1. Avalonia AXAML designer does not open (says the markup is invalid)

AvaloniaVS plugin version

11.5

Avalonia version

11.0.6

Visual Studio version

17.8.4

Relevant log output

Not applicable

Additional context

No response

@workgroupengineering
Copy link
Contributor

I tested with Avalonia 11.0.7 and it works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants