Accordion.Forms.AccordionControl.AccordionControl C# (CSharp) Méthode

AccordionControl() public méthode

Initializes a new instance of the T:Accordion.Forms.AccordionControl class.
public AccordionControl ( View header = null ) : System
header Xamarin.Forms.View Defines a header for the view.
Résultat System
        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);
            }

        }