public AccordionControl(View header = null)
{
AnimationDuration = 400;
BackgroundColor = DefaultButtonBackgroundColor;
DefaultButtonTextColor = Color.Black;
Padding = new Thickness(0, 0, 0, 0);
RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
RowSpacing = 0;
ColumnSpacing = 0;
CreateStacklayout();
m_shadowImage = new Image()
{
Source = "HeaderShadow.png",
InputTransparent = true,
VerticalOptions = LayoutOptions.Start,
HorizontalOptions = LayoutOptions.FillAndExpand,
Aspect = Aspect.Fill
};
m_scrollView = new ScrollView()
{
BackgroundColor = DefaultButtonBackgroundColor,
Content = m_cellStackLayout,
Orientation = ScrollOrientation.Vertical,
VerticalOptions = LayoutOptions.FillAndExpand,
};
Children.Add(m_scrollView, 0, 1);
if (header != null)
{
Children.Add(header, 0, 0);
Children.Add(m_shadowImage, 0, 1);
}
}