summaryrefslogtreecommitdiff
path: root/product/desktop.ui/views/dialogs/AddNewStockSymbolDialog.xaml
diff options
context:
space:
mode:
Diffstat (limited to 'product/desktop.ui/views/dialogs/AddNewStockSymbolDialog.xaml')
-rw-r--r--product/desktop.ui/views/dialogs/AddNewStockSymbolDialog.xaml31
1 files changed, 21 insertions, 10 deletions
diff --git a/product/desktop.ui/views/dialogs/AddNewStockSymbolDialog.xaml b/product/desktop.ui/views/dialogs/AddNewStockSymbolDialog.xaml
index 400674a..e92662e 100644
--- a/product/desktop.ui/views/dialogs/AddNewStockSymbolDialog.xaml
+++ b/product/desktop.ui/views/dialogs/AddNewStockSymbolDialog.xaml
@@ -1,12 +1,23 @@
<ui:WPFDialog x:Class="solidware.financials.windows.ui.views.dialogs.AddNewStockSymbolDialog" xmlns:ui="clr-namespace:solidware.financials.windows.ui" x:TypeArguments="presenters:AddNewStockSymbolPresenter" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:presenters="clr-namespace:solidware.financials.windows.ui.presenters" Title="Watch New Stock" Width="400" Height="90" WindowStartupLocation="CenterOwner">
- <StackPanel>
- <DockPanel>
- <Label Width="120px">Symbol:</Label>
- <TextBox Text="{Binding Path=Symbol, UpdateSourceTrigger=PropertyChanged}"></TextBox>
- </DockPanel>
- <DockPanel LastChildFill="False" HorizontalAlignment="Right">
- <Button IsDefault="True" Command="{Binding Path=Add}">_Add</Button>
- <Button IsCancel="True" Command="{Binding Path=Cancel}">_Cancel</Button>
- </DockPanel>
- </StackPanel>
+ <StackPanel>
+ <StackPanel.Resources>
+ <Style x:Key="Error">
+ <Style.Triggers>
+ <Trigger Property="Validation.HasError" Value="true">
+ <Setter Property="Control.ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=(Validation.Errors)[0].ErrorContent}" />
+ <Setter Property="Control.BorderBrush" Value="Red" />
+ <Setter Property="Control.BorderThickness" Value="2" />
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </StackPanel.Resources>
+ <DockPanel>
+ <Label Width="120px">Symbol:</Label>
+ <TextBox Text="{Binding Path=Symbol, UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True}" Style="{StaticResource Error}"></TextBox>
+ </DockPanel>
+ <DockPanel LastChildFill="False" HorizontalAlignment="Right">
+ <Button IsDefault="True" Command="{Binding Path=Add}">_Add</Button>
+ <Button IsCancel="True" Command="{Binding Path=Cancel}">_Cancel</Button>
+ </DockPanel>
+ </StackPanel>
</ui:WPFDialog> \ No newline at end of file