using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SebastianTabViewRepro.Portable.Controls;
using Telerik.XamarinForms.Primitives;
using Xamarin.Forms;

namespace SebastianTabViewRepro.Portable.Views
{
    public class TabPage : ContentPage
    {
        public TabPage()
        {
            Content = new StackLayout
            {
                Children = {
                    new Label { Text = "Welcome to Xamarin Forms!" }
                }
            };

            RadTabView MyTabView = new RadTabView();

            MyTabView.Items.Add(new TabViewItem
            {
                Content = new Label { Text = "Label 1" },
                Header = new TabViewHeaderItem
                {
                    ControlTemplate = new ControlTemplate(typeof(CustomTabViewHeader)),
                    Text = "Tab 1"
                }
            });

            MyTabView.Items.Add(new TabViewItem
            {
                Content = new Label { Text = "Label 2" },
                Header = new TabViewHeaderItem
                {
                    ControlTemplate = new ControlTemplate(typeof(CustomTabViewHeader)),
                    Text = "Tab 2"
                }
            });

            Content = MyTabView;
        }
    }
}