Telerik Forums
UI for WPF Forum
1 answer
175 views
Hi,
 
I have a need to have a movable slider on line charts. The way it should work is as follows:
 
1. Slider/Cursor should be parallel to Y-axis i.e. vertical axis
 
2. When user moves this slider, corresponding/intersecting Y values on all graphs show up in labels just like a stock ticker chart.
  3 the value of intersecting line should be displayed in label

 


 
Thanks,
avinash
Petar Marchev
Telerik team
 answered on 01 Nov 2013
2 answers
236 views
Hello,

I wonder if it is possible to combine stack and cluster bars to have something like the image that I am attaching.

So far I can create Bar series with combine mode stack or cluster but not both.

I am creating the series in the code behind like this:

BarSeries barSer = new BarSeries();
barSer.ShowLabels = true;
barSer.CombineMode = ChartSeriesCombineMode.Stack;
 
// or
 
BarSeries barSer = new BarSeries();
barSer.ShowLabels = true;
barSer.CombineMode = ChartSeriesCombineMode.Cluster;
 
foreach (DataRow dr in dtData.Rows)
            {
                barSer.DataPoints.Add(new CategoricalDataPoint() { Category = dr["Name"], Label = string.Format("{0:N}", dr["Value"]), Value = double.Parse(dr["Value"].ToString()) });
                 
            }

Thanks in advance.

Alberto
Alberto
Top achievements
Rank 1
 answered on 31 Oct 2013
9 answers
720 views
Hi,

I have in my App a RadScheduleView. Its theme is set to Windows8Theme in xaml :

<telerik:RadScheduleView x:Name="ScheduleView"
                         MinTimeRulerExtent="400"
                         MaxTimeRulerExtent="1920"
                         AppointmentNavigationButtonsVisibility="Never"
                         ToolTipTemplate="{StaticResource AppointmentToolTipTemplate}"
                         telerik:StyleManager.Theme="Windows8"
                         GroupHeaderContentTemplateSelector="{StaticResource GroupHeaderContentTemplateSelector}"/>

this theme is definitive, but I would like to be able to change the theme's AccentColor at runtime, so I wrote a method to do this:

public static void ChangeTheme(ColorTheme theme)
{
    var app = (App)Application.Current;
    if (theme == app.CurrentTheme) return;
     
    app.Resources.MergedDictionaries.Clear();
    AddResourceDictionary("resources/Common.xaml");
    AddResourceDictionary("resources/GeneralResources.xaml");
    AddResourceDictionary("resources/MenuResources.xaml");
    AddResourceDictionary("resources/DataGridResources.xaml");
    AddResourceDictionary("resources/DatePickerResources.xaml");
 
    app.CurrentTheme = theme;
    try { AddResourceDictionary(string.Format(CultureInfo.InvariantCulture, "themes/{0}.xaml", theme)); }
    catch { AddResourceDictionary("themes/Default.xaml"); }
 
    Windows8Palette.Palette.AccentColor = (Color)Application.Current.Resources["ThemeColor"]; // pour le calendrier
 
}
 
private static void AddResourceDictionary(string source)
{
    var resourceDictionary = Application.LoadComponent(new Uri(source, UriKind.Relative)) as ResourceDictionary;
    Application.Current.Resources.MergedDictionaries.Add(resourceDictionary);
}

My issue is quite simple: the ScheduleView's color is always exactly one color late. i.e.:
let's say I have 3 theme colors : green, red, blue. Blue is the color at the beginning. I call the method to set the color to red, it stays blue. I call the method to set green, it becomes red, I call the color to set blue again, it becomes green, and so on...

can anybody tell me what I am doing wrong? I am at a complete lost as to how on earth this behaviour is possible...

Edit: I forgot a potentially usefull piece of information: this used to work with earlier versions of the telerik libraries (Q3 2012 as far as I remember). At the time, I used Windows8Colors.PaletteInstance, though, as it was not yet flagged as Obsolete.


