Autocomplete Ctrl + Space for < ...={Binding ...} .../> doesn't work in Visual Studio 2022 mostly. It works in simple solutions, in some other solutions but it is unable yo use this feature in some other solutions.
Code of AlgorithmsViewModel.cs:
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
namespace Namespace.ViewModels.Pages
{
public partial class AlgorithmsViewModel : ViewModelBase
{
[ObservableProperty]
private string _pageName = "Algorithm View Model!";
[RelayCommand]
private void ButtonBindingTest()
{
PageName = "Algorithm View Model Changed !111!";
}
}
}
using System.Collections.Generic;
using CommunityToolkit.Mvvm.ComponentModel;
namespace Namespace.ViewModels;
public partial class MainViewModel : ViewModelBase
{
[ObservableProperty]
private static Dictionary<string, string> _guiLocalization = new()
{
{ "TitleDescription", "{120.TITLE_DESCRIPTION}" }
};
}
To Reproduce
Create Avalonia template project
Create structure of project like in Description section above
Add property (public type name => "value" or using [ObservableProperty] - not matter)
Go to connected ...ViewModel.cs and try to use Binding autocomplete Ctrl + Space
Expected behavior
See variant of user defined props bottom:
BUT
Got empty list with default entries (here i have defined PageName prop in ViewModel also):
AvaloniaVS plugin version
11.5
Avalonia version
11.0.10 - 11.1.0-beta1
Visual Studio version
17.9.5
Relevant log output
09:18:35.381 [Information] 0 Starting previewer process for '"D:\Software_Git\prg\Executable\reponame-avalonia\App.Desktop\bin\Debug\net8.0\App.Desktop.dll"'
09:18:35.406 [Information] 23672 Started previewer process for '"D:\Software_Git\prg\Executable\reponame-avalonia\App.Desktop\bin\Debug\net8.0\App.Desktop.dll"'. Waiting for connection to be initialized.
09:18:35.649 [Information] 23672 Connection initialized
Additional context
I already used:
Building project/solution - i have another large project where autocomplete is working
Clearing Intellisense cache by extension
Recreating "cursed" files - seems like working but until 1 new prop
Creating new project and transfering files and code to it
I have:
Set x:DataType in .axaml header
Set Design.DataContext in .axaml header
Double-, Triple- and Quadruple checked all paths, namespaces etc. It works sometimes but stops at randomly without any chanes so paths and other params are true
Describe the bug
This issue duplicated from Avalonia
repoAutocomplete
Ctrl
+Space
for< ...={Binding ...} .../>
doesn't work in Visual Studio 2022 mostly. It works in simple solutions, in some other solutions but it is unable yo use this feature in some other solutions.Code of AlgorithmsViewModel.cs
:Code of AlgorithmsView.cs
Code of MainView.cs (part)
Code of MainViewModel.cs
To Reproduce
public type name => "value"
or using[ObservableProperty]
- not matter)...ViewModel.cs
and try to useBinding
autocompleteCtrl
+Space
Expected behavior
See variant of user defined props bottom:
BUT
Got empty list with default entries (here i have defined
PageName
prop in ViewModel also):AvaloniaVS plugin version
11.5
Avalonia version
11.0.10 - 11.1.0-beta1
Visual Studio version
17.9.5
Relevant log output
Additional context
I already used:
I have:
x:DataType
in .axaml headerDesign.DataContext
in .axaml header