Hello
i want to make item swipe content template in cs file not in xaml
i tried this
MainList.ItemSwipeContentTemplate = new DataTemplate(() =>
{
var mainGrid = new Grid { ColumnSpacing = 0, RowSpacing = 0, Padding = 0, Margin = 0 };
mainGrid.Children.Add(new Label { Text = "Sign"});
return new ItemSwipeTemplateCell{ View = MainGrid };
});
but it throws nullreferenceexception
i think the problem is in the last line
but what else should i return
i tried a lot of returns but all throws the same exception
please help me ASAP