TextBox style Override

Hello,

I am facing something and i would like your help.
I am setting the FontSize of the Combobox, which shows correctly the list's elements in a bigger/smaller FontSize

The token though, is not changing its size, because i have a generic Style targeting TextBoxes.

<Style TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}">
.....

I would like to know how i can override the Comboboxe's TextBox style.
Setting this in xaml doesnt work, there is no direct TextBox there

<syncfusion:ComboBoxAdv.Style>'
     <Style TargetType="{x:Type TextBox}">
             <Setter Property="FontSize" Value="20"/>
     </Style>
</syncfusion:ComboBoxAdv.Style>


Is there a way to accomplish that?

Thanks a lot for your time
Fanourios Siskakis


1 Reply

MS Mahalakshmi Sugumar Syncfusion Team May 19, 2022 01:32 PM UTC

Hi Fanourios siskakis,

Query : how i can override the Comboboxe's TextBox style.


You can achieve your requirement using below code.

code:      
       
<syncfusion:ComboBoxAdv>


            <syncfusion:ComboBoxAdv.Resources>

                <Style TargetType="{x:Type TextBox}">

                    <Setter Property="FontSize" Value="20"/>

                </Style>

            </syncfusion:ComboBoxAdv.Resources>


        </syncfusion:ComboBoxAdv>


output:      


If we misunderstood the query, please provide more details about the requirement, or modify our sample and revert to us with a reproducible issue or video. So, it will be helpful to prompt the solution on further.


Regards,
Mahalakshmi sugumar


Loader.
Up arrow icon