Telerik Forums
UI for WPF Forum
3 answers
220 views
Hi,

i have a chart based on a list of some X,Y-Values displayed by the ScatterLineSeries. Everything works fine so far. 

Now I need to be able to zoom in to the chart, but after adding the ChartPanAndZoomBehavior the line “jumps” between the points during zooming or moving.  
See attached image for an example. On the first image the line is correct, on the secon image after moving the chart or continuing zooming the point 3 is no longer part of the line.

How can I assure, that the line does not change during zooming in?


Thanks,
Carsten



Some parts of the XAML
          <telerik:RadCartesianChart.Resources>
 <DataTemplate x:Key="DataPoint">
              <Ellipse Width="8"
                     Height="8"
                     Fill="DarkGray"
                     ToolTip="{Binding DataItem.ToolTipText}"/>
            </DataTemplate>
            <Style TargetType="telerik:PanZoomBar">
              <Setter Property="Visibility" Value="Collapsed"/>
            </Style>
          </telerik:RadCartesianChart.Resources>
  
          <telerik:RadCartesianChart.Behaviors>
            <telerik:ChartSelectionBehavior 
            DataPointSelectionMode="Single" 
            HitTestMargin="4"/>

            <telerik:ChartPanAndZoomBehavior
            MouseWheelMode="Zoom"
            DragMode="Pan"
            ZoomMode="Both"/>
            
          </telerik:RadCartesianChart.Behaviors>

          <telerik:RadCartesianChart.Grid>
            <telerik:CartesianChartGrid MajorLinesVisibility="XY" />
          </telerik:RadCartesianChart.Grid>

          <telerik:RadCartesianChart.HorizontalAxis>
            <telerik:LinearAxis LabelFitMode="MultiLine" Minimum="0">
              <telerik:LinearAxis.LabelTemplate>
                <DataTemplate>
                  <StackPanel Orientation="Horizontal">
                    <TextBlock Text="{Binding}"/>
                    <TextBlock Text="..."/>
                  </StackPanel>
                </DataTemplate>
              </telerik:LinearAxis.LabelTemplate>
            </telerik:LinearAxis>
          </telerik:RadCartesianChart.HorizontalAxis>

          <telerik:RadCartesianChart.VerticalAxis>
            <telerik:LinearAxis Minimum="0" >
              <telerik:LinearAxis.LabelTemplate >
                <DataTemplate>
                  <StackPanel Orientation="Horizontal">
                    <TextBlock Text="{Binding}"/>
                    <TextBlock Text="..."/>
                  </StackPanel>
                </DataTemplate>
              </telerik:LinearAxis.LabelTemplate>
            </telerik:LinearAxis>

          </telerik:RadCartesianChart.VerticalAxis>

          <telerik:ScatterLineSeries
          PointTemplate="{StaticResource DataPoint}"
          ItemsSource="{Binding myCurveName.CurvePoints}"
          XValueBinding="myXValuePropertyName" 
          YValueBinding="myYValuePropertyName" >
         </telerik:ScatterLineSeries>
Petar Marchev
Telerik team
 answered on 13 Feb 2014
5 answers
126 views
Trying to dynamically create TileGroups in code behind, but for some reason, Telerik.Windows.Controls doesn't not contain the TileGroup type.

Any help?
Maya
Telerik team
 answered on 13 Feb 2014
6 answers
438 views
hi i am having troubles reusing the one of the tab content
i need to dynamically adding tab with the given content. but i tried all the method i can that couldnt help me loading the xaml into tab

i need to load xaml usercontrol into 2nd radtabcontrol/radtabItems
thanks in advance

<telerik:RadTabItem Padding="4 3" x:Name="radTabLoanDetails">
                <telerik:RadTabItem.Header>
                    <TextBlock Text="Loan Detials"  Margin="19 2 19 0" />
                </telerik:RadTabItem.Header>
                <telerik:RadTabItem.Content>
                    <Border   Style="{StaticResource borderStyle}" >
                        <telerik:RadTabControl x:Name="newTab" />
                    </Border>
                </telerik:RadTabItem.Content>
            </telerik:RadTabItem>

Zarko
Telerik team
 answered on 12 Feb 2014
2 answers
175 views
Hi Guys,

we are showing a simple doughnut series chart and would like to implement drilldown after user selects a part

