Telerik Forums
UI for WPF Forum
1 answer
193 views
I want to handle the tooltip logic globally for all UIElements of my RadWindow.
More precisely, the UIElement under the mouse pointer should be used to decide what ToolTip content is shown and whether the Tooltip is shown.

Is that possible by using e.g. RadToolTip/ RadToolTipService/ ToolTip or do I need something else?

----


If it is unclear what I mean, here is a similar behaviour I've already implemented. However it is used for the RadContextMenu instead of a tool tips.
 (i.e. the clicked UIElement is used to decide what Context Menu is shown and whether the context Menu is shown.)


        // this xaml is somewhere very high in the visual tree and therefore handles all children of that node
        <telerik:RadContextMenu.ContextMenu>
            <telerik:RadContextMenu x:Name="MyContextMenu" Opening="RadContextMenu_Opening">
                <telerik:RadMenuItem x:Name="Item1" Header="Item1"/>
                <telerik:RadMenuItem x:Name="Item2" Header="Item2"/>
                <telerik:RadMenuItem x:Name="Item3" Header="Item3"/>
            </telerik:RadContextMenu>
        </telerik:RadContextMenu.ContextMenu>



        private void RadContextMenu_Opening(object sender, Telerik.Windows.RadRoutedEventArgs e)
        {
            e.Handled = true; // do not show context menu except if I say otherwise further below

            var source = MyContextMenu.GetClickedElement<FrameworkElement>();
            if (source == null)
                return;
            var itemToShowContextMenuFor = GetViewModelFromBestParentInVisualTreeOrNull(source)
            if (itemToShowContextMenuFor == null)
                return;

            // e.g. set visibility for each RadMenuItem
            SetContextMenuItems(itemToShowContextMenuFor, out var showContextMenu)

            if (showContextMenu)
                e.Handled = false; // show context menu
        }
Martin Ivanov
Telerik team
 answered on 07 Jun 2019
6 answers
190 views
We have a pivot grid that has 3 levels of dimensions to it: (for example):
1 Company
     1.1. Account
            1.1.1. Ticker
2 Company
     2.1. Account
        2.1.1. Ticker
etc.
When the user clicks on the plus sign next to Company it expands out to accounts and then if they click on the plus sign next to Account it expands to Ticker etc. The problem we are having is as soon as we refresh the data the previously selected expansions all go away and it defaults to back what it was at the start either expanded or collapsed. We are refreshing the data by rebuilding a collection of data records which we then assign to the Pivots dataprovder.Items source .
My question is how can we maintain the previously expanded and collapsed rows between data refresh's - thank you
Dilyan Traykov
Telerik team
 answered on 06 Jun 2019
2 answers
162 views

Hi,

I need to create shapes that have multiple distinct input points (anchors) on one size. When I create a shape it has one anchor point for connections in the middle of each side. How do I, say, create a rectangular (say) shape with 3 distinct anchor points for connection on, say, the left size.

I can create multiple connections to the one point on the left side of the shape but I need multiple connections to multiple points on the same site.

Thanks

Rob

Robert
Top achievements
Rank 1
 answered on 06 Jun 2019
8 answers
327 views

Hi, I'm trying to create a class deriving from the GridViewDataColumn. For example, I'd like to make the FontWeight Bold based on the bounded value. I was able to do it successfully for the view control by overriding CreateCellElement. So I thought overriding CreateCellEditElement would be the other method of the edit control but it is not working as expected. Attached is an illustration of the issue. Also, I have a sample project but I can't attach it here.

Thanks

Jan

Vladimir Stoyanov
Telerik team
 answered on 06 Jun 2019
1 answer
121 views

Hi guys,

I've got a telerik rad grid view data bound to a CollectionViewSource with group descriptiors enabled. But it seems that when I edit a cell and then commit it, the row gets shifted to the bottom of the current grouping.

Is there any trick to stop this re-ordering?

Dimitar Dinev
Telerik team
 answered on 05 Jun 2019
5 answers
123 views

How can I create a Gauge that looks like the one in the image attached ?

I am using RadHorizontalLinearGauge in Code Behind.

I want to know:

  1. how can I have text/label above the needle indicator ? (pointer).
  2. how can I create trend ? (dotted vertical line)
  3. how can Iinsert a label/text inside the a range ("Schlecht" in the attached image) ?

 

 

 

Martin Ivanov
Telerik team
 answered on 05 Jun 2019
5 answers
275 views
I am trying to get a CountainerBindingCollection and ContainBinding to work with my hierarchical data template in wpf but no matter what namespace I use it doesn't seem to recognize it.

This link is to one of your WPF pages showing the ContainerBinding being used and it seems to be in the same namespace as the RadMenu , I have Access to the Menu but not the ContainerBindings, is this page of information wrong?

http://www.telerik.com/help/wpf/radmenu-how-to-enable-disable-menu-items.html

At the bottom of this page there is a link 'to learn more about container bindings' which leads to a page that never even mentions the containerbinding
Martin Ivanov
Telerik team
 answered on 05 Jun 2019
1 answer
107 views
I tried searching in the demos and samples and didn't see any method to plug-in that would allow saving and opening of ganttview data from an external file, such as an xml.  The only thing I found was by using MSProject importer/exporter but I want to be able to save and open on computers without that software.  Is there something you can point me to or am I on my own to devise something?  Thanks.
Vladimir Stoyanov
Telerik team
 answered on 05 Jun 2019
1 answer
89 views
Hello, can we put other controls inside the TabbedWindow?
Someting like RadNavigationView on the left?
Drago
Telerik team
 answered on 05 Jun 2019
1 answer
316 views
In a Horizontal Bar Chart I want to add a small gap between the bar series. I have managed to do it in Vertical Bar Chart like this:

01.FrameworkElementFactory borderFramework = new FrameworkElementFactory(typeof(Border));
02.            borderFramework.SetValue(Border.BackgroundProperty, brush);
03.            borderFramework.SetValue(Border.OpacityProperty, 0.7D);
04. 
05.// set a small space between the bar/columns just like chartjs does it
06.                borderFramework.SetValue(Border.BorderThicknessProperty, new Thickness(2, 0, 2, 0));
07. 
08....  new BarSeries(){
09....
10. PointTemplate = new DataTemplate()
11.                {
12.                    VisualTree = borderFramework,
13.                },
14.}

 

Martin Ivanov
Telerik team
 answered on 05 Jun 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?