Formatted MainWindow.axaml by XamlStyler

This commit is contained in:
2022-04-18 13:08:55 +02:00
parent 84522d8f96
commit 217ef04ff7

View File

@@ -1,51 +1,65 @@
<Window <Window
Background="Transparent"
ExtendClientAreaToDecorationsHint="True"
Icon="/Assets/filetime.ico"
InputElement.KeyDown="OnKeyDown"
Opened="OnWindowOpened"
Title="FileTime"
TransparencyLevelHint="Blur"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d"
x:Class="FileTime.GuiApp.Views.MainWindow" x:Class="FileTime.GuiApp.Views.MainWindow"
x:CompileBindings="True"
x:DataType="vm:IMainWindowViewModelBase"
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:corevm="using:FileTime.App.Core.ViewModels" xmlns:corevm="using:FileTime.App.Core.ViewModels"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:FileTime.GuiApp.Views" xmlns:local="using:FileTime.GuiApp.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="using:FileTime.GuiApp.ViewModels" xmlns:vm="using:FileTime.GuiApp.ViewModels"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> Title="FileTime"
d:DesignHeight="450"
d:DesignWidth="800"
x:CompileBindings="True"
x:DataType="vm:IMainWindowViewModelBase"
Background="Transparent"
ExtendClientAreaToDecorationsHint="True"
Icon="/Assets/filetime.ico"
InputElement.KeyDown="OnKeyDown"
Opened="OnWindowOpened"
TransparencyLevelHint="Blur"
mc:Ignorable="d">
<Design.DataContext> <Design.DataContext>
<vm:MainWindowViewModel /> <vm:MainWindowViewModel />
</Design.DataContext> </Design.DataContext>
<Grid Background="{DynamicResource AppBackgroundBrush}"> <Grid Background="{DynamicResource AppBackgroundBrush}">
<Grid IsVisible="{Binding Loading, Converter={x:Static BoolConverters.Not}}" x:DataType="vm:MainWindowViewModel"> <Grid
<Grid ColumnDefinitions="250,*" RowDefinitions="Auto,*"> x:DataType="vm:MainWindowViewModel"
IsVisible="{Binding Loading, Converter={x:Static BoolConverters.Not}}">
<Grid
ColumnDefinitions="250,*"
RowDefinitions="Auto,*">
<Grid PointerPressed="HeaderPointerPressed"> <Grid PointerPressed="HeaderPointerPressed">
<Rectangle Fill="#01000000" /> <Rectangle Fill="#01000000" />
<TextBlock Margin="15,10" Text="{Binding Title}" /> <TextBlock
</Grid> Margin="15,10"
Text="{Binding Title}" />
<Grid Grid.Column="1" PointerPressed="HeaderPointerPressed">
<Rectangle Fill="#01000000" />
<StackPanel Margin="20,10" Orientation="Horizontal">
<!-- local:PathPresenter DataContext="{Binding AppState.SelectedTab^.CurrentLocation^.FullName.Path,Converter={StaticResource PathPreformatter}}"/ -->
<TextBlock Foreground="{StaticResource AccentBrush}" Text="{Binding AppState.SelectedTab^.CurrentSelectedItem^.DisplayNameText}" />
</StackPanel>
</Grid> </Grid>
<Grid <Grid
Grid.Column="1" Grid.Column="1"
PointerPressed="HeaderPointerPressed">
<Rectangle Fill="#01000000" />
<StackPanel
Margin="20,10"
Orientation="Horizontal">
<!-- local:PathPresenter DataContext="{Binding AppState.SelectedTab^.CurrentLocation^.FullName.Path,Converter={StaticResource PathPreformatter}}"/ -->
<TextBlock
Foreground="{StaticResource AccentBrush}"
Text="{Binding AppState.SelectedTab^.CurrentSelectedItem^.DisplayNameText}" />
</StackPanel>
</Grid>
<Grid
Grid.Row="1" Grid.Row="1"
Grid.Column="1"
RowDefinitions="Auto,40,*,Auto"> RowDefinitions="Auto,40,*,Auto">
<ItemsControl Grid.Row="1" Items="{Binding AppState.Tabs}"> <ItemsControl
Grid.Row="1"
Items="{Binding AppState.Tabs}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" /> <StackPanel Orientation="Horizontal" />
@@ -54,26 +68,32 @@
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid RowDefinitions="Auto,1"> <Grid RowDefinitions="Auto,1">
<StackPanel Margin="20,0,20,0" Orientation="Horizontal"> <StackPanel
Margin="20,0,20,0"
Orientation="Horizontal">
<TextBlock Text="{Binding TabNumber, StringFormat=({0})}" VerticalAlignment="Center" /> <TextBlock
VerticalAlignment="Center"
Text="{Binding TabNumber, StringFormat=({0})}" />
<TextBlock <TextBlock
Margin="5,0,0,0" Margin="5,0,0,0"
Text="{Binding CurrentLocation^.Name}" VerticalAlignment="Center"
VerticalAlignment="Center" /> Text="{Binding CurrentLocation^.Name}" />
</StackPanel> </StackPanel>
<Rectangle <Rectangle
Fill="{DynamicResource ForegroundBrush}"
Grid.Row="1" Grid.Row="1"
Fill="{DynamicResource ForegroundBrush}"
IsVisible="{Binding IsSelected^}" /> IsVisible="{Binding IsSelected^}" />
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
</ItemsControl> </ItemsControl>
<Grid Grid.Row="2" Margin="20,0,0,0"> <Grid
Grid.Row="2"
Margin="20,0,0,0">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="15*" /> <ColumnDefinition Width="15*" />
@@ -85,69 +105,73 @@
<Rectangle <Rectangle
Fill="{DynamicResource ContentSeparatorBrush}"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Center" Width="1"
Margin="0,10,0,10" Margin="0,10,0,10"
HorizontalAlignment="Center"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Width="1" /> Fill="{DynamicResource ContentSeparatorBrush}" />
<Grid Grid.Column="2" RowDefinitions="Auto,*"> <Grid
Grid.Column="2"
RowDefinitions="Auto,*">
<Grid IsVisible="{Binding AppState.SelectedTab^.CurrentLocation^.IsLoading^}"> <Grid IsVisible="{Binding AppState.SelectedTab^.CurrentLocation^.IsLoading^}">
<Image <Image
Classes="LoadingAnimation" Width="40"
Height="40" Height="40"
Source="{SvgImage /Assets/loading.svg}" Classes="LoadingAnimation"
Width="40" /> Source="{SvgImage /Assets/loading.svg}" />
</Grid> </Grid>
<ListBox <ListBox
x:Name="CurrentItems"
Grid.Row="1"
x:CompileBindings="False"
AutoScrollToSelectedItem="True" AutoScrollToSelectedItem="True"
Classes="ContentListView" Classes="ContentListView"
Grid.Row="1"
IsTabStop="True" IsTabStop="True"
Items="{Binding AppState.SelectedTab^.CurrentItems^}" Items="{Binding AppState.SelectedTab^.CurrentItems^}"
ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible">
x:CompileBindings="False"
x:Name="CurrentItems">
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate x:DataType="corevm:IItemViewModel"> <DataTemplate x:DataType="corevm:IItemViewModel">
<local:ItemView HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" /> <local:ItemView
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch" />
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
</ListBox> </ListBox>
<TextBlock <TextBlock
x:Name="CurrentEmpty"
Grid.Row="1"
Margin="10"
HorizontalAlignment="Center"
x:CompileBindings="False"
FontWeight="Bold" FontWeight="Bold"
Foreground="{DynamicResource ErrorBrush}" Foreground="{DynamicResource ErrorBrush}"
Grid.Row="1" IsVisible="{Binding AppState.SelectedTab^.CurrentLocation^.Items^.Count, Converter={StaticResource EqualityConverter}, ConverterParameter=0}">
HorizontalAlignment="Center"
IsVisible="{Binding AppState.SelectedTab^.CurrentLocation^.Items^.Count, Converter={StaticResource EqualityConverter}, ConverterParameter=0}"
Margin="10"
x:CompileBindings="False"
x:Name="CurrentEmpty">
Empty Empty
</TextBlock> </TextBlock>
</Grid> </Grid>
<Rectangle <Rectangle
Fill="{DynamicResource ContentSeparatorBrush}"
Grid.Column="3" Grid.Column="3"
HorizontalAlignment="Center" Width="1"
Margin="0,10,0,10" Margin="0,10,0,10"
HorizontalAlignment="Center"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Width="1" /> Fill="{DynamicResource ContentSeparatorBrush}" />
<Grid Grid.Column="4"> <Grid Grid.Column="4">
<Grid IsVisible="{Binding AppState.SelectedTab^.SelectedsChildren^, Converter={x:Static ObjectConverters.IsNotNull}}"> <Grid IsVisible="{Binding AppState.SelectedTab^.SelectedsChildren^, Converter={x:Static ObjectConverters.IsNotNull}}">
<ListBox <ListBox
x:Name="ChildItems"
x:CompileBindings="False"
AutoScrollToSelectedItem="True" AutoScrollToSelectedItem="True"
Classes="ContentListView" Classes="ContentListView"
IsVisible="{Binding AppState.SelectedTab^.SelectedsChildren^.Count, Converter={StaticResource NotEqualsConverter}, ConverterParameter=0}" IsVisible="{Binding AppState.SelectedTab^.SelectedsChildren^.Count, Converter={StaticResource NotEqualsConverter}, ConverterParameter=0}"
Items="{Binding AppState.SelectedTab^.SelectedsChildren^}" Items="{Binding AppState.SelectedTab^.SelectedsChildren^}">
x:CompileBindings="False"
x:Name="ChildItems">
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate x:DataType="corevm:IItemViewModel"> <DataTemplate x:DataType="corevm:IItemViewModel">
<local:ItemView /> <local:ItemView />
@@ -156,29 +180,35 @@
</ListBox> </ListBox>
<TextBlock <TextBlock
x:Name="ChildEmpty"
Margin="10"
HorizontalAlignment="Center"
x:CompileBindings="False"
FontWeight="Bold" FontWeight="Bold"
Foreground="{DynamicResource ErrorBrush}" Foreground="{DynamicResource ErrorBrush}"
HorizontalAlignment="Center" IsVisible="{Binding AppState.SelectedTab^.SelectedsChildren^.Count, Converter={StaticResource EqualityConverter}, ConverterParameter=0}">
IsVisible="{Binding AppState.SelectedTab^.SelectedsChildren^.Count, Converter={StaticResource EqualityConverter}, ConverterParameter=0}"
Margin="10"
x:CompileBindings="False"
x:Name="ChildEmpty">
Empty Empty
</TextBlock> </TextBlock>
</Grid> </Grid>
<Grid IsVisible="{Binding AppState.SelectedTab^.SelectedsChildren^, Converter={x:Static ObjectConverters.IsNull}, ConverterParameter=0}" RowDefinitions="Auto, Auto"> <Grid
IsVisible="{Binding AppState.SelectedTab^.SelectedsChildren^, Converter={x:Static ObjectConverters.IsNull}, ConverterParameter=0}"
RowDefinitions="Auto, Auto">
<TextBlock <TextBlock
Foreground="{DynamicResource ErrorBrush}"
HorizontalAlignment="Center"
Margin="0,0,0,10" Margin="0,0,0,10"
HorizontalAlignment="Center"
Foreground="{DynamicResource ErrorBrush}"
Text="There were some errors while opening container." Text="There were some errors while opening container."
TextWrapping="Wrap" /> TextWrapping="Wrap" />
<ItemsRepeater Grid.Row="1" Items="{Binding AppState.SelectedTab^.CurrentSelectedItem^.BaseItem.Exceptions^}"> <ItemsRepeater
Grid.Row="1"
Items="{Binding AppState.SelectedTab^.CurrentSelectedItem^.BaseItem.Exceptions^}">
<ItemsRepeater.ItemTemplate> <ItemsRepeater.ItemTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Margin="5,0,5,10" Text="{Binding Converter={StaticResource ExceptionToStringConverter}}" /> <TextBlock
Margin="5,0,5,10"
Text="{Binding Converter={StaticResource ExceptionToStringConverter}}" />
</DataTemplate> </DataTemplate>
</ItemsRepeater.ItemTemplate> </ItemsRepeater.ItemTemplate>
</ItemsRepeater> </ItemsRepeater>
@@ -193,14 +223,16 @@
</Grid> </Grid>
<Grid IsVisible="{Binding Loading}"> <Grid IsVisible="{Binding Loading}">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> <StackPanel
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Image <Image
Width="128"
Height="128" Height="128"
Source="/Assets/filetime.ico" Source="/Assets/filetime.ico" />
Width="128" />
<TextBlock <TextBlock
HorizontalAlignment="Center"
Margin="50" Margin="50"
HorizontalAlignment="Center"
Text="Loading..." /> Text="Loading..." />
</StackPanel> </StackPanel>
</Grid> </Grid>