Telerik Forums
UI for WPF Forum
1 answer
30 views

Hi,

does the RadWaterMarktextBox support validation at Property level like the DataGrid validation feature

Thank you

Stenly
Telerik team
 answered on 07 Dec 2023
1 answer
51 views

Hi,

Would it be possible to have an editable RadMasked Part to mimic the RadWatermarkTextBox with floating Label?

Stenly
Telerik team
 answered on 31 Oct 2023
0 answers
55 views

I am trying to apply the same `Margin` style to a lot of `RadWatermarkTextBox` controls by defining the `Margin` as a Style resource:

<Window.Resources>
    <Style TargetType="{x:Type telerik:RadWatermarkTextBox}">
        <Setter Property="Margin">
            <Setter.Value>
                <Thickness Bottom="{x:Static controls:Measurements.UnrelatedDistance}" />
            </Setter.Value>
        </Setter>
    </Style>
</Window.Resources>

Using the Style above makes the control look different compared to explicitly setting the `Margin` property for each control like below:

<telerik:RadWatermarkTextBox Text="Hello world">
    <telerik:RadWatermarkTextBox.Margin>
        <Thickness Bottom="{x:Static controls:Measurements.UnrelatedDistance}" />
    </telerik:RadWatermarkTextBox.Margin>
</telerik:RadWatermarkTextBox>

I am wondering what's the reason for this difference and how to use a Style resource to the make the control look like the way it does when explicitly setting the `Margin` property within the control.

Thank you.

Wizard6650
Top achievements
Rank 1
Iron
 asked on 05 Sep 2023
1 answer
40 views

Hi,

Would it be possible to have an editable AutoCompleteBox TextBox Part to mimic the RadWatermarkTextBox with floating Label?

Stenly
Telerik team
 answered on 01 Mar 2023
0 answers
110 views

Failed to focus RadWatermarkTextBox

<telerik:RadDropDownButton Margin="10 0" 
                        DropDownIndicatorVisibility="Collapsed"
                        DropDownPlacement="Mouse">
    <telerik:RadDropDownButton.DropDownContent>
        <StackPanel Orientation="Horizontal">
            <telerik:RadButton Click="AddLocation_OnClick"/>
            <telerik:RadWatermarkTextBox 
                    Width="100" 
                    Loaded="RadWatermarkTextBox_Loaded"/>
        </StackPanel>
    </telerik:RadDropDownButton.DropDownContent>
</telerik:RadDropDownButton>

 

private void RadWatermarkTextBox_Loaded(object sender, RoutedEventArgs e)
{
    if (sender is RadWatermarkTextBox tb)
    {
        tb.Text = string.Empty;
    }
}
Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
 asked on 27 Jun 2022
1 answer
158 views

Hi,

Would it be possible to have a editable RadComboBox TextBox Part to mimic the RadWatermarkTextBox with floating Label?

Avrohom
Top achievements
Rank 1
Iron
Iron
 answered on 08 Jun 2022
1 answer
82 views

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

                                               
Stenly
Telerik team
 answered on 16 Mar 2022
1 answer
136 views

I recently updated Telerik for WPF to the latest version. Since then I have following problem:

When I work with the designer I get this error:

[A]Telerik.Windows.Controls.RadWatermarkTextBox cannot be cast to [B]Telerik.Windows.Controls.RadWatermarkTextBox. Type A originates from 'Telerik.Windows.Controls, Version=2021.2.615.45, Culture=neutral, PublicKeyToken=...' in the context 'LoadFrom' at location 'C:\Program Files (x86)\Progress\Telerik UI for WPF R2 2021\Binaries\WPF45\Telerik.Windows.Controls.dll'. Type B originates from 'Telerik.Windows.Controls, Version=2021.2.615.45, Culture=neutral, PublicKeyToken=....' in the context 'LoadNeither' at location 'C:\Users\user\AppData\Local\Microsoft\VisualStudio\16.0_589b9641\Designer\ShadowCache\sc041jsc.3tf\nxls5byu.o3i\Telerik.Windows.Controls.dll'.

This only occurs on UserControls I want to insert somewhere. So I can use the RadWatermarkTextBox normally. But if it's in a UserControl this error is thrown.

How can I resolve this errror?


Dilyan Traykov
Telerik team
 answered on 13 Aug 2021
1 answer
207 views

I have a WPF view that contains both watermark text boxes and multicolumn combo boxes. I would like to set their properties in the resources of the view. I am having an issue where the settings of the watermarktextbox are affecting the appearance of the multicolumncombobox. Below is my code for the settings (This is under the resources of the view)


        <Style TargetType="{x:Type telerik:RadWatermarkTextBox}">
            <Setter Property="Padding" Value="3" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="telerik:StyleManager.Theme" Value="Office2019" />
            <Setter Property="Height" Value="25" />
            <Setter Property="Margin" Value="5 5 5 0" />
        </Style>

        <Style TargetType="{x:Type telerik:RadMultiColumnComboBox}">
            <Setter Property="Height" Value="25" />
            <Setter Property="Margin" Value="5,5,5,0"/>
            <Setter Property="telerik:StyleManager.Theme" Value="Office2019" />
        </Style>

Below is a screenshot of the of the view - notice the drop down icon of the combobox is off it has the downarrow on the right but then also up and down arrows to the left of the drop down arrow - i think its a scroll bar

 

I can fix this in a couple ways but neither are ideal:
 1) I can set the height of the multi column combobox to 31 to get rid of those scroll bars. However, I would like all of my controls to be 25

2) I can remove the Height and Margin setters from the watermarktextbox but then I would have to go through and add those properties to each individual watermark textbox in my view

 

is there a setter property I can add to either the resources that would cancel out the values from the watermarktextbox or is there a way to cancel them out via a setting on each individual multicolumncombobox??

 

Thank you!

Dinko | Tech Support Engineer
Telerik team
 answered on 16 Jul 2021
3 answers
77 views

Hello,

I am using your WatermarkTextBox inside a RadToolBar.The property 'WatermarkBehavior' is set to 'HiddenWhenFocused'.

Now when I am click on an area outside the RadToolBar, the Watermark text isn't reset due to the LostFocus-Event for the control is not called.

Can you help me with a workaround for that?

Thanks!

Tobias

Dilyan Traykov
Telerik team
 answered on 15 Mar 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?