<telerik:RadPieChart>
            <telerik:RadPieChart.Series>
            <telerik:DoughnutSeries  ShowLabels="False" ItemsSource="{Binding Items}" ValueBinding="Value">
                    
                <telerik:DoughnutSeries.LabelDefinitions>
                        <telerik:ChartSeriesLabelDefinition Binding="Name"/>
                    </telerik:DoughnutSeries.LabelDefinitions>
 
                    <telerik:DoughnutSeries.LegendSettings>
                        <telerik:DataPointLegendSettings TitleBinding="Name" />
                </telerik:DoughnutSeries.LegendSettings>                  
 
                </telerik:DoughnutSeries>
            </telerik:RadPieChart.Series>
             
            <telerik:RadPieChart.Behaviors>
                <telerik:ChartSelectionBehavior DataPointSelectionMode="Single"
                                                SelectionChanged="ChartSelectionBehavior_SelectionChanged"   />
            </telerik:RadPieChart.Behaviors>
        </telerik:RadPieChart>

The ChartSelectionBehavior_SelectionChanged is never fired.

Note that this works fine with PieSeries, but does not work with DoughnutSeries

Any ideas?
Stevo
Stevo
Top achievements
Rank 1
 answered on 12 Feb 2014
1 answer
173 views
I read this table http://www.telerik.com/help/wpf/touch-support.html
What events generated for tab control? Swipe, example?
Boris
Telerik team
 answered on 12 Feb 2014
1 answer
246 views
Hello,
I'm using the Telerik Web Editor, downloading the HTML and loading it into the RichTextBox. What do I need to do to make the RichTextBox look like the web editor?
Specifically, the bulleted lists do not match. At times, users will paste lists from Word into the web editor, and it looks great. If I get the HTML from the editor and reload it back into the editor, it looks the same, but if I load the HTML into the RichTextBox on the desktop, the bulleted list is not right. Here's my WPF code. Loading the following HTML into the web editor looks good, but loading into the RichTextBox on the desktop does not look right.

Thanks,
Scott

HtmlFormatProvider provider = new HtmlFormatProvider();           
string s = "<span style=\"font-family: Calibri;\">\r\n<ul style=\"list-style-type: square;\">\r\n    <li><span style=\"font-family: Wingdings;\">&micro;</span><span style=\"font-family: Calibri;\">You</span>\r\n    <ul style=\"list-style-type: circle;\">\r\n        <li><span style=\"font-family: Calibri;\">Are</span>\r\n        <ul style=\"list-style-type: square;\">\r\n            <li><span style=\"font-family: Calibri;\">Here</span>\r\n            <ul style=\"list-style-type: square;\">\r\n                <li><span style=\"font-family: Calibri;\">Yes</span></li>\r\n            </ul>\r\n            </li>\r\n        </ul>\r\n        </li>\r\n    </ul>\r\n    </li>\r\n</ul>\r\n</span>";
radRichTextBox.Document = provider.Import(s);
Mihail
Telerik team
 answered on 12 Feb 2014
3 answers
172 views
Hello,
look at the two attached screen shots: the Normal image displays the window with a width large enough to display the full title, the Small image displays a window slightly smaller and the Smallest image displays an even smallest window. As you can see, the Small image displays not fully the title, even if it remains plenty of white space; and the Smallest image displays the title left aligned, with missing parts and plenty of empty space at the right.
This is with the Office2013 theme.
Note also that the font for the title is too small.
Patrick
Martin Ivanov
Telerik team
 answered on 12 Feb 2014
1 answer
211 views
Dear Telerik Team!

