Telerik Forums
UI for WPF Forum
1 answer
220 views
Hi -
I am trying to implement treeview that will have multiple expandable 1st level nodes. When one of the 1st level nodes is expanded, subitems of that node (they should not be expandable) should be displayed as a grid. I tried with setting Wrap panel for ItemsPanel, but in that case virtualization stops working.
<Style TargetType="telerik:RadTreeViewItem" x:Key="RadTreeViewItemStyle">
           <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
           <Setter Property="HorizontalContentAlignment" Value="Left"/>
           <Setter Property="VerticalContentAlignment" Value="Center"/>
           <Setter Property="BorderThickness" Value="1"/>
           <Setter Property="Padding" Value="1 4 5 4"/>
           <Setter Property="MinHeight" Value="24"/>
           <Setter Property="IsDropAllowed" Value="True"/>
           <Setter Property="IsEnabled" Value="True"/>
           <Setter Property="IsTabStop" Value="False"/>
           <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
           <Setter Property="Template" Value="{StaticResource TreeViewItemDefaultTemplate}"/>
           <Setter Property="ItemsPanel">
               <Setter.Value>
                   <ItemsPanelTemplate>
                           <WrapPanel Orientation="Horizontal" VerticalAlignment="Bottom"/>
                   </ItemsPanelTemplate>
               </Setter.Value>
           </Setter>
       </Style>
When I set telerik:TreeViewPanel for ItemPanel, virtualization is working, but subitems of nodes are shown in a vertical list?

Is there any way to achieve that behavior, so subitems are shown in wrap panel, but to keep virtualization working?

Thanks in advance! 
Dinko | Tech Support Engineer
Telerik team
 answered on 09 Nov 2017
4 answers
330 views
Hello,

I was looking for a way to disable the formula capabilities of the control is this possible?(e.g =SUM(A+B)).
This without the need to disable the cells.

Kind regards,

Thomas,
Marcus
Top achievements
Rank 1
 answered on 09 Nov 2017
1 answer
89 views
I see references to RadMap.LocationRect in past forum posts, but am unable to find the current lat/long bounds of the map view. I must be missing something easy.
Stefan
Telerik team
 answered on 08 Nov 2017
3 answers
474 views
Hi,

I am creating a RadCartesianChart and adding bar series this way:

chartSafety.VerticalAxis = new LinearAxis();
            chartSafety.HorizontalAxis = new CategoricalAxis();
 
            DataTable dtSafety = new DataTable("DATA");
 
            dtSafety.Columns.Add(new DataColumn("Name", typeof(string)));
            dtSafety.Columns.Add(new DataColumn("ValueBar", typeof(double)));
 
            dtSafety.Rows.Add(new object[] { "Value1", 70 });
            dtSafety.Rows.Add(new object[] { "Value2", 15 });
            dtSafety.Rows.Add(new object[] { "Value3", 34 });
            dtSafety.Rows.Add(new object[] { "Value4", 87 });
            dtSafety.Rows.Add(new object[] { "Value5", 45 });
            dtSafety.Rows.Add(new object[] { "Value6", 22 });
            dtSafety.Rows.Add(new object[] { "Value7", 33 });
            dtSafety.Rows.Add(new object[] { "Value8", 65 });
            dtSafety.Rows.Add(new object[] { "Value9", 19 });
            dtSafety.Rows.Add(new object[] { "Value10", 41 });
             
 
            BarSeries barSer = new BarSeries();
 
foreach (DataRow drSafety in dtSafety.Rows)
            {
                barSer.DataPoints.Add(new CategoricalDataPoint() { Category = drSafety["Name"], Label = string.Format("{0:N}", drSafety["ValueBar"]), Value = double.Parse(drSafety["ValueBar"].ToString()) });
              
                 
            }
             
            chartSafety.Series.Clear();
            chartSafety.Series.Add(barSer);

Is there a way to change the color for each bar in the series while I am creating each data point?

Regards,

Alberto
Martin Ivanov
Telerik team
 answered on 08 Nov 2017
3 answers
185 views

Hi. I was trying to run example code about 'AnnotationsProvider' feature from here:

https://github.com/telerik/xaml-sdk/tree/master/ChartView/WPF/AnnotationsProvider

However, it seems to me that it doesn't working as was supposed. Neither 'AnnotationDescriptor' or 'AnnotationDescriptorSelector' user control are not working properly (I had not seen any annotations at all). Only 'AnnotationCreated' user control drew the annotations by using code-behind event handler. What am i doing wrong?

My current Telerik libraries version is 2017.2.503.4

Dmitry
Top achievements
Rank 1
 answered on 08 Nov 2017
