TableRowsPlusAfter, InformationOutline and LinkOff don't exist in IconPacks 4.11.0. Replaced with TablePlus, AlertCircleOutline, LinkVariantOff. Audited all XAML files via DLL reflection — no further invalid icon names remain. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
300 lines
17 KiB
XML
300 lines
17 KiB
XML
<mah:MetroWindow x:Class="EbayListingTool.Views.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
|
|
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
|
|
xmlns:local="clr-namespace:EbayListingTool.Views"
|
|
Title="eBay Listing Tool — UK"
|
|
Height="820" Width="1180"
|
|
MinHeight="600" MinWidth="900"
|
|
WindowStartupLocation="CenterScreen"
|
|
GlowBrush="{DynamicResource MahApps.Brushes.Accent}">
|
|
|
|
<mah:MetroWindow.Resources>
|
|
<Style x:Key="ConnectedDotStyle" TargetType="Ellipse">
|
|
<Setter Property="Width" Value="10"/>
|
|
<Setter Property="Height" Value="10"/>
|
|
<Setter Property="Margin" Value="0,0,6,0"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
</Style>
|
|
|
|
<!-- Tab header style: larger font, more padding, accent bottom border on selected -->
|
|
<Style x:Key="AppTabItem" TargetType="TabItem"
|
|
BasedOn="{StaticResource MahApps.Styles.TabItem}">
|
|
<Setter Property="FontSize" Value="13"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="Padding" Value="16,10"/>
|
|
<Setter Property="BorderThickness" Value="0,0,0,3"/>
|
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="BorderBrush" Value="{DynamicResource MahApps.Brushes.Accent}"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<!-- Pulsing glow animation for the Connect button on lock overlays -->
|
|
<Style x:Key="LockConnectButton" TargetType="Button"
|
|
BasedOn="{StaticResource MahApps.Styles.Button.Square.Accent}">
|
|
<Setter Property="Padding" Value="20,10"/>
|
|
<Setter Property="FontSize" Value="13"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="Effect">
|
|
<Setter.Value>
|
|
<DropShadowEffect Color="#7C3AED" BlurRadius="12" ShadowDepth="0" Opacity="0.7"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<EventTrigger RoutedEvent="Button.Loaded">
|
|
<BeginStoryboard>
|
|
<Storyboard RepeatBehavior="Forever" AutoReverse="True">
|
|
<DoubleAnimation
|
|
Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.BlurRadius)"
|
|
From="8" To="22" Duration="0:0:1.2"/>
|
|
<DoubleAnimation
|
|
Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.Opacity)"
|
|
From="0.4" To="0.9" Duration="0:0:1.2"/>
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</EventTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</mah:MetroWindow.Resources>
|
|
|
|
<mah:MetroWindow.RightWindowCommands>
|
|
<mah:WindowCommands>
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,8,0">
|
|
<Border CornerRadius="10" Padding="8,3" Margin="0,0,8,0"
|
|
Background="#22FFFFFF" VerticalAlignment="Center">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Ellipse x:Name="StatusDot" Style="{StaticResource ConnectedDotStyle}" Fill="#777"/>
|
|
<TextBlock x:Name="StatusLabel" Text="eBay: not connected"
|
|
Foreground="White" VerticalAlignment="Center"
|
|
FontSize="11" FontWeight="SemiBold"/>
|
|
</StackPanel>
|
|
</Border>
|
|
<Button x:Name="ConnectBtn" Click="ConnectBtn_Click"
|
|
Style="{DynamicResource MahApps.Styles.Button.Square.Accent}"
|
|
Height="28" Padding="10,0">
|
|
<StackPanel Orientation="Horizontal">
|
|
<iconPacks:PackIconMaterial Kind="Link" Width="12" Height="12"
|
|
Margin="0,0,4,0" VerticalAlignment="Center"/>
|
|
<TextBlock Text="Connect to eBay" VerticalAlignment="Center" FontSize="12"/>
|
|
</StackPanel>
|
|
</Button>
|
|
<Button x:Name="DisconnectBtn" Visibility="Collapsed"
|
|
Margin="6,0,0,0" Click="DisconnectBtn_Click"
|
|
Style="{DynamicResource MahApps.Styles.Button.Square}"
|
|
Height="28" Padding="8,0">
|
|
<StackPanel Orientation="Horizontal">
|
|
<iconPacks:PackIconMaterial Kind="LinkVariantOff" Width="12" Height="12"
|
|
Margin="0,0,4,0" VerticalAlignment="Center"/>
|
|
<TextBlock Text="Disconnect" VerticalAlignment="Center" FontSize="12"/>
|
|
</StackPanel>
|
|
</Button>
|
|
</StackPanel>
|
|
</mah:WindowCommands>
|
|
</mah:MetroWindow.RightWindowCommands>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TabControl x:Name="MainTabs" Grid.Row="0"
|
|
Style="{DynamicResource MahApps.Styles.TabControl.Animated}">
|
|
|
|
<!-- ① Photo Analysis — always available, no eBay login needed -->
|
|
<TabItem Style="{StaticResource AppTabItem}">
|
|
<TabItem.Header>
|
|
<StackPanel Orientation="Horizontal">
|
|
<iconPacks:PackIconMaterial Kind="Camera" Width="15" Height="15"
|
|
Margin="0,0,7,0" VerticalAlignment="Center"/>
|
|
<TextBlock Text="Photo Analyser" VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</TabItem.Header>
|
|
<!-- Tab content: welcome banner + actual view stacked -->
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Welcome banner — only shown when no photo loaded yet (PhotoView sets Visibility via x:Name) -->
|
|
<Border x:Name="WelcomeBanner" Grid.Row="0"
|
|
Background="{DynamicResource MahApps.Brushes.Accent}"
|
|
Padding="14,7" Visibility="Visible">
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
|
<iconPacks:PackIconMaterial Kind="Camera" Width="14" Height="14"
|
|
Margin="0,0,8,0" VerticalAlignment="Center"
|
|
Foreground="White"/>
|
|
<TextBlock Text="Drop a photo to identify any item and get an instant eBay price"
|
|
Foreground="White" FontSize="12" FontWeight="SemiBold"
|
|
VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<local:PhotoAnalysisView x:Name="PhotoView" Grid.Row="1"/>
|
|
</Grid>
|
|
</TabItem>
|
|
|
|
<!-- ② New Listing — requires eBay connection -->
|
|
<TabItem x:Name="NewListingTab" Style="{StaticResource AppTabItem}">
|
|
<TabItem.Header>
|
|
<StackPanel Orientation="Horizontal">
|
|
<iconPacks:PackIconMaterial Kind="TagPlusOutline" Width="15" Height="15"
|
|
Margin="0,0,7,0" VerticalAlignment="Center"/>
|
|
<TextBlock Text="New Listing" VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</TabItem.Header>
|
|
<Grid>
|
|
<local:SingleItemView x:Name="SingleView"/>
|
|
<!-- Overlay shown when not connected -->
|
|
<Border x:Name="NewListingOverlay" Visibility="Visible">
|
|
<Border.Background>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
|
<GradientStop Color="#F0F4FF" Offset="0"/>
|
|
<GradientStop Color="#EEF2FF" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Border.Background>
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
MaxWidth="340">
|
|
<!-- eBay logo circle -->
|
|
<Border Width="72" Height="72" CornerRadius="36"
|
|
HorizontalAlignment="Center" Margin="0,0,0,18">
|
|
<Border.Background>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
|
|
<GradientStop Color="#7C3AED" Offset="0"/>
|
|
<GradientStop Color="#4F46E5" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Border.Background>
|
|
<iconPacks:PackIconMaterial Kind="CartOutline" Width="32" Height="32"
|
|
Foreground="White"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"/>
|
|
</Border>
|
|
<TextBlock Text="Connect to eBay"
|
|
FontSize="20" FontWeight="Bold"
|
|
HorizontalAlignment="Center"
|
|
Foreground="{DynamicResource MahApps.Brushes.Gray1}"
|
|
Margin="0,0,0,8"/>
|
|
<TextBlock Text="Sign in with your eBay account to start posting listings and managing your inventory."
|
|
FontSize="13" TextWrapping="Wrap" TextAlignment="Center"
|
|
Foreground="{DynamicResource MahApps.Brushes.Gray4}"
|
|
Margin="0,0,0,24"/>
|
|
<Button Click="ConnectBtn_Click"
|
|
Style="{StaticResource LockConnectButton}"
|
|
HorizontalAlignment="Center">
|
|
<StackPanel Orientation="Horizontal">
|
|
<iconPacks:PackIconMaterial Kind="Link" Width="14" Height="14"
|
|
Margin="0,0,7,0" VerticalAlignment="Center"/>
|
|
<TextBlock Text="Connect to eBay" VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Button>
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
</TabItem>
|
|
|
|
<!-- ③ Saved Listings — always available -->
|
|
<TabItem x:Name="SavedTab" Style="{StaticResource AppTabItem}">
|
|
<TabItem.Header>
|
|
<StackPanel Orientation="Horizontal">
|
|
<iconPacks:PackIconMaterial Kind="BookmarkMultiple" Width="15" Height="15"
|
|
Margin="0,0,7,0" VerticalAlignment="Center"/>
|
|
<TextBlock Text="Saved Listings" VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</TabItem.Header>
|
|
<local:SavedListingsView x:Name="SavedView"/>
|
|
</TabItem>
|
|
|
|
<!-- ④ Bulk Import — requires eBay connection -->
|
|
<TabItem x:Name="BulkTab" Style="{StaticResource AppTabItem}">
|
|
<TabItem.Header>
|
|
<StackPanel Orientation="Horizontal">
|
|
<iconPacks:PackIconMaterial Kind="TableMultiple" Width="15" Height="15"
|
|
Margin="0,0,7,0" VerticalAlignment="Center"/>
|
|
<TextBlock Text="Bulk Import" VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</TabItem.Header>
|
|
<Grid>
|
|
<local:BulkImportView x:Name="BulkView"/>
|
|
<Border x:Name="BulkOverlay" Visibility="Visible">
|
|
<Border.Background>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
|
<GradientStop Color="#F0F4FF" Offset="0"/>
|
|
<GradientStop Color="#EEF2FF" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Border.Background>
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
MaxWidth="340">
|
|
<!-- eBay logo circle -->
|
|
<Border Width="72" Height="72" CornerRadius="36"
|
|
HorizontalAlignment="Center" Margin="0,0,0,18">
|
|
<Border.Background>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
|
|
<GradientStop Color="#7C3AED" Offset="0"/>
|
|
<GradientStop Color="#4F46E5" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Border.Background>
|
|
<iconPacks:PackIconMaterial Kind="TableArrowUp" Width="32" Height="32"
|
|
Foreground="White"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"/>
|
|
</Border>
|
|
<TextBlock Text="Connect to eBay"
|
|
FontSize="20" FontWeight="Bold"
|
|
HorizontalAlignment="Center"
|
|
Foreground="{DynamicResource MahApps.Brushes.Gray1}"
|
|
Margin="0,0,0,8"/>
|
|
<TextBlock Text="Sign in with your eBay account to bulk import and post multiple listings at once."
|
|
FontSize="13" TextWrapping="Wrap" TextAlignment="Center"
|
|
Foreground="{DynamicResource MahApps.Brushes.Gray4}"
|
|
Margin="0,0,0,24"/>
|
|
<Button Click="ConnectBtn_Click"
|
|
Style="{StaticResource LockConnectButton}"
|
|
HorizontalAlignment="Center">
|
|
<StackPanel Orientation="Horizontal">
|
|
<iconPacks:PackIconMaterial Kind="Link" Width="14" Height="14"
|
|
Margin="0,0,7,0" VerticalAlignment="Center"/>
|
|
<TextBlock Text="Connect to eBay" VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Button>
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
</TabItem>
|
|
</TabControl>
|
|
|
|
<!-- Status bar -->
|
|
<Border Grid.Row="1"
|
|
Background="{DynamicResource MahApps.Brushes.Gray9}"
|
|
BorderThickness="0,1,0,0"
|
|
BorderBrush="{DynamicResource MahApps.Brushes.Gray7}">
|
|
<Grid Margin="10,3">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
|
<iconPacks:PackIconMaterial Kind="AlertCircleOutline"
|
|
Width="12" Height="12" Margin="0,0,5,0"
|
|
VerticalAlignment="Center"
|
|
Foreground="{DynamicResource MahApps.Brushes.Gray5}"/>
|
|
<TextBlock x:Name="StatusBar" Text="Ready" FontSize="11"
|
|
Foreground="{DynamicResource MahApps.Brushes.Gray3}"
|
|
VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
|
<Ellipse x:Name="StatusBarDot" Width="8" Height="8"
|
|
Fill="#888" Margin="0,0,5,0" VerticalAlignment="Center"/>
|
|
<TextBlock x:Name="StatusBarEbay" Text="eBay: disconnected"
|
|
FontSize="11" VerticalAlignment="Center"
|
|
Foreground="{DynamicResource MahApps.Brushes.Gray5}"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</mah:MetroWindow>
|