Telerik Forums
UI for WPF Forum
1 answer
931 views
Hi guys

I have toyed all morning with this problem. I have a DataBound RadTreeView (with ItemsSource) that displays a Hierarchical data structure.

Because each item is displayed using the hierarchy I have no way of hooking into the "DoubleClick" event on a per-item basis.

After some time, I ended up binding SelectedItem to my ViewModel and hooking into the ItemDoubleClick event like below. Unfortunately this makes the assumption that SelectedItem is fired before ItemDoubleClick. So if possible I would love to know a way to hook into the DoubleClick event, so that I can bind the CommandParameter to the item that was double clicked.

<telerik:RadTreeView x:Name="ServerExplorerTreeView" Grid.Row="1" Margin="0 -2 0 0"
VerticalAlignment="Stretch" Background="{StaticResource LightGrayBackgroundBrush}"
IsLineEnabled="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" IsVirtualizing="True"
SelectionMode="Multiple" IsEditable="True" IsDragDropEnabled="True" ItemsSource="{Binding NavigatorVM.Root.ItemsView.View}"
SelectedItem="{Binding NavigatorVM.SelectedItem,Mode=TwoWay}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="ItemDoubleClick">
<i:InvokeCommandAction Command="{Binding NavigatorVM.ItemDoubleClickedCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadTreeView>







Martin Ivanov
Telerik team
 answered on 01 Apr 2015
5 answers
282 views
Hi team,
I am blocked by how to implement such a scenario.
<DataTemplate DataType="model:Line">
    <telerik:RadExpander x:Name="lineExpander"
                         VerticalAlignment="Center"
                         Style="{StaticResource LineRadExpanderStyle}"
                         IsExpanded="True"
                         DataContext="{Binding}"
                         telerik:AnimationManager.IsAnimationEnabled="False">
        <telerik:RadExpander.Header>
            <TextBlock Text="{Binding Name}" FontSize="14"/>
        </telerik:RadExpander.Header>
        <telerik:RadExpander.Content>
            <telerik:RadDiagram x:Name="xDiagram"/>
        </telerik:RadExpander.Content>
    </telerik:RadExpander>
</DataTemplate>

We know that we need to generate a ObservableGraphSourceBase object and assign it to GraphSource property. In my case, i need to turn the bound Line instance into Nodes and Links in the graph source and also whatever changes the Line object has, it should be refreshed in the diagram.

Thanks,
Jingfei
Petar Mladenov
Telerik team
 answered on 01 Apr 2015
1 answer
117 views
I have a rowdetails template with a set height, in a grid row with a set height set to display in a detailspresenter with a set height. They are all set to 300 pixels but there is still not vertical scroll bar showing up. 

Any ideas?

Thanks!
Eric
Stefan
Telerik team
 answered on 01 Apr 2015
2 answers
470 views
Hello, I have a RadTabControl with several RadTadItems, I've created a style for each RadTabItem to assign different colors to the headers:

<Style TargetType="telerik:RadTabItem" x:Key="TabItemStyle1">
            <Setter Property="Background" Value="Red"/>
</Style>

Is it possible to assign the same color of the header when the RadTabItem is selected?

Thanks in advance,

Alberto
Amige
Top achievements
Rank 1
Veteran
 answered on 31 Mar 2015
1 answer
84 views
When doing word-by-word spell checking, the spell checker dialog sometimes covers the misspelled word, so the user cannot see the context of the word without manually moving the dialog. It would be nice if there was a way to change the position of the dialog while spell checking so that it doesn't cover the context of the word.
Tanya
Telerik team
 answered on 31 Mar 2015
1 answer
88 views
Hi,

I have implemented a prism navigable application with a page which contains a RadChartView populated dynamically with a SeriesProvider. On the first navigable page I can manipulate the series collection and remove serie or add new serie. When I remove a serie, the RadChartBase class raise an exception in UpdateDynamicSeries method. I think it's link with the way that prism manage the page (assumption that RadChartView is not link to mainview).
You can found a short sample here.
Run the sample, go to the Content page and try to remove a serie, the exception occurs.
I'm using version 2015.1.225.45 of telerik dll with implicit theme.
Thanks for your help.
Luc
Petar Marchev
Telerik team
 answered on 31 Mar 2015
1 answer
182 views
Hi,

I'm intersted to make my RadDocking to order the inserted panes (in the corespond view-model) like the UniformGrid does...
For example let's assume I have 2 items in my collection of panes. I want them to be shown as two panes with the same width (the sum of their width is the total width of the RadDocking control), and when I programatically add an item to the binded collection, I want the first two items to be shown as their height is half of what they were, and in the second imaginary row I want the third pane to be shown with the same width as theirs.

If the user make some mess with panes, I want the dynamically added item to be docked to the right side. Is it a problem if I got pane that became a ToolWindow while there are another that are not ToolWindow at the moment?

Ho do I achieve that easily?

Thanks!
Nasko
Telerik team
 answered on 31 Mar 2015
3 answers
178 views
Hi there,

We are using RadContextMenu to pop up a small editor with several TextBoxes.  We would like our users to be able to navigate among the text boxes using the Tab key.  However, this doesn't work -- tab does nothing.

The following is a trivial example of a ContextMenu with three text boxes.  Click inside one TextBox and hit tab.  I would expect it to cycle among the three tabs.

How can we enable this behavior, please?

Thanks!

-David

<Window x:Class="telerik_context_menu_taborder.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Rectangle Fill="Black" Width="100" Height="50">
            <telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu KeyboardNavigation.TabNavigation="Cycle" >
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <TextBox Grid.Row="0" Text="TextBox1" />
                        <TextBox Grid.Row="1" Text="TextBox2" />
                        <TextBox Grid.Row="2" Text="TextBox3" />
                    </Grid>
                </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
        </Rectangle>
    </Grid>
</Window>


Kalin
Telerik team
 answered on 31 Mar 2015
1 answer
122 views
Hi guys,

My application typically uses high amount of memory, up to 1GB in some intensive cases. My machine has 12GB memory so no problem. In intensive cases, RadMap fails to respond after panning/zooming a couple of times. When profiled, the bottleneck is in Telerik.Windows.Controls.Map.TileSource.CreateBitmap(). I tried to used caching but not much improvement. Any advice?

This is some code for mockup

<Window x:Class="RadMapPerf.MainWindow"
        Title="MainWindow" Height="600" Width="800">
    <Grid>
        <telerik:RadMap x:Name="RadMap" Center="38.8993487,-77.0145665" UseDefaultLayout="False" ZoomLevel="7">
            <telerik:RadMap.Provider>
                <telerik:OpenStreetMapProvider IsTileCachingEnabled="True"/>
            </telerik:RadMap.Provider>
        </telerik:RadMap>
    </Grid>
</Window>
public partial class MainWindow : Window
    {
        private readonly List<string> _memory = new List<string>();
 
        public MainWindow()
        {
            InitializeComponent();
 
            // fake memory usage
            for (var i = 0; i < 100000000; i++)
                _memory.Add("memory_usage");
                 
        }
    }
Petar Mladenov
Telerik team
 answered on 31 Mar 2015
2 answers
128 views
Hi,

It seems that since last release (2015.1.225.45) the behaviour of RibbonView has changed. Previously when the selected RibbonTab was removed the next was selected. Now no tab is selected even if I change the SelectedItemRemoveBehaviour property on the RibbonView.
Regards
Luc
Luc
Top achievements
Rank 1
 answered on 31 Mar 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?