Telerik Forums
UI for WPF Forum
1 answer
24 views
Hi There
Currently I have on my project an Assembly reference to the telerik DLL
This is causing troubles in the development group, some has a different version, others a different configuration of the environment
There current reference is as
<Reference Include="Telerik.Windows.Controls">
  <HintPath>$(TelerikBin)\Telerik.Windows.Controls.dll</HintPath>
</Reference>
but I like to migrate to a NuGet instead so the component is in the project and is more transparent for everyone.
Problem I encounter is that there are multiple
Telerik.Windows.Controls.for.Wpf
Telerik.Windows.Controls.for.Wpf.Xaml
I try them both but my problem persists.
The Textboxes disappear from the forms.
Is there a simple and transparent way to migrate from the DLLs to the NuGets?
Martin Ivanov
Telerik team
 answered on 12 Nov 2025
0 answers
147 views

I'm trying to capture when the Enter key is pressed in a RadWatermarkTextBox without adding code to code-behind.

In the XAML I have:


            <telerik:RadWatermarkTextBox MinHeight="26"
                                         x:Name="searchCompleteBox"
                                         VerticalAlignment="Center"
                                         Text="{Binding SearchText, Mode=TwoWay}"
                                         Width="200" 
                                         WatermarkContent="Enter name, address, or ID">
                <telerik:EventToCommandBehavior.EventBindings>
                    <telerik:EventBinding Command="{Binding OnSearchCompleteBoxKeyDownCommand}"
                                     EventName="KeyDown"
                                     PassEventArgsToCommand="True" />
                </telerik:EventToCommandBehavior.EventBindings>
            </telerik:RadWatermarkTextBox>

In the ViewModel:


    private async void OnSearchCompleteBoxKeyDown(System.Windows.Input.KeyEventArgs e)
    {        
        if (e.Key == Key.Enter)
        {
            await SearchForMembersAsync();
        }
    }

The problem is SearchText is not updating. So if I type something like "smith" OnSearchCompleteBoxKeyDown fires five times, the if result is false five times, but SearchText contains an empty string instead of "smith".

SearchText is declared properly and is updated properly if I take the EventToCommandBehavior code out.  This all works properly if I use code-behind but I want to avoid that.

Neil N
Top achievements
Rank 2
Iron
Iron
Veteran
 asked on 14 Jul 2024
1 answer
163 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
124 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
169 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
Iron
 asked on 05 Sep 2023
1 answer
110 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
219 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
281 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
164 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
250 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?