WinForms Charts How to Invoke the Chart Wizard at Runtime

Similar documents
WinForms Charts How to Determine the Chart Element underneath. the Mouse Cursor and Display Series Point s Data in a Tooltip

ASPxperience Client-Side Manipulation: Using Client APIs and Handling Client-Side Events

Tutorial - Hello World

Introduction to using Visual Studio 2010 to build data-aware applications

Developing an app using Web Services, DB2, and.net

Creating a new CDC policy using the Database Administration Console

Web Service Input Actions

Using VO Windows in a.net Windows Form Application

TOP Server Client Connectivity Guide for National Instruments' LabVIEW

MFC One Step At A Time By: Brandon Fogerty

Understanding Events in C#

Math 1525 Excel Lab 1 Introduction to Excel Spring, 2001

Menus. You ll find MenuStrip listed in the Toolbox. Drag one to your form. Where it says Type Here, type Weather. Then you ll see this:

Starting Visual Studio 2005

SlickEdit Gadgets. SlickEdit Gadgets

Batch Alignment. This can help you save time when you are authoring items for an assessment.

Programming with ADO.NET

Web Service Elements. Element Specifications for Cisco Unified CVP VXML Server and Cisco Unified Call Studio Release 10.0(1) 1

Your First Windows Form

182 Introduction to Microsoft Visual InterDev 6 Chapter 7

Menus and Printing. Menus. A focal point of most Windows applications

How to use data sources with databases (part 1)

ComponentOne. FlexPivot for WinForms

Excel Programming with VBA (Macro Programming) 24 hours Getting Started

Kepware Technologies KEPServerEX Client Connectivity Guide for National Instruments' LabVIEW

Instructions for writing Web Services using Microsoft.NET:

BASICS OF SPATIAL MODELER etraining

Part I. Integrated Development Environment. Chapter 2: The Solution Explorer, Toolbox, and Properties. Chapter 3: Options and Customizations

DecisionPoint For Excel

Table of Contents. Table of Contents

Note that each button has a label, specified by the Text property of the button. The Text property of the group box is also visible as its title.

Skinning Manual v1.0. Skinning Example

Management Reports Centre. User Guide. Emmanuel Amekuedi

Getting Started with Team Coding Applicable to Toad for Oracle Suite 2016 (v12.9) and higher

In this exercise you will gain hands-on experience using STK X to embed STK functionality in a container application created with C#.

Market Insight How to Import Data (Virtual Variable)

Apply a Design Pattern

ArtOfTest Inc. Automation Design Canvas 2.0 Beta Quick-Start Guide

Visual Studio.NET enables quick, drag-and-drop construction of form-based applications

Chapter 2. Ans. C (p. 55) 2. Which is not a control you can find in the Toolbox? A. Label B. PictureBox C. Properties Window D.

Sequence Kinetics SP1 Release Notes. Issue Date: 9 th December 2012

CALLING AN OPENEDGE WEB SERVICE

Sparkline for ASP.NET WebForms

Track Changes in MS Word

Tackle Complex Data Binding in WinForms 2.0

ComponentOne. MultiSelect for WinForms

Lab: Supplying Inputs to Programs

A Quick Tour GETTING STARTED WHAT S IN THIS CHAPTER?

Microsoft Partner Day. Introduction to SharePoint for.net Developer

Tutorial :.Net Micro Framework et.net Gadgeteer

Contents 1. Table of Contents. Report Server (Home Page) Installation. Manage Reports DevExpress Inc.

ADO.NET 2.0. database programming with

Getting Microsoft Outlook and Salesforce in Sync

PHOTO BOOK CREATION GUIDE

C# Programming: From Problem Analysis to Program Design 2nd Edition. David McDonald, Ph.D. Director of Emerging Technologies. Objectives (1 of 2)

Image Data Binding. Save images in database An image needs large amount of storage space. Only binary variable length fields may hold images.

Getting Microsoft Outlook and Salesforce in Sync

How To Create a Report in Report Studio

CHANNEL9 S WINDOWS PHONE 8.1 DEVELOPMENT FOR ABSOLUTE BEGINNERS

Supporting Non-Standard Development Configurations

KINETICS CALCS AND GRAPHS INSTRUCTIONS

CALENDAR CREATION GUIDE

TOP SERVER V5 CLIENT CONNECTIVITY ROCKWELL FACTORYTALK VIEW STUDIO. Table of Contents

Form Properties Window

How to Install and Setup VoIPOffice Communicator for Mac

Programming Using C# QUEEN S UNIVERSITY BELFAST. Practical Week 7

Interactive Graphing. Overview

The first program we write will display a picture on a Windows screen, with buttons to make the picture appear and disappear.

Enterprise Generation Language (EGL) for IBM i operating system Create a web application using EGL and the Data Access Application Wizard

Date : June 3, IBM Cognos Open Mic. Extensible Visualization to Cognos Active Reports IBM Corporation

CSC207 Week 4. Larry Zhang

Tutorial 1: Simple Parameterized Mapping

How to perform a custom RAID configuration in DS for Dell 2.0

Switch Web Event Handler

How to Integrate SAP xmii Services with Web Dynpro Java

This page intentionally left blank

KingSCADA Quick Start Manual How to create a new project