I have problem setting tab navigation using rad menu control. I have a simple form with 3 textboxes and rad menu containing 2 items. When first textbox is focused and I press tab, the next textbox control gets focus and it works as expected. When last rad menu item gets focus and I press tab, the first rad menu item gets focus and focus never gets back to the first textbox. From now on only rad menu items get focused when the tab is pressed. Can you please help me to get it work correcty? Here is my xaml:
<Window.Resources>
        <Style x:Key="RadMenuItemBaseStyle" TargetType="telerikNavigation:RadMenuItem">
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=MainBrush}" />
            <Setter Property="BorderThickness" Value="0" />
            <Setter Property="HorizontalContentAlignment" Value="Left" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="FontSize" Value="{telerik:Windows8Resource ResourceKey=FontSize}" />
            <Setter Property="FontFamily" Value="{telerik:Windows8Resource ResourceKey=FontFamily}" />
            <Setter Property="SnapsToDevicePixels" Value="True" />
            <!--<Setter Property="FocusVisualStyle" Value="{x:Null}" />-->
        </Style>
        <ControlTemplate TargetType="telerik:RadMenuItem" x:Key="LightMenuItemTemplate">
            <Border Name="border" BorderThickness="0"  BorderBrush="Gray"   CornerRadius="0" Background="{TemplateBinding Background}">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="10"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock  Name="contentDescription"   Foreground="Gray"
                             Text="{TemplateBinding Header}" TextWrapping="Wrap" HorizontalAlignment="Center" Grid.Column="2"/>
                </Grid>
            </Border>
            <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter TargetName="border" Property="BorderBrush" Value="LightGray" />
                    <Setter TargetName="border" Property="BorderThickness" Value="0" />
                    <Setter Property="Opacity" Value="0.5" />
                </Trigger>
                <Trigger Property="IsFocused" Value="False">
                    <Setter TargetName="border" Property="BorderBrush" Value="#FF282828" />
                </Trigger>
                <Trigger Property="IsEnabled" Value="False">
                    <Setter TargetName="border" Property="Opacity" Value="0.4" />
                    <Setter Property="Foreground" Value="Gray" />
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
        <Style x:Key="MenuItem" TargetType="telerik:RadMenuItem" BasedOn="{StaticResource RadMenuItemBaseStyle}">
            <Setter Property="OverridesDefaultStyle" Value="True"/>
            <Setter Property="Margin" Value="5"/>
            <Setter Property="Padding" Value="5"/>
            <Setter Property="Width" Value="Auto"/>
            <Setter Property="FontFamily" Value="Segoe UI"/>
            <Setter Property="Foreground">
                <Setter.Value>
                    <SolidColorBrush Opacity="0.05" Color="White"/>
                </Setter.Value>
            </Setter>
            <Setter Property="Background" Value="White"/>
            <Setter Property="Template" Value="{StaticResource LightMenuItemTemplate}"></Setter>
        </Style>
        <Style x:Key="RadMenuStyle" TargetType="telerikNavigation:RadMenu">
            <Setter Property="IconColumnWidth" Value="27" />
            <Setter Property="BorderBrush" Value="{telerik:Windows8Resource ResourceKey=BasicBrush}" />
            <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=AccentBrush}" />
            <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=MarkerBrush}" />
            <Setter Property="BorderThickness" Value="0" />
            <Setter Property="Padding" Value="1 0" />
            <Setter Property="FocusVisualStyle" Value="{x:Null}" />
            <Setter Property="ItemsPanel">
                <Setter.Value>
                    <ItemsPanelTemplate >
                        <themes:RadWrapPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerikNavigation:RadMenu}}}" IsAnimated="False" />
                    </ItemsPanelTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="telerikNavigation:RadMenu" >
                        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <ItemsPresenter Margin="{TemplateBinding Padding}"  />
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="LightMenu" TargetType="telerik:RadMenu" BasedOn="{StaticResource RadMenuStyle}">
            <Setter Property="Background" Value="White"></Setter>
            <Setter Property="Foreground" Value="Gray"></Setter>
        </Style>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>
        <TextBox Grid.Row="0" TabIndex="0" Text="1" />
        <TextBox Grid.Row="1" TabIndex="1" Text="2" />
        <TextBox Grid.Row="2" TabIndex="2" Text="3" />
        <telerik:RadMenu Style="{DynamicResource LightMenu}" Grid.Row="3" FontStyle="Normal" Foreground="Azure" FontFamily="Arial" FlowDirection="RightToLeft" Height="30" HorizontalAlignment="Right" Margin="0,0,0,0" Name="radMenu" VerticalAlignment="Bottom" Width="400" >
            <telerik:RadMenuItem Style="{DynamicResource MenuItem}" Header="Cancel" x:Name="rmiCancel" VerticalAlignment="Top" TabIndex="4" />
            <telerik:RadMenuItem Style="{DynamicResource MenuItem}" Header="Yes" x:Name="rmiOK" VerticalAlignment="Top" TabIndex="3" />
        </telerik:RadMenu>
    </Grid>

Many thanks for any help and best regards
Krzysztof Kaźmierczak
Kalin
Telerik team
 answered on 12 Feb 2014
8 answers
316 views
Hi All
I have a RadGridView in my code of the namespace "Telerik.Windows.Controls.RadGridView". I need to iterate through the rows and get all the data. I am using the code as :
IList<GridViewRow> rows = RadGridView1.ChildrenOfType<GridViewRow>();
foreach (GridViewRow row in rows)
 {if (!(row is GridViewNewRow))
{foreach (var x in row.Cells)
                    {
                        GridViewCell y = (GridViewCell)x;
                        System.Diagnostics.Debug.WriteLine(y.Value);     
                    }}}

The value comes as null if the column if is of type checkbox. I need some generic code to get the value. 

Anybody any idea about this ??









Dimitrina
Telerik team
 answered on 12 Feb 2014
1 answer
90 views
Hello,
look at these screenshots, with the ribbon set to automatically collapse.
WithScroller shows the application with a width set to display a scroller, with large icons.
SlightlySmaller shows the same application, with its width reduced: some icons are sets to medium and the scroller is gone.
It seems that the trigger to have medium icons is set too late.
Patrick
Martin Ivanov
Telerik team
 answered on 12 Feb 2014
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
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?