Telerik Forums
UI for WPF Forum
1 answer
93 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
480 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
195 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
228 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
214 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
196 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
48 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
138 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
7 answers
236 views

Hello,

 

I want to modify the icon that will be showed when a row in RadGridView is not valid. I found topics in yours forum, but just for WinForms, and the used event is not exists in WPF.

For WinForms, the ViewCellFormatting event is used, but I don't find the equivalent event for WPF.

 

Can you help me ?

 

Thank you.

Vladimir Stoyanov
Telerik team
 answered on 06 Nov 2017
9 answers
991 views
How do I hide the current row highlight of a grid?
Stefan
Telerik team
 answered on 06 Nov 2017
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?