KeepWatermarkOnFocus property in WatermarkTextBox so that looks Enable

1 Answer 81 Views
WatermarkTextBox
Yogendra
Top achievements
Rank 1
Yogendra asked on 11 Mar 2022, 12:46 PM

I am using WatermarkTextbox and somehow that looks like it is disabled,
previously I was using xctk:WatermarkTextBox in this I was using KeepWatermarkOnGotFocus="True" which was helping me.

In telerik I am not getting any property as such.

Kindly help me in this.

 

I want like this

 

<telerik:RadWatermarkTextBox
                                                HorizontalAlignment="Stretch"
                                                IsReadOnly="True"
                                                Text="{Binding MaterialPartAndName,
                                                               ValidatesOnDataErrors=True}"
                                                ToolTip="{Binding MaterialPartAndName}"
                                                cal:Message.Attach="[Event MouseEnter] = [ResetSelectedItem]"
                                                WatermarkContent="Please select a material...">

                                            </telerik:RadWatermarkTextBox>

 

 

Regards,

Yogendra

                                               

1 Answer, 1 is accepted

Sort by
0
Stenly
Telerik team
answered on 16 Mar 2022, 09:36 AM

Hello Yogendra,

The observed behavior is the expected one, as the RadWatermarkTextBox element has a default value set to its ReadOnlyBackground property. This property's value is bound to the Background property of the Border element with xName="ReadOnlyVisualElement". This Border control is present in the default control template of the RadWatermarkTextBox element. With that said, to achieve the desired result, you could set its ReadOnlyBackground property to x:Null.

 With that said, could you give this suggestion a try?

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.

Tags
WatermarkTextBox
Asked by
Yogendra
Top achievements
Rank 1
Answers by
Stenly
Telerik team
Share this question
or