Fix ItemCommentView so that all text is initially selected.

- VERBESSERT: Evtl. vorgegebener Kommentartext wird jetzt automatisch markiert, damit er b.B. einfach durch Lostippen überschrieben werden kann.
This commit is contained in:
Daniel Kraus 2015-09-08 06:05:27 +02:00
parent a974a6cd18
commit 3f71c7a779

View File

@ -23,7 +23,7 @@
xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender"
ResizeMode="CanResizeWithGrip" ShowInTaskbar="False"
WindowStyle="ToolWindow" Topmost="True"
SizeToContent="WidthAndHeight"
SizeToContent="WidthAndHeight" MaxWidth="500"
b:WindowState.CenterScreen="True" b:WindowState.Save="True"
Title="Kommentar angeben"
FocusManager.FocusedElement="{Binding ElementName=ValueTextBox}"
@ -33,18 +33,16 @@
</Window.Resources>
<DockPanel Margin="10">
<Label DockPanel.Dock="Top" Content="{Binding Item}"
FontSize="16" FontWeight="Bold"
FontSize="16" FontWeight="Bold" Margin="0 0 0 10"
Target="{Binding ElementName=ValueTextBox}" Padding="0" />
<UniformGrid DockPanel.Dock="Bottom" HorizontalAlignment="Right" Columns="2" Rows="1" Margin="0 10 0 0">
<UniformGrid DockPanel.Dock="Bottom" HorizontalAlignment="Right" Columns="2" Rows="1" Margin="0 15 0 0">
<Button Content="OK" Command="{Binding SaveCommand}" IsDefault="True" Margin="0 0 5 0" />
<Button Content="Abbrechen" Command="{Binding CloseViewCommand}" IsCancel="True" Margin="5 0 0 0" />
</UniformGrid>
<DockPanel Margin="0 10 0 10">
<TextBlock DockPanel.Dock="Left" Text="{Binding Prefix}" VerticalAlignment="Center" />
<TextBlock DockPanel.Dock="Right" Text="{Binding Suffix}" VerticalAlignment="Center" />
<TextBox Text="{Binding Value,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
MinWidth="120" MaxWidth="240" VerticalAlignment="Center"
x:Name="ValueTextBox" Margin="5 0 5 0" />
</DockPanel>
<TextBlock DockPanel.Dock="Left" Text="{Binding Prefix}" VerticalAlignment="Center" />
<TextBlock DockPanel.Dock="Right" Text="{Binding Suffix}" VerticalAlignment="Center" />
<TextBox Text="{Binding Value,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
MinWidth="120" MaxWidth="240" VerticalAlignment="Center"
x:Name="ValueTextBox" Margin="5 0 5 0" />
</DockPanel>
</Window>