[SOLVED] textbox with fixed size and with BorderThickness is not true position?

Please report bugs here. If you are unsure whether something is a bug or an expected behavior, please post it on the "Technical Support" forum instead, and wait for a moderator to handle/move the post.
hamishebahar
Posts: 8
Joined: Sun May 22, 2016 2:58 am

[SOLVED] textbox with fixed size and with BorderThickness is not true position?

Postby hamishebahar » Sun Feb 18, 2018 12:34 am

Hi,
I'm testing to create a text box and textblock fixed size in my view page,but there is problem for rendering TextBoxes.I set fixed size for my textboxes and texblocks but texboxes are bigger than textbocks and I found that problem is for BorderThickness property of textbox,when i set BorderThickness="0" this will fixed problem.

here is my xaml example:

Code: Select all

 <Grid Grid.Row="1" x:Name="gridAddEmployee" Visibility="Collapsed" Margin="0,10,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="auto"/>
                </Grid.RowDefinitions>
                <StackPanel >
                    <TextBlock Height="25" Background="red" Margin="0,0,0,0" Text="نام و نام خانوادگی:" HorizontalAlignment="Right" VerticalContentAlignment="Center"/>
                    <TextBlock Height="25" Background="red" Margin="0,10,0,0" Text="شماره تلفن:" HorizontalAlignment="Right" VerticalContentAlignment="Center"/>
                    <TextBlock Height="25" Background="red" Margin="0,10,0,0" Text="نام کاربری:" HorizontalAlignment="Right" VerticalContentAlignment="Center"/>
                    <TextBlock Height="25" Background="red" Margin="0,10,0,0" Text="کلمه ی عبور:" HorizontalAlignment="Right" VerticalContentAlignment="Center"/>
                    <TextBlock Height="25" Background="red" Margin="0,10,0,0" Text="نام و نام خانوادگی:" HorizontalAlignment="Right" VerticalContentAlignment="Center"/>
                    <TextBlock Height="25" Background="red" Margin="0,10,0,0" Text="شماره تلفن:" HorizontalAlignment="Right" VerticalContentAlignment="Center"/>
                    <TextBlock Height="25" Background="red" Margin="0,10,0,0" Text="نام کاربری:" HorizontalAlignment="Right" VerticalContentAlignment="Center"/>
                    <TextBlock Height="25" Background="red" Margin="0,10,0,0" Text="کلمه ی عبور:" HorizontalAlignment="Right" VerticalContentAlignment="Center"/>
                </StackPanel>

                <StackPanel  Grid.Column="1" Margin="0,0,10,0" Width="200">
                    <TextBox Height="25" Background="red" />
                    <TextBox Height="25" Background="red" Margin="0,10,0,0" />
                    <TextBox Height="25" Background="red" Margin="0,10,0,0" />
                    <TextBox Height="25" Background="red" Margin="0,10,0,0" />
                    <TextBox Height="25" Background="red" Margin="0,10,0,0" />
                    <TextBox Height="25" Background="red" Margin="0,10,0,0" />
                    <TextBox Height="25" Background="red" Margin="0,10,0,0" />
                    <TextBox Height="25" Background="red" Margin="0,10,0,0" />
                </StackPanel>
                <StackPanel Grid.Column="2">
                    <CheckBox  Height="25" VerticalContentAlignment="Center" Content="فعال/غیر فعال"/>
                    <TextBlock Height="25" Margin="0,10,0,0" VerticalContentAlignment="Center" Text="جنسیت"/>
                    <TextBlock Height="25" Margin="0,10,0,0" Text="توضیحات:" VerticalContentAlignment="Center"/>
                </StackPanel>
                <StackPanel  Grid.Column="3" Width="200">
                    <Grid Height="25"/>
                    <TextBox VerticalAlignment="Center" Margin="0,10,0,0" Text="" Height="50"/>
                    <ComboBox Margin="0,10,0,0" Height="25" VerticalAlignment="Center"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="1">
                    <Button x:Name="btnAddEmployeeSave" Click="btnAddEmployeeSave_Click" Content="ذخیره"/>
                    <Button x:Name="btnCancelAddEmployee" Click="btnCancelAddEmployee_Click" Content="انصراف"/>
                </StackPanel>
            </Grid>

Untitled.png
Untitled.png (18 KiB) Viewed 679 times

JS-Support @Userware
Site Admin
Posts: 938
Joined: Tue Apr 08, 2014 3:42 pm

Re: textbox with fixed size and with BorderThickness is not true position?

Postby JS-Support @Userware » Mon Feb 19, 2018 1:09 am

Hi,

Thanks for reporting this issue. We are going to look into it and keep you updated.

Regards,
JS-Support

JS-Support @Userware
Site Admin
Posts: 938
Joined: Tue Apr 08, 2014 3:42 pm

Re: textbox with fixed size and with BorderThickness is not true position?

Postby JS-Support @Userware » Fri Mar 09, 2018 5:20 am

Hi,

We have fixed this issue. The fix is available in v1.1 Beta1 and newer, which you can download from:
http://forums.cshtml5.com/viewforum.php?f=6

Thanks.
Regards,
JS-Support


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest

 

 

cron