RadMaskTextInput stretch

1 Answer 123 Views
MaskedInput (Numeric, DateTime, Text, Currency)
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Deltaohm asked on 20 Sep 2021, 02:28 PM

Hi,

I tried to use a RadMasketTextInput instead of a standard TextBox, mainly because of the SelectionOnFocus/Selectall property.
Always wotks well, but the width of control doesn't use all the space left in the parent as a TextBox, in the same position, does.
I tried with stackpanel, dockpanel and Grid, this is the attempt with dockpanel:


<DockPanel Grid.Row="0" Grid.Column="0" Margin="12,0,0,0" HorizontalAlignment="Stretch">
				<Label VerticalAlignment="Center" 
Content="{DynamicResource  ResourceKey={x:Static r:ResourcesKeys.NameLabel}}" />
	<t:RadMaskedTextInput 
	  HorizontalAlignment="Stretch"
	 SelectionOnFocus="SelectAll"
         Value="{Binding SorgenteName}"/>			
</DockPanel>

And with textbox:

<DockPanel Grid.Row="0" Grid.Column="0" Margin="12,0,0,0" HorizontalAlignment="Stretch">
				<Label VerticalAlignment="Center" 
				    Content="{DynamicResource  ResourceKey={x:Static r:ResourcesKeys.NameLabel}}" />
				<TextBox 
									  HorizontalAlignment="Stretch"
							Text="{Binding SorgenteName}"/>
			</DockPanel>

With textbox I have the desired layout.

Thank you in advance

1 Answer, 1 is accepted

Sort by
0
Accepted
Stenly
Telerik team
answered on 23 Sep 2021, 10:57 AM

Hello Gianluca Zanellato,

I have tried to reproduce the mentioned behavior on my side but to no success. Both controls, from the provided code snippets, visualize correctly on my end. That said, I have attached a sample project, so could you edit it to match the observed behavior on your side?

Regards,
Stenly
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
commented on 01 Oct 2021, 02:43 PM | edited

The difference is the use of dockpanel. 
Now it is correct.
Thank you

Luigi

Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Answers by
Stenly
Telerik team
Share this question
or