Click here to Skip to main content
16,017,881 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
How increase font size of text "8 Hours" in below WPF code?

C#
<TextBox x:Name="txt8HoursArm1"
                                         Margin="5"
                                         Grid.Column="1"
                                         IsTabStop="False"
                                         Style="{StaticResource PrimaryInputTextBoxStyle}"
                                         Controls:TextBoxHelper.UseFloatingWatermark="True"
                                         Controls:TextBoxHelper.Watermark="8 Hours"
                                         IsEnabled="False"
                                         Text="1"
                                         GotFocus="txt_GotFocus"
                                         PreviewTextInput="txt_PreviewTextInput"
                                         TextChanged="txt_TextChanged" FontSize="14" />


What I have tried:

I have not found the solution on internet.
Posted
Updated 10-Oct-19 4:54am
v3
Comments
phil.o 8-Oct-19 5:49am    
Have you tried changing the FontSize attribute of the textbox?
Kudale Dinesh 8-Oct-19 6:44am    
I have already tried for FontSize attribute. But it is increasing size of 1 i.e. Text="1" only. It will not increase size of "8 Hours" text.
phil.o 8-Oct-19 6:53am    
I assume you are talking about the watermark, which seems to be governed by the TextBoxHelper class. The only reference to this class I found is TextBoxHelper Class. Unfortunately, the documentation for this API is far from complete. You can try to play with the ButtonFontSizeProperty. Or you could just ask the author of this library for some hints about your issue.
Maciej Los 8-Oct-19 7:11am    
phil.o 8-Oct-19 7:17am    
Migrated to an answer.
Thanks Maciej for the heads-up :)

Edit: indeed, it might. But, given the lack of useful information on that API (the page Usage says quite a lot about this library's documentation), its author may be the best source of information about it.

I assume you are talking about the watermark, which seems to be governed by the TextBoxHelper class. The only reference to this class I found is TextBoxHelper Class. Unfortunately, the documentation for this API is far from complete. You can try to play with the ButtonFontSizeProperty. Or you could just ask the author of this library for some hints about your issue.
 
Share this answer
 
Comments
Maciej Los 8-Oct-19 7:20am    
5ed!
Please, see updated comment to the question.
phil.o 8-Oct-19 7:24am    
Your remark sounds like an answer, too :)
Maciej Los 8-Oct-19 8:08am    
:D
 
Share this answer
 
Thanks phil.o for replay.
------------------------
Please follow the below link where I got answer of my question:-
Answer of My Question
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900