1 answer
223 views
<telerik:RadLegend Grid.Row="1" Margin="10,20" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                    <telerik:RadLegend.Items>
                        <telerik:LegendItemCollection>
                            <telerik:LegendItem MarkerFill="Red" Title="Legend item 1" />
                            <telerik:LegendItem MarkerFill="Green" Title="Legend item 2" />
                            <telerik:LegendItem MarkerFill="Blue" Title="Legend item 3" />
                            <telerik:LegendItem MarkerFill="Aqua" Title="Legend item 4" />
                        </telerik:LegendItemCollection>
                    </telerik:RadLegend.Items>
                </telerik:RadLegend>
I want to add legends to doughnut char. Now the colors are hard coded in xaml. But I want to use MVVM. Not sure how to bind it? 
Vladimir Stoyanov
Telerik team
 answered on 07 Nov 2017
1 answer
209 views

0down votefavorite
1 I had a WPF project work with Kinect hand pointer and want do use Telerik RadCarouselPanel that bind with ListBox. the problem is that the hand pointer scroll speed is too fast, I tried ScrollViewer.CanContentScroll="False" but it break Telerik perspective effect on Listbox. how can I slow it down some how? here is the picture and the code:

 



    <ScrollViewer HorizontalAlignment="Center" Background="Transparent" VerticalAlignment="Center"  VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Disabled" Width="1691.381" Height="257.5" Grid.ColumnSpan="4"  Grid.RowSpan="3" Grid.Row="2">
<ListBox x:Name="listBox" Background="Transparent" BorderBrush="Transparent" SelectionChanged="listBox_SelectionChanged" SelectionMode="Single" ItemsSource="{Binding Source={StaticResource NamesTable}}" HorizontalContentAlignment="Center" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Disabled" RenderTransformOrigin="0.5,0.5"  >
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<telerik:RadCarouselPanel Name="MyCarousel" HorizontalAlignment="Center" VerticalAlignment="Center" Height="300"  Width="2000"/>
<!--<StackPanel Orientation="Horizontal" />-->
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal"  Height="200" Width="200" >
<Image Margin="3" Source="{Binding pic_path}" RenderOptions.BitmapScalingMode="Fant" RenderOptions.EdgeMode="Aliased"/>
<TextBox Margin="3" Text="{Binding name}" Visibility="Visible"/>

</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ScrollViewer>

Dinko | Tech Support Engineer
Telerik team
 answered on 07 Nov 2017
1 answer
191 views

I am working on a gridview and need to change the appearance between the view mode and the edit mode. I tried to create implicit styles with data triggers to change the background color and font color in Header Row, but it did work.  I can't apply data triggers to head row?

 

Thanks.

Sia
Telerik team
 answered on 07 Nov 2017
1 answer
46 views

 

Hi 

I am trying to copy diagram and then paste diagram.

Serialization and Deserialization is good work for copy, paste, create.

 

However, when i try to copy diagram to other view model, Link does not work.

I found this cause that diagram id was changed when copy diagram.

Except for that, All of that are good working.

 

I wonder some solutions to solve this problem. 

Thanks.

Martin Ivanov
Telerik team
 answered on 07 Nov 2017
3 answers
135 views

Hello.

We are currently testing the RadRichTextBox control and due to our specific business needs we cannot use the ribbon UI so we are applying styles programmatically.

We are using the sample code from the documentation which describes how to apply a linked style however it does not work in our case - only the paragraph style is applied but the character one is ignored.

Our environment is VS 2017.

.NET Framework 4.6.2. (tried with 4.5 but got the same result).

Here is the code:

StyleDefinition linkedParagraphStyle = new StyleDefinition();
                linkedParagraphStyle.Type = StyleType.Paragraph;
                linkedParagraphStyle.ParagraphProperties.Background = Colors.Yellow;
                linkedParagraphStyle.DisplayName = "linkedParagraphStyle";
                linkedParagraphStyle.Name = "linkedParagraphStyle";

                StyleDefinition linkedCharStyle = new StyleDefinition();
                linkedCharStyle.Type = StyleType.Character;
                linkedCharStyle.SpanProperties.FontWeight = FontWeights.Bold;
                linkedCharStyle.SpanProperties.FontFamily = new FontFamily("Times New Roman");
                linkedCharStyle.DisplayName = "linkedCharStyle";
                linkedCharStyle.Name = "linkedCharStyle";
                linkedParagraphStyle.LinkedStyle = linkedCharStyle;

                this.textBox.Document.StyleRepository.Add(linkedParagraphStyle);
                this.textBox.Document.StyleRepository.Add(linkedCharStyle);
                this.textBox.ChangeStyleName("linkedCharStyle");

 

No matter how we change the linking and the naming of the styles and linked properties it will not apply the character properties.

Any help would be greatly appreciated.

Regards,

R.F.

Boby
Telerik team
 answered on 07 Nov 2017
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?