mirror of
https://onedev.site.tesses.net/crosslang/crosslangdevstudio
synced 2026-02-08 09:15:45 +00:00
First Commit
This commit is contained in:
46
Views/WelcomeView.axaml
Normal file
46
Views/WelcomeView.axaml
Normal file
@@ -0,0 +1,46 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user