Utopia-Canteen-System/Views/ScannerDashboardView.xaml

539 lines
36 KiB
XML

<UserControl x:Class="UtopiaCanteenSystem.Views.ScannerDashboardView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:UtopiaCanteenSystem.Converters">
<UserControl.Resources>
<BooleanToVisibilityConverter x:Key="BoolToVisibility"/>
<local:StringToVisibilityConverter x:Key="StringToVisibility"/>
<local:StringToImageSourceConverter x:Key="StringToImageSource"/>
<SolidColorBrush x:Key="AccentBrush" Color="#5BA3A0"/>
<SolidColorBrush x:Key="AccentBorderBrush" Color="#995BA3A0"/>
<SolidColorBrush x:Key="MutedTextBrush" Color="#718096"/>
<SolidColorBrush x:Key="TitleTextBrush" Color="#2D3748"/>
<SolidColorBrush x:Key="ErrorTextBrush" Color="#E53E3E"/>
<SolidColorBrush x:Key="ConnectedBrush" Color="#38A169"/>
<SolidColorBrush x:Key="SuccessTextBrush" Color="#38A169"/>
<SolidColorBrush x:Key="SettingsIconBrush" Color="#5BA3A0"/>
<Style x:Key="RoundedButtonStyle" TargetType="Button">
<Setter Property="Foreground" Value="White"/>
<Setter Property="Background" Value="{StaticResource AccentBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Padding" Value="28,14"/>
<Setter Property="MinHeight" Value="56"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="8"
SnapsToDevicePixels="True">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SecondaryButtonStyle" TargetType="Button">
<Setter Property="Foreground" Value="{StaticResource TitleTextBrush}"/>
<Setter Property="Background" Value="#FFFFFF"/>
<Setter Property="BorderBrush" Value="#e2e8f0"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Padding" Value="20,12"/>
<Setter Property="MinHeight" Value="52"/>
<Setter Property="MinWidth" Value="120"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="ButtonBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="10">
<Grid>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="8,0">
<TextBlock Text="⚙"
FontSize="16"
Foreground="{StaticResource SettingsIconBrush}"
Margin="0,0,8,0"
VerticalAlignment="Center"/>
<TextBlock Text="{TemplateBinding Content}"
Foreground="{TemplateBinding Foreground}"
FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}"
VerticalAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ButtonBorder" Property="Background" Value="#f8fafc"/>
<Setter TargetName="ButtonBorder" Property="BorderBrush" Value="{StaticResource AccentBrush}"/>
<Setter Property="Foreground" Value="{StaticResource AccentBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="ButtonBorder" Property="Background" Value="#f1f5f9"/>
<Setter TargetName="ButtonBorder" Property="BorderBrush" Value="#4a918e"/>
<Setter Property="Foreground" Value="#4a918e"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="LogoutLinkButtonStyle" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Foreground" Value="{StaticResource MutedTextBrush}"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Padding" Value="16,12"/>
<Setter Property="MinHeight" Value="52"/>
<Setter Property="MinWidth" Value="120"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="ButtonBorder"
Background="{TemplateBinding Background}"
CornerRadius="10"
BorderBrush="#fee2e2"
BorderThickness="1">
<Grid>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<TextBlock Text="⎋"
FontSize="16"
Foreground="#e53e3e"
Margin="0,0,8,0"
VerticalAlignment="Center"/>
<TextBlock Text="Logout"
Foreground="#e53e3e"
FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}"
VerticalAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ButtonBorder" Property="Background" Value="#fef2f2"/>
<Setter TargetName="ButtonBorder" Property="BorderBrush" Value="#fca5a5"/>
<Setter Property="Foreground" Value="#dc2626"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="ButtonBorder" Property="Background" Value="#fee2e2"/>
<Setter TargetName="ButtonBorder" Property="BorderBrush" Value="#f87171"/>
<Setter Property="Foreground" Value="#b91c1c"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="StatusTextStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource MutedTextBrush}"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Style.Triggers>
<DataTrigger Binding="{Binding ScannerStatus}" Value="Connected">
<Setter Property="Foreground" Value="{StaticResource ConnectedBrush}"/>
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="StatusIconStyle" TargetType="TextBlock">
<Setter Property="FontFamily" Value="Segoe MDL2 Assets"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Text" Value=""/>
<Setter Property="Foreground" Value="{StaticResource ErrorTextBrush}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding ScannerStatus}" Value="Connected">
<Setter Property="Foreground" Value="{StaticResource ConnectedBrush}"/>
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="StatusBorderStyle" TargetType="Border">
<Setter Property="Background" Value="#dcfce7"/>
<Setter Property="BorderBrush" Value="#86efac"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="8"/>
<Setter Property="Padding" Value="18"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsSuccess}" Value="False">
<Setter Property="Background" Value="#fee2e2"/>
<Setter Property="BorderBrush" Value="#fca5a5"/>
</DataTrigger>
</Style.Triggers>
</Style>
</UserControl.Resources>
<Grid Background="#F0F2F5" MinHeight="0" MinWidth="0">
<ScrollViewer VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto"
Padding="16"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<Grid MinHeight="{Binding ViewportHeight, RelativeSource={RelativeSource AncestorType=ScrollViewer}}"
MinWidth="0"
HorizontalAlignment="Stretch">
<Border HorizontalAlignment="Center"
VerticalAlignment="Center"
MinWidth="360"
Width="{Binding ViewportWidth, RelativeSource={RelativeSource AncestorType=ScrollViewer}}"
MaxWidth="1150"
Padding="20"
Background="White"
CornerRadius="12">
<Border.Effect>
<DropShadowEffect BlurRadius="24"
ShadowDepth="0"
Opacity="0.08"
Color="#000000"/>
</Border.Effect>
<Grid MinWidth="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MinWidth="0" MaxWidth="480"/>
<ColumnDefinition Width="16"/>
<ColumnDefinition Width="*" MinWidth="0"/>
</Grid.ColumnDefinitions>
<!-- Left Panel: Employee Information (larger text and profile to use space) -->
<Border Grid.Column="0"
MinWidth="0"
Background="#f4f4f4"
BorderBrush="#e2e8f0"
BorderThickness="1"
CornerRadius="10"
Padding="24">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
<StackPanel>
<!-- Top row: circular profile image (left) + name (right) -->
<Grid Margin="0,0,0,24">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*" MinWidth="0"/>
</Grid.ColumnDefinitions>
<!-- Profile image (circular); set EmployeeProfileImagePath to show photo -->
<Grid Grid.Column="0" Width="110" Height="110" Margin="0,0,18,0">
<Ellipse Fill="#e2e8f0"/>
<Image Source="{Binding EmployeeProfileImagePath, Converter={StaticResource StringToImageSource}}"
Stretch="UniformToFill"
Visibility="{Binding EmployeeProfileImagePath, Converter={StaticResource StringToVisibility}}">
<Image.Clip>
<EllipseGeometry Center="55,55" RadiusX="55" RadiusY="55"/>
</Image.Clip>
</Image>
<TextBlock Text="—"
FontSize="32"
Foreground="{StaticResource MutedTextBrush}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="{Binding EmployeeProfileImagePath, Converter={StaticResource StringToVisibility}, ConverterParameter=Invert}"/>
</Grid>
<StackPanel Grid.Column="1" VerticalAlignment="Center" MinWidth="0">
<TextBlock Text="Name" FontSize="15" Foreground="{StaticResource MutedTextBrush}" Margin="0,0,0,4"/>
<TextBlock Text="{Binding EmployeeName}" FontSize="22" FontWeight="Bold" Foreground="{StaticResource TitleTextBrush}" TextTrimming="CharacterEllipsis" TextWrapping="Wrap"/>
<TextBlock Text="{Binding EmployeeDepartment}" FontSize="16" Foreground="{StaticResource MutedTextBrush}" Margin="0,6,0,0" TextTrimming="CharacterEllipsis"/>
</StackPanel>
</Grid>
<TextBlock Text="Department:" FontSize="15" Foreground="{StaticResource MutedTextBrush}" Margin="0,0,0,4"/>
<TextBlock Text="{Binding EmployeeDepartment}" FontSize="19" FontWeight="SemiBold" Foreground="{StaticResource TitleTextBrush}" Margin="0,0,0,18" TextTrimming="CharacterEllipsis"/>
<TextBlock Text="Employee ID:" FontSize="15" Foreground="{StaticResource MutedTextBrush}" Margin="0,0,0,4"/>
<TextBlock Text="{Binding EmployeeId}" FontSize="19" FontWeight="SemiBold" Foreground="{StaticResource TitleTextBrush}" Margin="0,0,0,18" TextTrimming="CharacterEllipsis"/>
<TextBlock Text="Order" FontSize="15" Foreground="{StaticResource MutedTextBrush}" Margin="0,0,0,4"/>
<TextBlock Text="{Binding EmployeeOrderItem}" FontSize="19" FontWeight="SemiBold" Foreground="{StaticResource TitleTextBrush}" TextTrimming="CharacterEllipsis" TextWrapping="Wrap"/>
</StackPanel>
</ScrollViewer>
</Border>
<!-- Divider between panels -->
<Border Grid.Column="1" Width="1" Background="#e2e8f0" HorizontalAlignment="Center" MinWidth="0"/>
<!-- Right Panel: Order placement + statistics -->
<Border Grid.Column="2"
MinWidth="0"
Background="White"
CornerRadius="10"
Padding="16">
<Grid MinWidth="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Menu button (top-right) -->
<ToggleButton x:Name="MenuToggleButton"
Grid.Row="0"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Margin="0,0,0,12"
IsChecked="{Binding IsMenuOpen, Mode=TwoWay}"
Unchecked="MenuToggleButton_Unchecked"
Background="#f4f7f7"
BorderBrush="#e2e8f0"
BorderThickness="1"
Padding="14,10"
MinWidth="48"
MinHeight="44"
FontSize="22"
FontWeight="SemiBold"
Foreground="{StaticResource TitleTextBrush}"
Focusable="False"
IsTabStop="False"
ToolTip="Menu"
Cursor="Hand">
<ToggleButton.Content></ToggleButton.Content>
<ToggleButton.Style>
<Style TargetType="ToggleButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border x:Name="MenuBtnBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="8" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="MenuBtnBorder" Property="Background" Value="#e8eeed"/>
<Setter TargetName="MenuBtnBorder" Property="BorderBrush" Value="{StaticResource AccentBrush}"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="MenuBtnBorder" Property="Background" Value="#e0e7e6"/>
<Setter TargetName="MenuBtnBorder" Property="BorderBrush" Value="{StaticResource AccentBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ToggleButton.Style>
</ToggleButton>
<!-- Inline menu panel (responsive: wraps; Settings/Logout with consistent sizing) -->
<Border x:Name="MenuPanel"
Grid.Row="1"
MinWidth="0"
Background="#f8fafc"
BorderBrush="#e2e8f0"
BorderThickness="1"
CornerRadius="8"
Padding="14"
Margin="0,0,0,12"
Visibility="{Binding IsMenuOpen, Converter={StaticResource BoolToVisibility}}">
<WrapPanel Orientation="Horizontal"
VerticalAlignment="Center"
Margin="0,2,0,2">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,20,0">
<TextBlock Text="SITE :" VerticalAlignment="Center" FontSize="14" FontWeight="SemiBold" Foreground="{StaticResource TitleTextBrush}" Margin="0,0,8,0"/>
<TextBox x:Name="SiteNumberTextBox"
Text="{Binding SiteNumber, UpdateSourceTrigger=PropertyChanged}"
Width="72"
MinWidth="56"
FontSize="14"
Padding="8,8"
MinHeight="40"
VerticalContentAlignment="Center"
PreviewTextInput="SiteNumberTextBox_PreviewTextInput"/>
</StackPanel>
<Button Content="Settings"
Command="{Binding OpenSettingsCommand}"
Style="{StaticResource SecondaryButtonStyle}"
Margin="0,0,10,0"
MinWidth="100"
MinHeight="44"
Padding="16,10"
FontSize="14"
Focusable="False"
IsTabStop="False"/>
<Button Command="{Binding LogoutCommand}"
Style="{StaticResource LogoutLinkButtonStyle}"
MinWidth="100"
MinHeight="44"
Padding="16,10"
Focusable="False"
IsTabStop="False">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock Text="⎋" FontSize="14" Margin="0,0,8,0" VerticalAlignment="Center"/>
<TextBlock Text="Logout" FontSize="14" FontWeight="SemiBold" VerticalAlignment="Center"/>
</StackPanel>
</Button>
</WrapPanel>
</Border>
<!-- Logo + instruction -->
<StackPanel Grid.Row="2" HorizontalAlignment="Center" MinWidth="0">
<Image Source="pack://siteoforigin:,,,/assets/logo4.png"
Height="100"
MaxWidth="320"
Stretch="Uniform"
Margin="0,0,0,8"/>
<TextBlock Text="Tap card to place order"
FontSize="16"
Foreground="{StaticResource MutedTextBrush}"
HorizontalAlignment="Center"
TextAlignment="Center"/>
</StackPanel>
<!-- Scan box + Place Order button -->
<StackPanel Grid.Row="3" Margin="0,16,0,0" MinWidth="0">
<Border MinHeight="50"
CornerRadius="8"
BorderBrush="{StaticResource AccentBorderBrush}"
BorderThickness="2">
<Grid>
<TextBox x:Name="RfidInputTextBox"
Text="{Binding CardIdInput, UpdateSourceTrigger=PropertyChanged}"
Background="Transparent"
BorderThickness="0"
FontSize="18"
MinHeight="50"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Center"
Focusable="True"
KeyDown="RfidInputTextBox_OnKeyDown"
LostKeyboardFocus="RfidInputTextBox_OnLostKeyboardFocus"/>
<TextBlock Text="Scan..."
Foreground="Gray"
FontSize="18"
VerticalAlignment="Center"
HorizontalAlignment="Center"
TextAlignment="Center"
IsHitTestVisible="False"
Visibility="{Binding IsWatermarkVisible, Converter={StaticResource BoolToVisibility}}"/>
</Grid>
</Border>
<Button Content="PLACE ORDER"
Command="{Binding ScanCommand}"
Margin="0,12,0,0"
HorizontalAlignment="Stretch"
Style="{StaticResource RoundedButtonStyle}"/>
</StackPanel>
<!-- Scanner status + timestamp -->
<StackPanel Grid.Row="4" Margin="0,14,0,0" HorizontalAlignment="Center">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock Style="{StaticResource StatusIconStyle}" Margin="0,0,8,0"/>
<TextBlock Text="{Binding ScannerStatusDisplay}" Style="{StaticResource StatusTextStyle}"/>
</StackPanel>
<TextBlock Text="{Binding CurrentTime}"
FontSize="14"
Foreground="{StaticResource MutedTextBrush}"
Margin="0,6,0,0"
HorizontalAlignment="Center"/>
</StackPanel>
<!-- Divider -->
<Border Grid.Row="5" Height="1" Background="#e2e8f0" Margin="0,14,0,14"/>
<!-- Cooldown alert -->
<Border Grid.Row="6"
Background="#fef2f2"
BorderBrush="#fca5a5"
BorderThickness="2"
CornerRadius="8"
Padding="14"
Margin="0,0,0,12"
Visibility="{Binding ShowCooldownAlert, Converter={StaticResource BoolToVisibility}}">
<TextBlock Text="{Binding CooldownAlertMessage}"
FontSize="18"
FontWeight="Bold"
Foreground="{StaticResource ErrorTextBrush}"
TextWrapping="Wrap"
TextAlignment="Center"
HorizontalAlignment="Center"/>
</Border>
<!-- Statistics -->
<Grid Grid.Row="7" MinWidth="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" Margin="0,0,0,12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MinWidth="0"/>
<ColumnDefinition Width="*" MinWidth="0"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Background="#f4f7f7" CornerRadius="8" Padding="16" Margin="0,0,6,0">
<StackPanel HorizontalAlignment="Center" MinWidth="0">
<TextBlock Text="{Binding TodaysScans}" FontSize="40" FontWeight="Bold" Foreground="{StaticResource TitleTextBrush}" HorizontalAlignment="Center"/>
<TextBlock Text="Today's Customer" FontSize="14" Foreground="{StaticResource MutedTextBrush}" HorizontalAlignment="Center" Margin="0,4,0,0" TextWrapping="Wrap" TextAlignment="Center"/>
</StackPanel>
</Border>
<Border Grid.Column="1" Background="#f4f7f7" CornerRadius="8" Padding="16" Margin="6,0,0,0">
<StackPanel HorizontalAlignment="Center" MinWidth="0">
<TextBlock Text="{Binding TotalOrders}" FontSize="40" FontWeight="Bold" Foreground="{StaticResource TitleTextBrush}" HorizontalAlignment="Center"/>
<TextBlock Text="Total Orders" FontSize="14" Foreground="{StaticResource MutedTextBrush}" HorizontalAlignment="Center" Margin="0,4,0,0" TextWrapping="Wrap" TextAlignment="Center"/>
</StackPanel>
</Border>
</Grid>
<Border Grid.Row="1" BorderBrush="#e2e8f0" BorderThickness="1" CornerRadius="8" Padding="12" Margin="0,0,0,12">
<Grid MinWidth="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MinWidth="0"/>
<ColumnDefinition Width="*" MinWidth="0"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Margin="0,0,8,0">
<TextBlock Text="LAST CARD" FontSize="12" Foreground="{StaticResource MutedTextBrush}" FontWeight="SemiBold"/>
<TextBlock Text="{Binding LastCardId}" FontSize="16" FontWeight="SemiBold" Foreground="{StaticResource TitleTextBrush}" TextTrimming="CharacterEllipsis" Margin="0,2,0,0"/>
</StackPanel>
<StackPanel Grid.Column="1" Margin="8,0,0,0">
<TextBlock Text="LAST ORDER TIME" FontSize="12" Foreground="{StaticResource MutedTextBrush}" FontWeight="SemiBold"/>
<TextBlock Text="{Binding LastScanTimeDisplay}" FontSize="16" FontWeight="SemiBold" Foreground="{StaticResource TitleTextBrush}" TextTrimming="CharacterEllipsis" Margin="0,2,0,0"/>
</StackPanel>
</Grid>
</Border>
<Border Grid.Row="2"
Style="{StaticResource StatusBorderStyle}"
Visibility="{Binding Message, Converter={StaticResource StringToVisibility}}">
<TextBlock Text="{Binding Message}" FontSize="16" FontWeight="SemiBold" TextWrapping="Wrap">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource SuccessTextBrush}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsSuccess}" Value="False">
<Setter Property="Foreground" Value="{StaticResource ErrorTextBrush}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</Border>
</Grid>
</Grid>
</Border>
</Grid>
</Border>
</Grid>
</ScrollViewer>
</Grid>
</UserControl>