Rosen Vladimirov
Telerik team
 answered on 31 Oct 2013
15 answers
347 views
I am trying to bind the DataForm ItemsSource to a DataTable. Initially the DataForm is populated, but if I try to navigate through the records, I get an error.

I have spent past hour searching for a solution, and I could not find any mention of this issue. DataForm works fine if binded to an ObservableCollection of business objects. But in this case I need it binded to a DataTable, and I cant seem to find a way to get it working.

IDE: VS2010
.Net Version: 4.0
Telerik Version: 2011.3.1220.40

I have created a sample project that recreates the same issue. The error that I receive when navigating through the records is:

The type 'DataRowView' does not contain a public property named 'DateTime'.
Parameter name: propertyName


<Window xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  x:Class="Testing.DataForm.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <telerik:RadDataForm Name="dataForm"/>
    </Grid>
</Window>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Data;
 
namespace Testing.DataForm
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
 
        public MainWindow()
        {
            InitializeComponent();
            GenerateSomeData();
        }
 
        private void GenerateSomeData()
        {
            #region Data Generator
 
            DataTable baseTable = new DataTable();
            baseTable.Columns.Add("DateTime", typeof(DateTime));
            baseTable.Columns.Add("Value", typeof(decimal));
 
            DateTime date = new DateTime(DateTime.Now.Year, 11, 1);
 
            TimeSpan span = date.AddMonths(1).AddDays(-1) - date;
 
            int numDays = span.Days;
            int randHigh = 65;
            int randLow = 0;
 
            #region RANDOM DATA GENERATOR
 
            Random rand = new Random();
 
 
            int calculatedNumHours = 24 * numDays;
            for (int hour = 1; hour <= calculatedNumHours; hour++)
            {
                baseTable.Rows.Add(new object[]
                {
                    date.AddHours(hour).AddSeconds(-1),
                    rand.NextDouble() * ((randHigh - randLow) + randLow)
                });
            }
 
            #endregion
 
            dataForm.ItemsSource = baseTable.DefaultView;
 
            #endregion
        }
    }
}
Dimitrina
Telerik team
 answered on 31 Oct 2013
7 answers
335 views
Hello,

I'm using RadCartesianChart with multiple series (each series contains thousand of data points). I enabled ChartTrackBallBehavior (

<telerik:ChartTrackBallBehavior ShowIntersectionPoints="False" ShowTrackInfo="True" SnapMode="AllClosePoints" TrackInfoUpdated="ChartTrackBallBehavior_OnTrackInfoUpdated"/>) . Now in TrackInfoUpdated a would like find closest data point. Unfortunately property Context.ClosestDataPoint of TrackBallInfoEventArgs always returns first datapoint of first series regardless which datapoint is really closest. How can I detect really closest data point?

Thanks for help.

David

Avneesh
Top achievements
Rank 1
 answered on 31 Oct 2013
3 answers
153 views

Hi,

I'm facing a serious problem using RadCartesianChart.



Sometimes i receive this exception :

'-1' is not a valid value for property 'Height'.   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at System.Windows.FrameworkElement.set_Height(Double value)
   at Telerik.Windows.Controls.ChartView.PresenterBase.ArrangeUIElement(FrameworkElement presenter, RadRect layoutSlot, Boolean setSize)
   at Telerik.Windows.Controls.ChartView.PointTemplateSeries.UpdatePresenters(ChartLayoutContext context)
   at Telerik.Windows.Controls.ChartView.PointTemplateSeries.UpdateUICore(ChartLayoutContext context)
   at Telerik.Windows.Controls.ChartView.PresenterBase.UpdateUI(ChartLayoutContext context)
   at Telerik.Windows.Controls.ChartView.RadChartBase.UpdateUICore(ChartLayoutContext context)
   at Telerik.Windows.Controls.ChartView.PresenterBase.UpdateUI(ChartLayoutContext context)
   at Telerik.Windows.Controls.ChartView.RadChartBase.CallUpdateUI()
   at Telerik.Windows.Controls.ChartView.RadChartBase.OnInvalidated()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)




