Я пытаюсь создать общий вид контекста (с кодом).
Я попробовал базовое, поставил на класс, но это делает InitializeComponent
не работающим, и, очевидно, partial
класса больше не используется.
public partial class MockClass<T> : ContentView
{
public static readonly BindableProperty OptionsProperty =
BindableProperty.Create(
nameof(Options),
typeof(List<T>),
typeof(MockClass<>),
null);
public List<T>Options
{
get { return (List<T>)GetValue(OptionsProperty); }
set { SetValue(OptionsProperty, value); }
}
public ChoiceComponentView()
{
InitializeComponent();
//The name "InitializeComponent" does not exist in the current context
//Cannot resolve the symbol "InitializeComponent" "
}
}
Я верю, что нужно что-то сделать с файлом xaml, но я ничего не нашел.