FloatLabelType

Is there a way to set FloatLabelType to Always for all the texts in the application as opposed to having to specify it with each one? (some css maybe)?



1 Reply

UD UdhayaKumar Duraisamy Syncfusion Team March 29, 2022 03:55 AM UTC

Hi Spyros,


By default, we don’t have support to set FloatLableType to Always for all the texts in the application. So, we suggest you to binding a common variable with FloatLableType as “Always” and bind it to every control.


<div>

    <h3>TextBox - 1</h3>

    <SfTextBox Placeholder='First Name' FloatLabelType='@Float' Width="250px"></SfTextBox>

</div><br />

 

<div>

    <h3>TextBox - 2</h3>

    <SfTextBox Placeholder='First Name' FloatLabelType='@Float' Width="250px"></SfTextBox>

</div><br />

 

<div>

    <h3>TextBox - 3</h3>

    <SfTextBox Placeholder='First Name' FloatLabelType='@Float' Width="250px"></SfTextBox>

</div>

 

@code

{

    FloatLabelType Float = FloatLabelType.Always;

}



Regards,

Udhaya Kumar D


Attachment: FloatLableType_3b415d4f.zip

Loader.
Up arrow icon