Skip to content
This repository has been archived by the owner on Jun 4, 2018. It is now read-only.

Commit

Permalink
Disable rename account dialog if name is empty.
Browse files Browse the repository at this point in the history
Fixes #31.
  • Loading branch information
jrick committed Feb 19, 2016
1 parent df30b91 commit 677c69f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Paymetheus/RenameAccountDialogView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@
d:DesignHeight="200" d:DesignWidth="500">
<DockPanel FocusManager.FocusedElement="{Binding ElementName=textBox}">
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Content="Rename" IsDefault="True" Command="{Binding Rename}" Width="100" Margin="6 12 3 6" Padding="10 2"/>
<Button Content="Rename" IsDefault="True" Command="{Binding Rename}" Width="100" Margin="6 12 3 6" Padding="10 2">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Style.Triggers>
<DataTrigger Binding="{Binding Text, ElementName=textBox}" Value="">
<Setter Property="IsEnabled" Value="False"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<Button Content="Cancel" IsCancel="True" Command="{Binding HideDialogCommand}" Width="100" Margin="3 12 6 6" Padding="10 2"/>
</StackPanel>
<StackPanel>
Expand Down

0 comments on commit 677c69f

Please sign in to comment.