Getting error on trying to add property to DataTemplateSelector ie The name 'GetValue' does not exist in the current context
class MyDataTemplateSelector : Xamarin.Forms.DataTemplateSelector
{
public DataTemplate QuestionType_Numeric { get; set; }
public MyDataTemplateSelector()
{
this.QuestionType_Numeric = new DataTemplate(typeof(QuestionType_Numeric));
CurrentItemEvent = new DelegateCommand<FormBatchResultModel>(CurrentItemEventHandler);
}
public static BindableProperty ParentBindingContextProperty =
BindableProperty.Create(nameof(ParentBindingContext), typeof(object),
typeof(MyDataTemplateSelector), null);
public object ParentBindingContext
{
get { return GetValue(ParentBindingContextProperty); }//The name 'GetValue' does not exist in the current context
set { SetValue(ParentBindingContextProperty, value); }
}
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
{
Trace.TraceInformation($"----------------------------------------------OnSelectTemplate :: QuestionId[{((FormResultQuestionModel)item).QuestionId}] QuestionText[{((FormResultQuestionModel)item).QuestionText}] QuestionTypeId[{((FormResultQuestionModel)item).QuestionTypeId}] ");
//this.QuestionType_Numeric.SetValue(etech.audit.Views.QuestionType_Numeric.DataProperty, Data);
return this.QuestionType_Numeric;
}
}
}