ADF Mobile Code Corner

COPYRIGHTED MATERIAL. Part I: Getting Started. Chapter 1: IDE. Chapter 2: Controls in General. Chapter 3: Program and Module Structure

61A Lecture 2. Friday, August 28, 2015

Getting started 7. Setting properties 23

Data Binding. Data Binding

Visual Studio.NET.NET Framework. Web Services Web Forms Windows Forms. Data and XML classes. Framework Base Classes. Common Language Runtime

Exercise 1: Adding business logic to your application

Toolkit Activity Installation and Registration

OnCommand Insight 6.3 Data Warehouse Custom Report Hands-on Lab Guide

How to Create a Windows Form Applcation in Visual C++/CLR 2012: Exploiting the power of Visual C++/CLR 2012

Intro to PiWeb Designer

Skill Area 336 Explain Essential Programming Concept. Programming Language 2 (PL2)

InfoMaster REPORT DESIGNER

Installation and Usage Manual

IBSDK Quick Start Tutorial for C# 2010

INTRODUCTION TO VISUAL BASIC 2010

Describe the Squirt Studio

Tutorial 03 understanding controls : buttons, text boxes

Developing for Mobile Devices Lab (Part 1 of 2)

Embedding Graphics in JavaDocs (netbeans IDE)

Using Functions in Alice

Display No Data Content for RAVE visualizations used in IBM Cognos Report Studio

SAMLab Tip Sheet #4 Creating a Histogram

Transcription:

WinForms Charts How to Invoke the Chart Wizard at Runtime As you may already know, most DevExpress WinForms Controls come with extremely powerful and easy-to-use designers that help you customize them within Visual Studio. But it doesn t end there, some of the designers are available independently as well and can be invoked at runtime! The XtraCharts control for WinForms enables you to offer your end-users the same powerful designtime customization options that you have come to enjoy and expect from our products. In this video, you will learn how to invoke the Chart Wizard to customize and create a new data bound chart at runtime. So let s get started 1. I ll start with a new WinForms application. 2. For the purpose of this example, I m going to work with a small list of data. 3. I switch over to code view.

4. In the Form1.cs file, I add the following small class. public class CountryInfo public CountryInfo(string name, int population) this.name = name; this.population = population; private string name; public string Name get return name; set name = value; private int population; public int Population get return population; set population = value; 5. Next, I ll create a class-level list object within the Form1 class. List<CountryInfo> list = new List<CountryInfo>(); 6. Inside the form s load event, I ll add the following code to populate the list with some custom data. list.addrange(new CountryInfo[] new CountryInfo("Bahamas", 301800), new CountryInfo("Bahrain", 688300), new CountryInfo("Bangladesh", 144319600), new CountryInfo("Barbados", 279300), new CountryInfo("Brunei", 372400), new CountryInfo("Bulgaria", 7450300) ); 7. I switch back to design-view. 8. Here I want to add a button onto the form that when clicked will invoke the Chart Wizard and allow the end-user to customize and create a new chart at runtime. 9. From the Toolbox, I drag and drop a SimpleButton onto the form.

10. I set its Text property to Create New Chart. 11. I double-click on the button to create a handler for its Click Event. 12. Before going any further, I need to add references to the DevExpress.XtraCharts and DevExpress.XtraCharts.Wizard namespaces. 13. I go back to the event handler. 14. First, I create a ChartControl object. 15. I set its DataSource property to list 16. This is the custom list of data I created earlier. 17. Next, I create a new ChartWizard and specify the chart instance for which this wizard will be created. 18. I ll call its ShowDialog method to display the wizard. 19. Finally, I need to add the code to display the actual chart when the wizard has completed. 20. For this, I create a new form. 21. I ll use the Controls.Add method to add the chart control to its Controls Collection. 22. Additionally, I set the chart s Dock property to DockStyle.Fill so that it fills the entire client area. 23. And the Show method of the form object is called to display the form. 24. And that s it! ChartControl chart = new ChartControl(); chart.datasource = list; ChartWizard cwiz = new ChartWizard(chart); cwiz.showdialog(); Form form = new Form(); form.controls.add(chart); chart.dock = DockStyle.Fill; form.show();

25. I run the application to see the results. 26. I click on the Create New Chart button and the DevExpress Chart Wizard is invoked. 27. You can see all the chart types available to the end-user. 28. For the purposes of this example, I ll select the Bar chart. 29. Now I need to configure the chart and how it is going to display the data. 30. From the Construction group on the left, I click on the Series link. 31. This brings up the Series Editor on the right. 32. Since I don t need two series for this demo, I ll select the second one and click on Remove. 33. I switch to the Data page. 34. I click on the Series Binding tab to specify the Argument and Value fields for the chart.

35. I set Argument property to the Name field. 36. The Value property is set to the Population field. 37. And that s it! 38. I can go on and further customize all the visual aspects of my chart, but to keep this video simple, I ll finish here. 39. I click Finish to complete the wizard. 40. You can see a new chart created based on the settings I specified using the Chart Wizard at runtime! For more information, please refer to the XtraCharts Documentation (http://www.devexpress.com/help/?document=xtracharts). Thanks for watching and thank you for choosing DevExpress!