diff options
Diffstat (limited to 'Views/Image/ImagePanel.xaml')
| -rw-r--r-- | Views/Image/ImagePanel.xaml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Views/Image/ImagePanel.xaml b/Views/Image/ImagePanel.xaml new file mode 100644 index 0000000..f54458d --- /dev/null +++ b/Views/Image/ImagePanel.xaml @@ -0,0 +1,26 @@ +<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:vms="clr-namespace:Avalar.ViewModels.Image" + xmlns:local="clr-namespace:Avalar.Views.Image" + mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" + x:Class="Avalar.Views.Image.ImagePanel"> + <Border Margin="5"> + <ContentControl Content="{Binding ChildViewModel}"> + <ContentControl.DataTemplates> + <DataTemplate DataType="{x:Type vms:ImageLoadedViewModel}"> + <local:ImageControl/> + </DataTemplate> + <DataTemplate DataType="{x:Type vms:ImageNotLoadedViewModel}"> + <Button Command="{Binding OpenFileCommand}"> + <ItemsControl> + <TextBlock Text="No image loaded"/> + <TextBlock Text="Click here or drag an image over this area to load."/> + </ItemsControl> + </Button> + </DataTemplate> + </ContentControl.DataTemplates> + </ContentControl> + </Border> +</UserControl> |
