Files
crosslangdevstudio/Views/WelcomeView.axaml
2025-08-31 00:25:32 -05:00

46 lines
2.1 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:CrossLangDevStudio.ViewModels"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="CrossLangDevStudio.Views.WelcomeView"
x:DataType="vm:WelcomeViewModel">
<Design.DataContext>
<!-- This only sets the DataContext for the previewer in an IDE,
to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) -->
<vm:WelcomeViewModel />
</Design.DataContext>
<Border
Padding="100">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<TextBlock FontSize="32" FontWeight="Bold" Text="CrossLang DevStudio" />
<TextBlock FontSize="16" FontWeight="Bold" Text="Start" />
<HyperlinkButton Content="New Project" Command="{Binding NewProjectCommand}"/>
<HyperlinkButton Content="Open Project" Command="{Binding OpenProjectCommand}"/>
</StackPanel>
<StackPanel Grid.Row="1">
<TextBlock FontSize="16" FontWeight="Bold" Text="Recent" />
<ItemsControl ItemsSource="{Binding RecentProjects}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<HyperlinkButton Content="{Binding Name}" Command="{Binding ClickCommand}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</Grid>
</Border>
</UserControl>