53 lines
2.1 KiB
XML
53 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="using:SNote.ViewModels"
|
|
mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="300"
|
|
x:Class="SNote.Views.LinkFolderDialog"
|
|
x:DataType="vm:MainViewModel">
|
|
|
|
<Border Background="#1D2D44"
|
|
CornerRadius="12"
|
|
Padding="20"
|
|
Width="360" Height="300"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
BoxShadow="0 4 20 #000000">
|
|
|
|
<Grid RowDefinitions="Auto,*,Auto" VerticalAlignment="Stretch">
|
|
|
|
<TextBlock Grid.Row="0"
|
|
Text="Link Node to Folder"
|
|
FontSize="16" FontWeight="Bold"
|
|
Foreground="#F0F3F4"
|
|
Margin="0,0,0,15"/>
|
|
|
|
<!-- Folders list selector -->
|
|
<ScrollViewer Grid.Row="1" Margin="0,0,0,15">
|
|
<ItemsControl ItemsSource="{Binding AllFoldersList}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Button Content="{Binding Name}"
|
|
HorizontalAlignment="Stretch"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
Padding="10,8"
|
|
CornerRadius="6"
|
|
Foreground="#E0E1DD"
|
|
Command="{Binding $parent[UserControl].DataContext.LinkNodeToFolderCommand, DataType={x:Type vm:MainViewModel}}"
|
|
CommandParameter="{Binding}"/>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
|
|
<!-- Cancel action -->
|
|
<Button Grid.Row="2"
|
|
Content="Cancel"
|
|
HorizontalAlignment="Stretch"
|
|
HorizontalContentAlignment="Center"
|
|
Command="{Binding CloseLinkDialogCommand}"/>
|
|
</Grid>
|
|
</Border>
|
|
</UserControl>
|