nikobarli
Topic Author
Posts: 178
Joined: 26 Apr 2017, 06:23

TextBox inside a ListBox item is snapped to wrong position when being edited (C++ SDK 2.0.2f2)

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).
<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>
 
User avatar
sfernandez
Site Admin
Posts: 1912
Joined: 22 Dec 2011, 19:20

Re: TextBox inside a ListBox item is snapped to wrong position when being edited (C++ SDK 2.0.2f2)

20 Jun 2017, 11:10

Yes, it is a known bug we just fixed for the next release. You will find it solved in the following version 2.0.3.
Sorry for the inconveniences.

Who is online

Users browsing this forum: Google [Bot] and 1 guest