Skip to content

Commit

Permalink
Added scrollviewer to new tab page
Browse files Browse the repository at this point in the history
  • Loading branch information
MistaOmega committed Oct 5, 2024
1 parent f3b2e21 commit 53a4057
Showing 1 changed file with 53 additions and 51 deletions.
104 changes: 53 additions & 51 deletions src/NexusMods.App.UI/WorkspaceSystem/NewTabPage/NewTabPageView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,63 +12,65 @@
mc:Ignorable="d" d:DesignWidth="900" d:DesignHeight="500"
x:Class="NexusMods.App.UI.WorkspaceSystem.NewTabPageView">

<StackPanel Margin="24" Orientation="Vertical" Spacing="24">
<banners:InfoBanner x:Name="InfoBanner">
<StackPanel>
<TextBlock Text="{x:Static resources:Language.NewTabPageInfoBannerText1}"/>
<icons:UnifiedIcon x:Name="AddPanelIcon"/>
<icons:UnifiedIcon Value="{x:Static icons:IconValues.Add}" Size="16" />
<TextBlock Text="{x:Static resources:Language.NewTabPageInfoBannerText2}"/>
</StackPanel>
</banners:InfoBanner>
<ScrollViewer>
<StackPanel Margin="24" Orientation="Vertical" Spacing="24">
<banners:InfoBanner x:Name="InfoBanner">
<StackPanel>
<TextBlock Text="{x:Static resources:Language.NewTabPageInfoBannerText1}" />
<icons:UnifiedIcon x:Name="AddPanelIcon" />
<icons:UnifiedIcon Value="{x:Static icons:IconValues.Add}" Size="16" />
<TextBlock Text="{x:Static resources:Language.NewTabPageInfoBannerText2}" />
</StackPanel>
</banners:InfoBanner>

<ItemsControl x:Name="Sections">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl x:Name="Sections">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>

<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type workspace:INewTabPageSectionViewModel}">
<StackPanel Classes="Spacing-3" MinWidth="160" MaxWidth="375" Margin="0 0 24 24">
<TextBlock x:Name="SectionNameTextBlock" Text="{CompiledBinding SectionName}"
Classes="HeadingSMSemi" />
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type workspace:INewTabPageSectionViewModel}">
<StackPanel Classes="Spacing-3" MinWidth="160" MaxWidth="375" Margin="0 0 24 24">
<TextBlock x:Name="SectionNameTextBlock" Text="{CompiledBinding SectionName}"
Classes="HeadingSMSemi" />

<ItemsControl x:Name="Items" ItemsSource="{CompiledBinding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Classes="Spacing-2" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl x:Name="Items" ItemsSource="{CompiledBinding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Classes="Spacing-2" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>

<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type workspace:INewTabPageSectionItemViewModel}">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type workspace:INewTabPageSectionItemViewModel}">

<Border Classes="Mid Rounded">
<navigation:NavigationControl
Height="56"
Padding="0"
Width="375"
Background="{StaticResource SurfaceMidBrush}"
Command="{CompiledBinding SelectItemCommand}">
<Border Classes="Mid Rounded">
<navigation:NavigationControl
Height="56"
Padding="0"
Width="375"
Background="{StaticResource SurfaceMidBrush}"
Command="{CompiledBinding SelectItemCommand}">

<StackPanel Margin="16" Orientation="Horizontal" Classes="Spacing-1">
<icons:UnifiedIcon Size="24" Value="{CompiledBinding Icon}" />
<TextBlock x:Name="NameTextBlock"
Text="{CompiledBinding Name}"
Classes="BodyLGBold" />
</StackPanel>
</navigation:NavigationControl>
</Border>
<StackPanel Margin="16" Orientation="Horizontal" Classes="Spacing-1">
<icons:UnifiedIcon Size="24" Value="{CompiledBinding Icon}" />
<TextBlock x:Name="NameTextBlock"
Text="{CompiledBinding Name}"
Classes="BodyLGBold" />
</StackPanel>
</navigation:NavigationControl>
</Border>

</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</ScrollViewer>

</reactive:ReactiveUserControl>

0 comments on commit 53a4057

Please sign in to comment.