TextBox inside a ListBox item is snapped to wrong position when being edited (C++ SDK 2.0.2f2)
Posted: 20 Jun 2017, 05:26
Step to reproduce:
1. Run the following XAML. Inside the ListBox item, I use a Grid as the panel and put a TextBox inside a second column.
2. Then click on the TextBox to edit it -> The text box is snapped to the left (collapsing the first column of the grid).
1. Run the following XAML. Inside the ListBox item, I use a Grid as the panel and put a TextBox inside a second column.
2. Then click on the TextBox to edit it -> The text box is snapped to the left (collapsing the first column of the grid).
Code: Select all
<UserControl
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:local="clr-namespace:WpfApp"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid Background="White">
<ListBox>
<ListBoxItem>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="64"></ColumnDefinition>
<ColumnDefinition Width="1*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="64"></RowDefinition>
<RowDefinition Height="1*"></RowDefinition>
</Grid.RowDefinitions>
<TextBox Grid.Column="1" Grid.Row="1">Test</TextBox>
</Grid>
</ListBoxItem>
</ListBox>
</Grid>
</UserControl>