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

27 lines
1.6 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.NewTabView"
x:DataType="vm:NewTabViewModel">
<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:NewTabViewModel />
</Design.DataContext>
<StackPanel Margin="20">
<TextBlock Margin="0 5" >Path:</TextBlock>
<TextBox Watermark="Path" Text="{Binding FilePath}"/>
<Button Content="New File" Command="{Binding CreateFileCommand}" />
<Button Content="New Folder" Command="{Binding CreateDirectoryCommand}" />
<TextBlock Margin="0 5" >Url:</TextBlock>
<TextBox Watermark="Url" Text="{Binding Url}"/>
<Button Content="Download File" Command="{Binding DownloadFileCommand}" />
<ProgressBar Margin="0 10" Height="20"
Minimum="0.0" Maximum="1.0" Value="{Binding Progress}"
ShowProgressText="True"/>
</StackPanel>
</UserControl>