- add: menu
This commit is contained in:
@@ -11,12 +11,23 @@
|
||||
xmlns:models="clr-namespace:Nebula.Launcher.Models"
|
||||
xmlns:viewModels="clr-namespace:Nebula.Launcher.ViewModels"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Design.DataContext>
|
||||
<viewModels:MainViewModel />
|
||||
</Design.DataContext>
|
||||
|
||||
<Grid
|
||||
ColumnDefinitions="*"
|
||||
ColumnDefinitions="65,*"
|
||||
Margin="0"
|
||||
RowDefinitions="*,40">
|
||||
|
||||
<TransitioningContentControl
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Content="{Binding CurrentPage}" />
|
||||
|
||||
<SplitView
|
||||
Grid.Row="0" Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
CompactPaneLength="65"
|
||||
DisplayMode="CompactInline"
|
||||
IsPaneOpen="{Binding IsPaneOpen}"
|
||||
@@ -29,33 +40,35 @@
|
||||
Grid.Row="0"
|
||||
Margin="0,0,5,0"
|
||||
Padding="0">
|
||||
<ListBox
|
||||
ItemsSource="{Binding Items}"
|
||||
Margin="2,0,-100,0"
|
||||
Padding="0"
|
||||
SelectedItem="{Binding SelectedListItem}">
|
||||
<ListBox.Styles>
|
||||
<Style Selector="ListBoxItem">
|
||||
<Setter Property="Padding" Value="12 8" />
|
||||
</Style>
|
||||
</ListBox.Styles>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type models:ListItemTemplate}">
|
||||
<StackPanel Orientation="Horizontal" Spacing="17">
|
||||
<PathIcon Data="{Binding IconKey, Converter={x:Static converters:TypeConverters.IconConverter}}" Width="14" />
|
||||
<TextBlock Text="{Binding Label}">
|
||||
<TextBlock.IsVisible />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<Grid ColumnDefinitions="*" RowDefinitions="*,40">
|
||||
<ListBox
|
||||
ItemsSource="{Binding Items}"
|
||||
Padding="0"
|
||||
Background="#00000000"
|
||||
SelectedItem="{Binding SelectedListItem}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type models:ListItemTemplate}">
|
||||
<StackPanel Orientation="Horizontal" Spacing="17">
|
||||
<PathIcon Data="{Binding IconKey,
|
||||
Converter={x:Static converters:TypeConverters.IconConverter}}" Height="40" Width="40"/>
|
||||
<TextBlock Text="{Binding Label}" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<Button Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Stretch" Classes="ViewSelectButton"
|
||||
Padding="15,0,15,0"
|
||||
Command="{Binding TriggerPaneCommand}">
|
||||
<Label VerticalAlignment="Center" HorizontalAlignment="Center">|||</Label>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
</SplitView.Pane>
|
||||
</SplitView>
|
||||
|
||||
|
||||
|
||||
<Border
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
BorderThickness="0,2,0,0"
|
||||
CornerRadius="0,0,0,0"
|
||||
Grid.Row="1"
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d"
|
||||
x:Class="Nebula.Launcher.Views.Pages.AccountInfoPage"
|
||||
x:Class="Nebula.Launcher.Views.Pages.AccountInfoView"
|
||||
x:DataType="viewModels:AccountInfoViewModel"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:controls="clr-namespace:Nebula.Launcher.Views.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:viewModels="clr-namespace:Nebula.Launcher.ViewModels">
|
||||
<Grid ColumnDefinitions="*,1.5*" RowDefinitions="*">
|
||||
<StackPanel Grid.Column="0" Grid.Row="0">
|
||||
<Border
|
||||
@@ -4,14 +4,14 @@ using Nebula.Launcher.ViewModels;
|
||||
namespace Nebula.Launcher.Views.Pages;
|
||||
|
||||
public interface ITab;
|
||||
public partial class AccountInfoPage : UserControl
|
||||
public partial class AccountInfoView : UserControl
|
||||
{
|
||||
public AccountInfoPage()
|
||||
public AccountInfoView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public AccountInfoPage(AccountInfoViewModel viewModel)
|
||||
public AccountInfoView(ViewModels.AccountInfoViewModel viewModel)
|
||||
: this()
|
||||
{
|
||||
DataContext = viewModel;
|
||||
@@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Nebula.Launcher.Views.Pages;
|
||||
|
||||
public partial class ServerListPage : UserControl
|
||||
{
|
||||
public ServerListPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -2,12 +2,14 @@
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d"
|
||||
x:Class="Nebula.Launcher.Views.Pages.ServerListPage"
|
||||
x:Class="Nebula.Launcher.Views.Pages.ServerListView"
|
||||
x:DataType="pages:ServerListView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:controls="clr-namespace:Nebula.Launcher.Views.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:pages="clr-namespace:Nebula.Launcher.Views.Pages">
|
||||
<Grid ColumnDefinitions="*" RowDefinitions="*,40">
|
||||
<ScrollViewer Margin="0,0,0,10" Padding="0,0,8,0">
|
||||
<StackPanel>
|
||||
20
Nebula.Launcher/Views/Pages/ServerListView.axaml.cs
Normal file
20
Nebula.Launcher/Views/Pages/ServerListView.axaml.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Avalonia.Controls;
|
||||
using Nebula.Launcher.ViewModels;
|
||||
|
||||
namespace Nebula.Launcher.Views.Pages;
|
||||
|
||||
public partial class ServerListView : UserControl
|
||||
{
|
||||
// This constructor is used when the view is created by the XAML Previewer
|
||||
public ServerListView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
// This constructor is used when the view is created via dependency injection
|
||||
public ServerListView(ServerListViewModel viewModel)
|
||||
: this()
|
||||
{
|
||||
DataContext = viewModel;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user