|
@@ -3,16 +3,26 @@
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
- xmlns:local="clr-namespace:PixiEditor.Views.UserControls.Lospec"
|
|
|
+ xmlns:local="clr-namespace:PixiEditor.Views.UserControls.Lospec" xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters"
|
|
|
mc:Ignorable="d"
|
|
|
d:DesignHeight="400" d:DesignWidth="250" GotFocus="UserControl_GotFocus" Name="lospecPalettesBrowser">
|
|
|
- <ScrollViewer Margin="5" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
|
|
- <ItemsControl ItemsSource="{Binding ElementName=lospecPalettesBrowser, Path=PaletteList.Palettes}">
|
|
|
- <ItemsControl.ItemTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <local:LospecPaletteItem Palette="{Binding}" ImportPaletteCommand="{Binding ImportPaletteCommand, ElementName=lospecPalettesBrowser}"/>
|
|
|
- </DataTemplate>
|
|
|
- </ItemsControl.ItemTemplate>
|
|
|
- </ItemsControl>
|
|
|
- </ScrollViewer>
|
|
|
+ <UserControl.Resources>
|
|
|
+ <BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
|
|
|
+ </UserControl.Resources>
|
|
|
+ <Grid>
|
|
|
+ <TextBlock Text="Couldn't fetch palettes" Foreground="White" FontSize="20" HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" Visibility="{Binding ElementName=itemsControl,
|
|
|
+ Path=Visibility, Converter={converters:OppositeVisibilityConverter}}"/>
|
|
|
+ <ScrollViewer Margin="5" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
|
|
+ <ItemsControl Name="itemsControl" ItemsSource="{Binding ElementName=lospecPalettesBrowser, Path=PaletteList.Palettes}"
|
|
|
+ Visibility="{Binding ElementName=lospecPalettesBrowser, Path=PaletteList.FetchedCorrectly,
|
|
|
+ Converter={StaticResource BoolToVisibilityConverter}}">
|
|
|
+ <ItemsControl.ItemTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <local:LospecPaletteItem Palette="{Binding}" ImportPaletteCommand="{Binding ImportPaletteCommand, ElementName=lospecPalettesBrowser}"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </ItemsControl.ItemTemplate>
|
|
|
+ </ItemsControl>
|
|
|
+ </ScrollViewer>
|
|
|
+ </Grid>
|
|
|
</UserControl>
|