Files
NebulaLauncher/Nebula.Launcher/Views/Pages/ContentBrowserView.axaml
2025-01-20 16:35:48 +03:00

83 lines
3.0 KiB
XML

<UserControl
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d"
x:Class="Nebula.Launcher.Views.Pages.ContentBrowserView"
x:DataType="pages:ContentBrowserViewModel"
xmlns="https://github.com/avaloniaui"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pages="clr-namespace:Nebula.Launcher.ViewModels.Pages"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Design.DataContext>
<pages:ContentBrowserViewModel />
</Design.DataContext>
<Grid
ColumnDefinitions="*,2*,40,40"
Margin="8"
RowDefinitions="40,*">
<Border CornerRadius="10,10,0,0" Grid.ColumnSpan="4" />
<TextBox
Grid.Column="0"
Grid.Row="0"
Margin="5"
Text="{Binding ServerText}"
VerticalAlignment="Center"
Watermark="Server Url..." />
<TextBox
Grid.Column="1"
Grid.Row="0"
Margin="5"
Text="{Binding SearchText}"
VerticalAlignment="Center"
Watermark="Path..." />
<Button
Command="{Binding OnBackEnter}"
Grid.Column="2"
Grid.Row="0"
Padding="10">
<Svg Path="/Assets/svg/undo.svg" />
</Button>
<Button
Command="{Binding OnGoEnter}"
Grid.Column="3"
Grid.Row="0"
Padding="10">
<Svg Path="/Assets/svg/next.svg" />
</Button>
<ScrollViewer
Grid.Column="0"
Grid.ColumnSpan="4"
Grid.Row="1"
Margin="0,0,0,5">
<ItemsControl ItemsSource="{Binding Entries}" Padding="0,0,0,0">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type pages:ContentEntry}">
<Button
Command="{Binding OnPathGo}"
CornerRadius="0"
Height="30"
HorizontalAlignment="Stretch">
<StackPanel Orientation="Horizontal" Spacing="15">
<Border
Background="#00000000"
BorderThickness="0,0,2,0"
CornerRadius="0">
<Svg
Height="15"
Margin="10,0,10,0"
Path="{Binding IconPath}" />
</Border>
<Label>
<TextBlock Text="{Binding Name}" VerticalAlignment="Center" />
</Label>
</StackPanel>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Grid>
</UserControl>