Click here to Skip to main content
12,246,601 members (44,411 online)
Click here to Skip to main content

Stats

164.2K views
6.7K downloads
70 bookmarked
Posted

Interactive 3D bar chart custom control in WPF with rotation, touch-sense display, and databinding support

, 29 Mar 2009 CPOL
Create a WPF 3D Bar chart in your .NET application easily. You can create interactive 3D bar charts in seconds using this WPF 3D bar chart custom control. You can even databind your input to see the '3D chart bar change live as you enter your input' effect.
WPF3DChartDemo
Test3DChart.exe
Wpf3DChartTutorial.dll
Test3DChart
Test3DChart
bin
Debug
Test3DChart.exe
Test3DChart.vshost.exe
Test3DChart.vshost.exe.manifest
Visual Studio 2008
Settings
CurrentSettings.vssettings
Visualizers
attribcache90.bin
autoexp.dll
autoexpce.dll
Wpf3DChartTutorial.dll
Release
Test3DChart.exe
Test3DChart.vshost.exe
Test3DChart.vshost.exe.manifest
Wpf3DChartTutorial.dll
Properties
Visual Studio 2008
Backup Files
Test3DChart
Wpf3DChartTutorial
Wpf3DChartTutorial
bin
Debug
Visual Studio 2008
Backup Files
Test3DChart
Settings
CurrentSettings.vssettings
Wpf3DChartTutorial.dll
Release
Wpf3DChartTutorial.dll
Properties
Themes
wpf3d.JPG
Visual Studio 2008
Backup Files
Wpf3DChartTutorial
Wpf3DChartTutorial.csproj.user
// This file contains DisplayAttribute defines for types from Windows CE assemblies
// If any changes are made, its needs to be recompiled while referencing CE assemblies

#region Using directives

using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Security;
using WinForms = System.Windows.Forms;
using SQLTypes = System.Data.SqlTypes;

#endregion

// mscorlib
[assembly: DebuggerDisplay(@"\{Name = {Name} FullName = {FullName}}", Target = typeof(Type))]

// System.Drawing
[assembly: DebuggerDisplay(@"\{Name = {Name} Size={Size}}", Target = typeof(Font))]
[assembly: DebuggerDisplay(@"\{Name = {m_strName}}", Target = typeof(FontFamily))]
[assembly: DebuggerDisplay(@"\{Color = {m_color}}", Target = typeof(Pen))]
[assembly: DebuggerDisplay(@"\{X = {m_x} Y = {m_y}}", Target = typeof(Point))]
[assembly: DebuggerDisplay(@"\{X = {m_x} Y = {m_y} Width = {m_cx} Height = {m_cy}}", Target = typeof(Rectangle))]
[assembly: DebuggerDisplay(@"\{X = {m_x} Y = {m_y} Width = {m_cx} Height = {m_cy}}", Target = typeof(RectangleF))]
[assembly: DebuggerDisplay(@"\{Width = {m_cx} Height = {m_cy}}", Target = typeof(Size))]
[assembly: DebuggerDisplay(@"\{Width = {m_cx} Height = {m_cy}}", Target = typeof(SizeF))]
[assembly: DebuggerDisplay(@"\{Color = {m_color}}", Target = typeof(SolidBrush))]



// System.Windows.Forms
[assembly: DebuggerDisplay(@"\{Text = {Text}}", Target = typeof(WinForms::Button))]
[assembly: DebuggerDisplay(@"\{Text = {Text} CheckState = {CheckState}}", Target = typeof(WinForms::CheckBox))]
[assembly: DebuggerDisplay(@"\{Value = {Value} Min = {Minimum} Max = {Maximum}}", Target = typeof(WinForms::HScrollBar))]
[assembly: DebuggerDisplay(@"\{Index = {index}}", Target = typeof(WinForms::ItemChangedEventArgs))]
[assembly: DebuggerDisplay(@"\{Index = {m_iIndex} NewValue = {m_newCheckValue} CurrentValue = {m_CurrentValue}}", Target = typeof(WinForms::ItemCheckEventArgs))]
[assembly: DebuggerDisplay(@"\{KeyData = {m_keyData}}", Target = typeof(WinForms::KeyEventArgs))]
[assembly: DebuggerDisplay(@"\{KeyChar = {m_ch}}", Target = typeof(WinForms::KeyPressEventArgs))]
[assembly: DebuggerDisplay(@"\{SelectedItem = {Text}}", Target = typeof(WinForms::ListBox))]
[assembly: DebuggerDisplay(@"\{Text = {Text}}", Target = typeof(WinForms::ListViewItem))]
[assembly: DebuggerDisplay(@"\{X = {m_x} Y = {m_y} Button = {button}}", Target = typeof(WinForms::MouseEventArgs))]
[assembly: DebuggerDisplay(@"\{Value = {Value} Min = {Minimum} Max = {Maximum}}", Target = typeof(WinForms::NumericUpDown))]
[assembly: DebuggerDisplay(@"\{ClipRectangle = {m_rcClip}}", Target = typeof(WinForms::PaintEventArgs))]
[assembly: DebuggerDisplay(@"\{Value = {Value} Min = {Minimum} Max = {Maximum}}", Target = typeof(WinForms::ProgressBar))]
[assembly: DebuggerDisplay(@"\{Text = {Text} Checked = {Checked}}", Target = typeof(WinForms::RadioButton))]
[assembly: DebuggerDisplay(@"\{Bounds = {Bounds} WorkingArea = {WorkingArea}}", Target = typeof(WinForms::Screen))]
[assembly: DebuggerDisplay(@"\{MinExtra = {MinExtra} MinSize = {MinSize}}", Target = typeof(WinForms::Splitter))]
[assembly: DebuggerDisplay(@"\{Text = {Text}}", Target = typeof(WinForms::TextBox))]
[assembly: DebuggerDisplay(@"\{Interval = {m_msec}}", Target = typeof(WinForms::Timer))]
[assembly: DebuggerDisplay(@"\{{Value} Min = {Minimum} Max = {Maximum}}", Target = typeof(WinForms::TrackBar))]
[assembly: DebuggerDisplay(@"\{Text = {m_strText}}", Target = typeof(WinForms::TreeNode))]
[assembly: DebuggerDisplay(@"\{{Value} Min = {Minimum} Max = {Maximum}}", Target = typeof(WinForms::VScrollBar))]