After this exception the control stops working. Have you an idea ?



Thanks a lot by advance







Petar Marchev
Telerik team
 answered on 31 Oct 2013
3 answers
167 views
Hi,

I wants to save the document in my custom format. 

How to save it and how to write this code.

If you provide any demo it will very helpfull to me.

Thanks
Ajita
Ajita
Top achievements
Rank 1
 answered on 31 Oct 2013
9 answers
342 views
Hi,

I downloaded the source project with the RadPaneGroupRegionAdapter from here:

Using the RadDocking control with Prism 

And I updated the reference and the bootstrapper to use the Prism 4 November release. Then I found it's no longer working. 

There is no exceptions, just that the RadPane's are not showing.

Following are the only code change I made, (all inside bootstrapper):

using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
 
using Telerik.Windows.Controls;
using Microsoft.Practices.Prism.UnityExtensions;
using Microsoft.Practices.Prism.Regions;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Unity;
 
 
namespace RadDockingAndPRISM
{
    public class Bootstrapper : UnityBootstrapper
    {
        protected override RegionAdapterMappings ConfigureRegionAdapterMappings()
        {
            var mappings = base.ConfigureRegionAdapterMappings();
 
            mappings.RegisterMapping(typeof(RadPaneGroup), ((IUnityContainer)Container).Resolve<RadPaneGroupRegionAdapter>());
 
            return mappings;
        }
 
        protected override DependencyObject CreateShell()
        {
            Shell shell = Container.Resolve<Shell>();
#if SILVERLIGHT
            App.Current.RootVisual = shell;
#else
            shell.Show();
#endif
 
            return shell;
        }
 
        //protected override IModuleCatalog GetModuleCatalog()
        //{
        //    var catalog = new ModuleCatalog();
        //    catalog.AddModule(typeof(ModuleA.ModuleA));
        //    catalog.AddModule(typeof(ModuleB.ModuleB));
        //    return catalog;
        //}
 
        protected override void ConfigureModuleCatalog()
        {
            base.ConfigureModuleCatalog();
            ((ModuleCatalog)ModuleCatalog).AddModule(typeof(ModuleA.ModuleA));
            ((ModuleCatalog)ModuleCatalog).AddModule(typeof(ModuleB.ModuleB));
 
 
        }
    }
}

Could you please help? Thanks!

Vladi
Telerik team
 answered on 31 Oct 2013
1 answer
91 views
Is there any way to subscribe to mouse events on a line series that is rendered in light mode? I tried testing some mouse events (enter, move, leave, mousedown) and they work when the line series is set to full mode, but not when it's light. I've been wondering if this is because of a lack of a clickable area in the extremely thinly rendered line series or if it's because of the mechanism in which a light series is rendered.

If there's documentation about what is available/unavailable when the series is rendered in Light Mode, could I be linked to it? Thank you!
Ves
Telerik team
 answered on 31 Oct 2013
2 answers
135 views
I am facing an interesting problem with the RadRichTextBox. I assemble a document converting documents to fragments, and the documents that contain the fragments can contain merge fields. There will only be a single merge. The assembled document is displayed in a RadRichTextBox that I want to display with the merged values, meaning that I display this RadRichTextBox with "Document.ChangeAllFieldsDisplayMode(FieldDisplayMode.Result)". A second RadRichTextBox displays the document used for assembly, depending on the fragment selected.

Seems like things are working well with the merge fields except that the values can change, and the changes are not reflected in the assembled document. When I change the ChangeAllFieldsDisplayMode back and forth the changed will be displayed. Any good way to fix this problem?
Clifford
Top achievements
Rank 1
 answered on 30 Oct 2013
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
DataPager
PersistenceFramework
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
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?