Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void CreateTabLayout()
- {
- var grid = new Grid
- {
- RowDefinitions =
- {
- new RowDefinition(GridLength.Auto),
- new RowDefinition(GridLength.Star)
- }
- };
- var dock = new Panel
- {
- VerticalAlignment = VerticalAlignment.Center,
- Children =
- {
- new TextBlock
- {
- Text = "Aspira",
- FontSize = 18,
- //Foreground = _materialSecondary,
- HorizontalAlignment = HorizontalAlignment.Center,
- VerticalAlignment = VerticalAlignment.Stretch
- }
- }
- };
- var tab = new TabControl
- {
- FontFamily = "Montserrat",
- TabStripPlacement = Dock.Top,
- Items =
- {
- HomeTab(),
- CreateFavouritesTab(),
- CreateHistoryTab(),
- CreateSettingsTab(),
- }
- };
- Grid.SetRow(dock, 0);
- Grid.SetRow(tab, 1);
- grid.Children.Add(dock);
- grid.Children.Add(tab);
- this.Content = grid;
- }
- private Control HomeTab()
- {
- var homeIcon = new MaterialIcon
- {
- HorizontalAlignment = HorizontalAlignment.Stretch,
- VerticalAlignment = VerticalAlignment.Stretch,
- Kind = MaterialIconKind.Home,
- RenderTransform = _scaleTransform1_5,
- };
- var ofthedayTabItem = new TabItem
- {
- HorizontalAlignment = HorizontalAlignment.Stretch,
- VerticalAlignment = VerticalAlignment.Stretch,
- Header = "Of the day",
- Content = new OfTheDayPageContent(_mainViewModel, _modv2ViewModel)
- };
- var onthisdayTabItem = new TabItem
- {
- //HorizontalAlignment = HorizontalAlignment.Stretch,
- VerticalAlignment = VerticalAlignment.Stretch,
- Header = "On this day",
- Content = new OnThisDayPageContent(_mainViewModel)
- };
- var subTab = new TabControl
- {
- TabStripPlacement = Dock.Top,
- Items =
- {
- ofthedayTabItem,
- onthisdayTabItem
- }
- };
- return new TabItem
- {
- //HorizontalAlignment = HorizontalAlignment.Stretch,
- VerticalAlignment = VerticalAlignment.Stretch,
- Header = homeIcon,
- Content = subTab
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment