Auto Select Textbox
This commit is contained in:
@@ -36,7 +36,8 @@
|
|||||||
<Label Content="{Binding Displayname}" />
|
<Label Content="{Binding Displayname}" />
|
||||||
<Button VerticalAlignment="Center" Height="20"
|
<Button VerticalAlignment="Center" Height="20"
|
||||||
ToolTip="Kategorie umbenennen"
|
ToolTip="Kategorie umbenennen"
|
||||||
Margin="3" Content="!" FontFamily="Wingdings">
|
Margin="3" Content="!" FontFamily="Wingdings"
|
||||||
|
Click="Wohnhilfe_Display_Edit_Button_Click">
|
||||||
<Button.Visibility>
|
<Button.Visibility>
|
||||||
<MultiBinding Converter="{StaticResource BoolVisibilityMultiConverter }">
|
<MultiBinding Converter="{StaticResource BoolVisibilityMultiConverter }">
|
||||||
<Binding Path="IsSelected" RelativeSource="{RelativeSource AncestorType={x:Type TabItem}}" />
|
<Binding Path="IsSelected" RelativeSource="{RelativeSource AncestorType={x:Type TabItem}}" />
|
||||||
@@ -81,6 +82,19 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</TabControl.ContentTemplate>
|
</TabControl.ContentTemplate>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
<Popup x:Name="popup_Wohnhilfe_Displayname_Edit"
|
||||||
|
Placement="Mouse"
|
||||||
|
StaysOpen="False"
|
||||||
|
Focusable="False"
|
||||||
|
Opened="popup_Wohnhilfe_Displayname_Edit_Opened">
|
||||||
|
<Border Background="White"
|
||||||
|
Padding="3"
|
||||||
|
BorderThickness="1"
|
||||||
|
BorderBrush="Gray"
|
||||||
|
Focusable="False">
|
||||||
|
<TextBox x:Name="txt_Wohnhilfe_Displayname_Edit" Width="200" Grid.Row="0" Grid.Column="0" Height="23" Margin="3" Text="{Binding Path=SelectedVM.Displayname, UpdateSourceTrigger=PropertyChanged}" />
|
||||||
|
</Border>
|
||||||
|
</Popup>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -27,5 +27,21 @@ namespace BeWo.View.Detail
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Wohnhilfe_Display_Edit_Button_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
popup_Wohnhilfe_Displayname_Edit.IsOpen = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void popup_Wohnhilfe_Displayname_Edit_Opened(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Input, new Action(Textbox_SelectAll));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Textbox_SelectAll()
|
||||||
|
{
|
||||||
|
txt_Wohnhilfe_Displayname_Edit.Focus();
|
||||||
|
txt_Wohnhilfe_Displayname_Edit.SelectAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user