SfTextInputLayout set Height

Hi Sir,

I am using SfTextInputLayout, how can I set height for  SfTextInputLayout.

<syncfusion:SfTextInputLayout
    Width="200"
    Height="25"
    Margin="10,0,0,0"
    Hint="Name">
    <TextBox />
</syncfusion:SfTextInputLayout>

This is the result when I set height to 25. It displays not well.



When I am not set height, it take a large area of UI.



How can I reduce height of SfTextInputLayout?

Thanks and Best Regards!


5 Replies

ET Eswaran Thirugnanasambandam Syncfusion Team April 5, 2022 05:26 PM UTC

The space appearing below the SfTextInputLayout control is used to show the error label and counter label. Your requirement can be achieved by setting the CharCountVisibility and HelperTextVisibility properties to false. We have prepared a sample for the same and please get it from the below attachment.


Attachment: TILWpfApp_efbdf07f.zip


NT NGUYEN THANH DAT replied to Eswaran Thirugnanasambandam April 6, 2022 05:25 AM UTC

Hi Eswaran,


Your solution is not really what I want...

I want to set the height for SfTextInputLayout. For example,I want to set SfTextInputLayout height to 25.

Width="200"
Height="25"
Margin="10,0,0,0"
CharCountVisibility="Collapsed"
HelperTextVisibility="Collapsed"
Hint="Name">


--> Result:

--> The rest of textbox is hidden under the next control.

How can I show full SfTextInputLayout with height = 25?

Thanks and Best Regards!



ET Eswaran Thirugnanasambandam Syncfusion Team April 7, 2022 03:22 PM UTC

The SfTextInputLayout is similar like layouts. So, the height of the layout is calculated based on the size of its input view and other assistive labels. So, when providing height to the SfTextInputLayout control less than its desired size, it gets cropped similarly to the other layouts, and this is the default behavior. If your requirement is to reduce the space between the container border and the input view, you can use InputViewPadding property to customize it. We have prepared a sample for it. Please get it from the below attachment.


Attachment: TILWpfApp_8e6d4aa9.zip


NT NGUYEN THANH DAT replied to Eswaran Thirugnanasambandam April 11, 2022 05:45 AM UTC

That's good.


Thank you so much!!

Have a nice day!!



VR Vignesh Ramesh Syncfusion Team April 13, 2022 04:59 PM UTC

Please get in touch with us if you require any further assistance.


Loader.
Up arrow icon