void InitLayout() { _grid = new Grid(); _grid.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto }); _grid.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto }); _grid.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Star }); _headerList = new ItemsControl(); _headerList.SetValue(Grid.RowProperty, 0); _viewPanel = new ViewPanel() { Orientation = ScrollOrientation.Horizontal }; _viewPanel.SetValue(Grid.RowProperty, 2); _grid.Children.Add(_headerList); _grid.Children.Add(_viewPanel); this.Content = _grid; }
public ViewPanel() { Panel = this; base.Orientation = ScrollOrientation.Horizontal; _horizentalLayout = new HorizontalStackLayout() { Spacing = 0 }; this.Content = _horizentalLayout; }