/
RenameView.xaml
71 lines (71 loc) · 3.43 KB
/
RenameView.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<UserControl x:Class="Rubberduck.UI.Refactorings.Rename.RenameView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:converters="clr-namespace:Rubberduck.UI.Converters"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.Resources>
<converters:BoolToHiddenVisibilityConverter x:Key="BoolToHiddenVisibility" />
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="*" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<StackPanel Background="White">
<Label Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=RenameDialog_TitleText}" FontWeight="Bold" />
<TextBlock Text="{Binding Instructions}"
Margin="5,0" />
</StackPanel>
<Grid Grid.Row="1" Margin="5,10,10,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=NameLabelText}"
VerticalAlignment="Top"
Margin="0,0,5,0" />
<TextBox Grid.Column="1"
Text="{Binding NewName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Height="22"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
HorizontalAlignment="Stretch"/>
<Image Grid.Column="1"
Source="../../../Resources/cross-circle.png"
Height="16"
Margin="0,-8,-8,0"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Visibility="{Binding IsValidName, Converter={StaticResource BoolToHiddenVisibility}}"/>
</Grid>
<Grid Grid.Row="2" Background="{x:Static SystemColors.ControlDarkBrush}" Grid.IsSharedSizeScope="True">
<Grid HorizontalAlignment="Right"
Margin="5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="SettingsButtons" />
<ColumnDefinition SharedSizeGroup="SettingsButtons" />
</Grid.ColumnDefinitions>
<Button Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=OK}"
Grid.Column="0"
Height="20"
Margin="5,0"
Padding="10,0"
IsEnabled="{Binding IsValidName}"
IsDefault="True"
Command="{Binding OkButtonCommand}" />
<Button Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=CancelButtonText}"
Grid.Column="1"
Height="20"
Margin="5,0"
Padding="10,0"
IsCancel="True"
Command="{Binding CancelButtonCommand}">
</Button>
</Grid>
</Grid>
</Grid>
</UserControl>