[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(Exception))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(ApplicationException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(ArgumentException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(ArgumentNullException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(ArgumentOutOfRangeException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(ArithmeticException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(DivideByZeroException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(DllNotFoundException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(ApplicationException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(IndexOutOfRangeException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(InvalidCastException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(MemberAccessException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(MethodAccessException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(NullReferenceException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(StackOverflowException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(SystemException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(TypeLoadException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(FileNotFoundException))]
[assembly: DebuggerDisplay(@"\{{Message}}", Target = typeof(SecurityException))]

// The attributes below can be useful to uncomment if ToString evaluation is disabled. 
//
//[assembly: DebuggerDisplay("{Month}/{Day}/{Year} {Hour}:{Minute}:{Second}", Target = typeof(DateTime))]
//[assembly: DebuggerDisplay(@"\{Value = {Value}}", Target = typeof(WinForms::DateTimePicker))]
//[assembly: DebuggerDisplay(@"\{Text = {Text}}", Target = typeof(WinForms::LinkLabel))]
//[assembly: DebuggerDisplay(@"\{Text = {Text}}", Target = typeof(WinForms::Label))]
//[assembly: DebuggerDisplay(@"\{{SelectionStack = {SelectionStart} SelectionEnd = {SelectionEnd}}", Target = typeof(WinForms::MonthCalendar))]
//[assembly: DebuggerDisplay("{m_value}", Target = typeof(SQLTypes::SqlInt64))]
//[assembly: DebuggerDisplay("{m_value}", Target = typeof(SQLTypes::SqlDateTime))]
//[assembly: DebuggerDisplay("{m_value}", Target = typeof(SQLTypes::SqlInt32))]
//[assembly: DebuggerDisplay("{Value}", Target = typeof(SQLTypes::SqlMoney))]
//[assembly: DebuggerDisplay("{m_value}", Target = typeof(SQLTypes::SqlString))]
//[assembly: DebuggerDisplay("{m_value}", Target = typeof(SQLTypes::SqlSingle))]
//[assembly: DebuggerDisplay("{m_value}", Target = typeof(SQLTypes::SqlInt16))]
//[assembly: DebuggerDisplay("{m_value}", Target = typeof(SQLTypes::SqlByte))]
//[assembly: DebuggerDisplay("{m_value}", Target = typeof(SQLTypes::SqlDouble))]

namespace System.Diagnostics {

    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Delegate | AttributeTargets.Enum | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Assembly, AllowMultiple = true)]
    public sealed class DebuggerDisplayAttribute : Attribute
    {
        private string name;
        private string value;
        private string type;
        private string targetName;
        private Type target;

        public DebuggerDisplayAttribute(string value)
        {
            if( value == null ) {
                this.value = "";
            }
            else {
                this.value = value;
            }
            name = "";
            type = "";
        }   

        public string Value
        {
            get { return this.value; }
        }

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public string Type
        {
            get { return type; }
            set { type = value; }
        }

        public Type Target
        {
            set { 
                if( value == null) {
                    throw new ArgumentNullException("value");
                }
                
                targetName = value.AssemblyQualifiedName; 
                target = value;
            }
            get { return target; }
        }

        public string TargetTypeName
        {
            get { return targetName; }
            set { targetName = value; }
    
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Bharath K A
Software Developer (Senior)
United States United States
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160426.1 | Last Updated 29 Mar 2009
Article Copyright 2008 by Bharath K A
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid