Telerik Forums
UI for WPF Forum
0 answers
13 views

Hello. Please give an idea to start with ...

I have RadWatermarkTextBox. And I've added INotifyDataErrorInfo to my VM implementation.

When DisplayMode  is Static - I can see validation errors. But When it's Tooltip telerik:ValidationErrorTemplateHelper.DisplayMode="ToolTip"
I can't see. 

By the way. if I use static mode I also don't see red bottom border line. And red arrow at top right corner, my error text is just a black font without read rectangle around and etc.

Looks like missing styles. But I can't understand which one. I imported xaml files for Win11 style. I see that there is a definition for RadWatermarkTextBox Validation Styles.

Valentin
Top achievements
Rank 1
 updated question on 28 Mar 2024
0 answers
21 views

In my `telerik:RadGridView`, I have configured a `CellValidating="RadGridView_CellValidating"` callback.  It successfully catches a validation error, which then invokes this code:

e.IsValid = false;
e.ErrorMessage = "Enter a valid URL with 'https://' or 'http://'";

The cell does properly receive a red border, and what looks like a tool-tip notation in the top right corner.  However, unfortunately, I am unable to see the tool-tip, regardless if I hover or click on the tool-tip.  What are perhaps the top three to five reasons this might be happening?

It is specifically the "Documentation" column above, which is a `GridViewHyperlinkColumn`, which is failing validation...with no tool-tip showing.  To be clear, actually none of the columns have a working or "showable" tool-tip.  Even so, here is the code specifically for my "Documentation" column:

    <telerik:GridViewHyperlinkColumn
        IsReadOnly="{Binding IsEditModeWithPermissions, Converter={StaticResource InverseBooleanConverter}}"
        CellStyle="{StaticResource GridViewCellStyleStretch}" IsCustomSortingEnabled="False"
        ValidatesOnDataErrors="InViewMode"
        UniqueName="Documentation"
        MinWidth="80" MaxWidth="350" Width="150"
        DataMemberBinding="{Binding Documentation}"
        Name="DocumentationColumn" Header="Documentation">
        <telerik:GridViewHyperlinkColumn.CellTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding DocumentationFormatted, StringFormat='{}{0}'}"/>
            </DataTemplate>
        </telerik:GridViewHyperlinkColumn.CellTemplate>
        <telerik:GridViewHyperlinkColumn.CellEditTemplate>
            <DataTemplate>
                <telerik:RadComboBox x:Name="DocumentationBox"
                    Text="{Binding Documentation, Mode=TwoWay}" KeyDown="RadComboBox_PreviewKeyDown"
                    IsTextSearchEnabled="True" TextSearchMode="StartsWith" OpenDropDownOnFocus="True"
                    StaysOpenOnEdit="False" Loaded="RadComboBox_Loaded" IsEditable="True" >
                    <telerik:RadComboBox.Resources>
                        <Style TargetType="TextBox">
                            <Setter Property="MaxLength" Value="{Binding DocumentationColumnWidth}" />
                        </Style>
                    </telerik:RadComboBox.Resources>
                </telerik:RadComboBox>
            </DataTemplate>
        </telerik:GridViewHyperlinkColumn.CellEditTemplate>
    </telerik:GridViewHyperlinkColumn>

And here is the RadGridView initial declaration:

    <telerik:RadGridView Grid.Row="1"
        CellValidating="RadGridView_CellValidating"
        BorderThickness="{Binding GridBorderThickness}"
        SelectedItem="{Binding SelectedLineItem, Mode=TwoWay}" Pasting="UxGrid_OnPasting"
        SelectionChanged="UxGrid_OnSelectionChanged" CopyingCellClipboardContent="UxGrid_OnCopyingCellClipboardContent"
        RowIndicatorVisibility="Visible"
        ValidatesOnDataErrors="InViewMode"
        EditTriggers="CellClick"
        ActionOnLostFocus="CommitEdit" Name="uxGrid"
        PreparingCellForEdit="uxGrid_PreparingCellForEdit" Deleted="UxGrid_OnDeleted"
        CellEditEnded="uxGrid_CellEditEnded"
        KeyDown="GridKeyDown"
        ScrollMode="Deferred"
        IsReadOnly="{Binding IsGridEditable, Converter={StaticResource InverseBooleanConverter}}"
        CanUserDeleteRows="{Binding CanEditNotReleased}" CanUserInsertRows="False"
        AreRowDetailsFrozen="True" EnableColumnVirtualization="False"
        RowDetailsVisibilityMode="{Binding RowDetailsVisibility}"
        DataLoaded="UxGrid_OnDataLoaded"
        RowEditEnded="RadGridViewRowEditEnded" BeginningEdit="RadGridViewBeginningEdit"
        AlternationCount="2" AutoGenerateColumns="False" 
        ItemsSource="{Binding LineItemsView, UpdateSourceTrigger=PropertyChanged}" SourceUpdated="uxGrid_SourceUpdated_1"
        Loaded="uxGrid_Loaded"
        LoadingRowDetails="UxGrid_OnLoadingRowDetails"
        ColumnWidthChanged="GridViewDataControl_OnColumnWidthChanged"
        DataContext="{Binding}"
        ColumnReordering="uxGrid_ColumnReordering"
        CanUserSortColumns="{Binding IsEditMode, Converter={StaticResource InverseBooleanConverter}}"
        IsFilteringAllowed="{Binding IsEditMode, Converter={StaticResource InverseBooleanConverter}}">
Scott
Top achievements
Rank 1
Iron
 updated question on 11 Jan 2024
0 answers
84 views

Hello, everyone,

I found different acts of ToolTip in different computers, the tooltip will drift to the left a little in some computers. Do you have any clue about the reason? How can we solve this? Is there any configuration of computer system we should adjust?

Lily
Top achievements
Rank 1
 updated question on 06 Apr 2023
1 answer
50 views
I customized my WPF app's Windows8Touch theme with a compete palette of colors -- that is I set up the Windows8TouchPalette at startup before the main windows shows.  In my palette, the background is dark and the foreground is light. 

I've had it this way for years and it works quite well.  But the whenever I set the RadToolTipService.ToolTipContent property on  any control using just a string, I get a white background fpr tje text.  So I am forced to specifically create a full UI for it or use the ToolTipContentTemplate.   It looks like the default settings for that do not honor my colors

Is there some Telerik-specific control type that I can set a default style for that will fix this issue?  Kinda like how I can style `RadAlert` or `RadPrompt` for those dialogs?

(Note that I am using the binaries with XAML in them so I use the StyleManager to theme things, if that matters.  Where I feel the need I copy the Telerik styles out of your XAML files for my theme and customize them. )
Martin Ivanov
Telerik team
 answered on 29 Mar 2023
0 answers
56 views

Is there a 

telerik:ComboBoxToolTipHelper.ShowToolTipOnTrimmedText="True" that works on the RadListBox (not only the RadComboBox)?

So a :ComboBoxToolTipHelper.ShowToolTipOnTrimmedText that works on the RadListBox?

Or another way of achieving it on the RadListBox?

Background:

I tried with a behavior on the row data template but it conflicts with the drag and drop by causing exceptions during the drag and drop (but that would incur another question thread).  I am just writing this to say i tried this avenue.

Right now my RadLitBox looks as follows:

<telerik:RadListBox x:Name="RLB_Source"   
                                        VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
                                        ItemsSource="{Binding SourceSplitList, Mode=TwoWay}" 
                                        SelectionMode="Multiple"  
                                        telerik:ListBoxSelectedItemsBehavior.SelectedItemsSource="{Binding SelectedSourceItems}"
                                        DisplayMemberPath="Name" 
                                        AllowDrop="True" 
                                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                        ScrollViewer.VerticalScrollBarVisibility="Visible"  
                                        Style="{StaticResource RadListBoxStyle}" 
                                        telerik:ComboBoxToolTipHelper.ShowToolTipOnTrimmedText="True"
                                        ToolTipService.ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}" 
                                        >

Because of the lines:

                                        telerik:ComboBoxToolTipHelper.ShowToolTipOnTrimmedText="True"
                                        ToolTipService.ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}" 

There is a tool tip showing the text of every RadListBox row - and not only where the text is trimmed.

How is the text trimmed? Short answer: i have a telerik:RadListBoxItem style template where text trimming is set as below:  

         <Setter Property="TextTrimming" Value="CharacterEllipsis"></Setter>

Here is the entire control template:

 <ControlTemplate TargetType="{x:Type telerik:RadListBoxItem}">
                    <Border
                                x:Name="Bd"
                                Padding="{TemplateBinding Padding}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                SnapsToDevicePixels="true">
                        <ContentPresenter 
                                   HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                   VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                   SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                   >

                            <ContentPresenter.Resources>
                                <Style TargetType="TextBlock">
                                    <Setter Property="TextTrimming" Value="CharacterEllipsis"></Setter>
                                    <Setter Property="TextWrapping" Value="NoWrap" />
                                    <Setter Property="Text" Value="{Binding Name}" />
                                    <Setter Property="ToolTipService.ToolTip" Value="{Binding Name}" />
                                </Style>
                            </ContentPresenter.Resources>
                        </ContentPresenter> 
                    </Border>  

</ControlTemplate>

Trimming is set on the TextBlock that appears (implicitly by Telerik) in the Contentpresenter.

 

The whole styling is below if relevant for answering the question:

My RadListBox has this style:

 <Style x:Key="RadListBoxStyle" TargetType="{x:Type telerik:RadListBox}">
        <Setter Property="AlternationCount" Value="2" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="True" />
        <Setter Property="VirtualizingPanel.ScrollUnit" Value="Pixel" />
        <Setter Property="VirtualizingPanel.VirtualizationMode" Value="Recycling" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{StaticResource Gray}" />
        <Setter Property="Background" Value="{DynamicResource White}" />
        <Setter Property="SelectionMode" Value="Multiple" />
        <Setter Property="FontSize" Value="12pt" />
        <Setter Property="FontFamily" Value="{StaticResource SourceSansPro-Regular}" />
        <Setter Property="Foreground" Value="{StaticResource Brand Default}" />
        <Setter Property="Margin" Value="0,2,0,0" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource DefaultDragDropRadListBoxItemStyle}" /> 
    </Style> 

 

In the the above style there is an ItemContainerStyle.  Here it goes:

        

  <Style x:Key="DefaultDragDropRadListBoxItemStyle" TargetType="telerik:RadListBoxItem">
        <Setter Property="BorderBrush" Value="{StaticResource 'Gray Light'}" />
        <Setter Property="BorderThickness" Value="0,0,0,1" />
        <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" /> 

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:RadListBoxItem}">
                    <Border
                                x:Name="Bd"
                                Padding="{TemplateBinding Padding}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                SnapsToDevicePixels="true">
                        <ContentPresenter 
                                   HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                   VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                   SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                   >

                            <ContentPresenter.Resources>
                                <Style TargetType="TextBlock">
                                    <Setter Property="TextTrimming" Value="CharacterEllipsis"></Setter>
                                    <Setter Property="TextWrapping" Value="NoWrap" />
                                    <Setter Property="Text" Value="{Binding Name}" />
                                    <Setter Property="ToolTipService.ToolTip" Value="{Binding Name}" />
                                </Style>
                            </ContentPresenter.Resources>
                        </ContentPresenter> 
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                        <Trigger Property="ItemsControl.AlternationIndex" Value="0">
                            <Setter Property="Background" Value="White"></Setter>
                        </Trigger>
                        <Trigger Property="ItemsControl.AlternationIndex" Value="1">
                            <Setter Property="Background" Value="{StaticResource 'Gray Lighter'}"></Setter>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="False" />
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="IsKeyboardFocused" Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource Brand Light}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="False" />
                                <Condition Property="IsMouseOver" Value="False" />
                                <Condition Property="IsKeyboardFocused" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource Brand Secondary}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                                <Condition Property="IsMouseOver" Value="False" />
                                <Condition Property="IsKeyboardFocused" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource Brand Secondary}" />
                            <Setter Property="Foreground" Value="White" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                                <Condition Property="IsMouseOver" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource Brand Secondary}" />
                            <Setter Property="Foreground" Value="White" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                                <Condition Property="IsMouseOver" Value="False" />
                                <Condition Property="IsKeyboardFocused" Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource Brand Secondary}" />
                            <Setter Property="Foreground" Value="White" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="False" />
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="IsKeyboardFocused" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource Brand Secondary}" />
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter> 
    </Style>

 

Paul Schwartzberg
Top achievements
Rank 1
 asked on 29 Aug 2022
0 answers
57 views

Good day! Which template is responsible for tooltip while dragging or resizing task? Can we customize this object?

Thank You for answers

Eugeny
Top achievements
Rank 1
 asked on 12 Jul 2022
1 answer
78 views

Hi, trying to speed up the points-plot (around 1000-5000 points)

I can so far conclude that we can only get a tooltip for XamlRenderOptions DefaultVisualsRenderMode="Separate" otw, no tooltip is visible.

I have tried a few options (see below)  - but maybe the behavior changes once I change the render mode ?

 

- XamlRenderOptions DefaultVisualsRenderMode="Batch"  -> no tooltip
- (geometrytype not supported by scatterpointseries)
- BitmapRenderOptions -> no tooltip
- Direct2DRenderOptions -> not tooltip

Martin Ivanov
Telerik team
 answered on 15 Dec 2021
1 answer
78 views

Hi,

I observed that when the tooltip disappears, I need to move out of control before I can see the tooltip again (also in your sample with England map you can see this effect). It is reasonable, but I have a control that display a histogram plot. I could move the mouse over different bar and I would like that the tooltip could show again.
Is there a way to reactivate tooltip without exit from control?

Thank you

Luigi

Stenly
Telerik team
 answered on 13 Oct 2021
5 answers
118 views

Hello.

When using the tooltip content separately, the namespace is shown together.

<telerik:RadButton Height="30" Width="30"
                   telerik:RadToolTipService.Placement="Mouse"
                   telerik:RadToolTipService.ShowDuration="5000">
    <telerik:RadButton.Content>
        <TextBlock Text="&#xE72C" FontFamily="Segoe MDL2 Assets"/>
    </telerik:RadButton.Content>
    <telerik:RadToolTipService.ToolTipContent>
        <telerik:RadToolTipContentView >
            <TextBlock Text="ToolTip Name"/>
        </telerik:RadToolTipContentView>
    </telerik:RadToolTipService.ToolTipContent>
</telerik:RadButton>

 

If I use telerik:RadToolTipService.ToolTipContent="Content" it looks correct.

However, the above source was selected because it should be different from the button font setting.

When telerik:RadToolTipContentView is deleted, only other namespaces are shown, textblock content is not.

 

Please check.

Thanks.

Martin Ivanov
Telerik team
 answered on 05 May 2021
1 answer
836 views

I'm looking for a quick way to enabled/disable tooltips application wide (globally).  I realize I can do the following on EVERY single control:

RadToolTipService.SetIsEnabled(Me.bnSettings, False)

 

repeat for each control in my application, however, I was hoping there was an easy way to enable/disable all tooltips in my application?

 

Cheers, Rob.

Martin Ivanov
Telerik team
 answered on 01 Dec 2020
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
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
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?