Telerik blogs
  • Desktop

    Showing 4 Data Points At Once: Financial Chart

    Most charts show one point at a time on a Cartesian (x/y) coordinate. That is, a single point might indicate that July sales were $525MM while August sales (a second point) were $350MM. The chart might also show a line connecting the two points to show the change in value. But each individual entry is typically a single point on the coordinate system. With stocks, we’d like to show four bits of information for each entry: the opening price, the closing price, the high for the day, the low for the day. There is no good way to do this by drawing points on an...
    August 30, 2012
  • Web

    RadControls for Metro (XAML)–Date and Time Pickers

    Surprisingly, Visual Studio for Windows 8 XAML does not come with either a date or a time picker. Not to worry, we’ve got you covered. The RadControls For Metro suite of controls includes a very flexible DatePicker and TimePicker control that I’ll illustrate in this posting. To get started, be sure to add a reference to the RadControls for Metro to your application. As usual, we’ll begin with the data. This time the data is very simple. We start by creating a class representing a hotel or conference reservation, public class Reservation   {       public DateTime ArriveDate { get; set; }       public DateTime DepartDate { get; set; }   } Notice that the two properties are of...
    August 27, 2012
  • Mobile

    Windows 8 & Data Binding. Part 5–Binding to Lists

    In Part 4 of this mini-series on data binding we looked at Data Conversion.  Today we look at binding a UI Element to a list of objects. The trick in binding to a list, is to teach the control how to display the bound data. It needs to know how to display each object in the list – what properties of the object should be displayed and how should they appear? You do this most often with a DataTemplate – a template that will be reproduced for each member of the collection. In the next example we create an Employee class. Each Employee...
    August 21, 2012
  • Mobile

    Creating a Bar Chart with RadCartesianChart, part of Telerik Windows 8 UI Controls

    In an earlier blog post I reviewed how to create a line chart using RadChart for Metro. In this blog post I will review how to create a bar chart, and no doubt you will notice some striking similarities. All of this is done with the Telerik Windows 8 UI Controls. We’ll begin with the data.  Our bar chart will compare revenues for five stores. [ Click on the image to see full size ] Our first class will define the StoreRevenue type and will have a static method to generate some sample data (normally, of course, you would get this data from a...
    August 20, 2012
  • Mobile

    Windows 8 & Data Binding. Part 4–Data Conversion

    In Part 3 of this little mini-series on data binding in Windows 8 we looked at Element Binding. Today, we’ll take a look at Data Conversion. At times the data in your business object (the source for your binding) and the target UIElement may not have an exact type match. For example, if your Employee class wants to keep track of the start date for each Employee, a sensible way to do so is with a DateTime object. However, when we display that data we’ll want to use a Text object, and we may not want the entire default conversion of...
    August 17, 2012