Window Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Saturday, 1 August 2009

Silverlight 3 : Implement Charting – Content is in Marathi

Posted on 04:58 by Unknown

I am happy as I am doing this as part of experiment or first initiative to talk on Silverlight in my regional language, I request to my friends who understand English that this post is replica of my old post on Charting which you can refer here :

http://pendsevikram.blogspot.com/2008/10/silverlight-2-charts-building-charts.html

Only Idea behind this to introduce Silverlight Technology in regional language. Well, out of interest, if you want to know more about Marathi, here you go :

http://en.wikipedia.org/wiki/Marathi_language

I will soon back with much more stuff..yes in English ! :)

Silverlight 3 : Implement Charting – Content is in Marathi

थोड़े Silverlight बद्दल :
Silverlight हे सर्व वेब-ब्राउजर वर चालणारे Plug-in आहे, तसेच हे विविध Operating Systems वर ही वापरता येते, गेली अनेक वर्षे Microsoft ASP.NET च्या मदतीने आपण अनेक प्रकारचे प्रकल्प कार्यान्वित करत आलो आहोत, काही वर्षांपूर्वी त्याला AJAX ने ही चांगलाच हातभार लावला आहे, आता त्याच धर्तीवर Microsoft आपल्याला Silverlight बरोबर एक पाउल पुढे नेत आहे. पूर्वीची बहुचर्चित Rich Internet Application (RIA) Development आता Silverlight च्या मदतीने सहज शक्य आहे. मला खात्री आहे की नजीकच्या कालावधीत आपणास याचा अनुभव नक्कीच येइल, त्याच Silverlight बद्दल मी आज थोड़े मराठीतून बोलणार आहे, हा माझा पहिला प्रयत्न आहे आणि मला खात्री आहे की तो ही Silverlight प्रमाणेच नजीकच्या काळात यशस्वी होइल.

सिल्वरलाईटच्या मदतीने आजकल एखादे परिपूर्ण संकेतस्थल तयार करणे एवढे अवघड राहिले नाही आहे. आज मी आपल्याला एक छोटेसे उदहारण देत आहे, Silverlight Toolkit च्या मदतीने आता हे काम सोपे झाले आहे, तुम्ही हे Toolkit http://www.codeplex.com/Silverlight या संकेतस्थळहून Download करू शकता. तुम्ही Silverlight चे एक नविन Project सुरु करा, प्रथम आपण XAML Code कड़े पाहू.या उदाहरणाकरीता आपणास प्रथम ToolBar वरून अथवा System.Windows.Controls.DataVisualization.Toolkit चा आधार घेउन Chart Control घेणे आवश्यक आहे.

XAML Code :

<Grid x:Name="LayoutRoot">
        <StackPanel>
            <chartingToolkit:Chart x:Name="MyPieChart"
                             Title="My First Silverlight 3 Graph"
                             Width="400" Height="300">
                <chartingToolkit:PieSeries 
                                   IndependentValueBinding="{Binding Name}"
                                   DependentValueBinding="{Binding Sales}">
                </chartingToolkit:PieSeries>
            </chartingToolkit:Chart>
      </StackPanel>      
    </Grid>

C# Code :

namespace SL3_ChartingDemo
{
    #region Namespaces
        using System.Collections.Generic;
        using System.Windows;
        using System.Windows.Controls;
        using System.Windows.Controls.DataVisualization.Charting;
    #endregion
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
            Loaded += new RoutedEventHandler(MainPage_Loaded);
        }

        void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            #region Calling GetProductSales() to Bind Pie Chart
                GetProductSales();
            #endregion          
        }

        #region Public Method GetProductSales()
            public void GetProductSales()
            {
                List<ProductSales> PieData = new List<ProductSales>();
                PieData.Add(new ProductSales() { Name = "Vikram Pendse", Sales = 10.5 });
                PieData.Add(new ProductSales() { Name = "Mahesh Mitkari", Sales = 20.2 });
                PieData.Add(new ProductSales() { Name = "Vikram Bapat", Sales = 30.2 });
                PieData.Add(new ProductSales() { Name = "Mayur Tendulkar", Sales = 40.1 });

                PieSeries pieSlice = MyPieChart.Series[0] as PieSeries;
                pieSlice.ItemsSource = PieData;

                MyPieChart.LegendTitle = "Activity in this Month in %";
            }
        #endregion

        #region ProductSales Class Declaration
                public class ProductSales
                {
                    public string Name { get; set; }
                    public double Sales { get; set; }
                }   
        #endregion
    }
}

आपण पाहिले की किती थोडक्यात Code लिहून आपण कोणताही आलेख दाखवू शकतो, इथे मी Pie या पद्धतीचा आलेख दाखविला आहे, याच पद्धतीने आपण Bar, Line इत्यादि प्रकारचे आलेख दाखवू शकतो. तुम्ही जर नीट पाहिलेत तर तुम्हाला एक गोष्ट लक्ष्यात येइल ती अशी, की मी Pie Chart साठी लागणारी माहिती ही C# मधून पुरवत आहे, त्यासाठी मी List<Type> चा वापर केला आहे, तसेच मी PieSeries या Class चीही मदत घेतली आहे व List मधील माहितीचा आधार घेण्याचा संकेत देत आहे. अशा प्रकारे सर्व क्रिया झाल्यावर आपणास खालीलप्रमाणे आलेख आपल्या Web Page वर पहावयास मिळेल.

SLMarathi

वरील आलेख पाहून आपणास Silverlight च्या ताकदीचा एक अनुभव आलाच असेल, याप्रमाणेच आपणास दैनंदिन व्यवहारात लागणारी अनेक Applications Silverlight मधून सहज शक्य आहेत. आपणास माझा हा लेख कसा वाटला ते जरुर ई-मेल करून सांगा.

विक्रम.

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • First Windows Phone 7 update February 2011 - Small update but Big start
    After tons of rumors and set of predictions on Windows Phone 7 all over Internet, Microsoft came up with first Windows Phone 7 minor update ...
  • The little Story of “I Unlock Joy” event by Microsoft and Pune User Group
      This post is about recent “I Unlock Joy” event happened in Pune which was conducted by Microsoft and Pune User Group. Little History : ...
  • Silverlight 2 : Theming from Silverlight 2 Toolkit
    It’s now time to put on some cool Themes to your Silverlight 2 Controls. I have already talked about Silverlight toolkit in my last post, ...
  • DeepZoom with PhotoZoom and Silverlight.live.com
    I have already wrote article on How to build DeepZoom with DeepZoom Composer, I know after that another version of DeepZoom came up, but cha...
  • Silverlight 5 : Platform Invoke (PInvoke) in Silverlight
      Two days back Microsoft announced availability of Silverlight 5 RC,I encourage you to download bits from here , My friend Pete Brown alr...
  • Silverlight On Mobile : Windows Phone 7 Splash Screen and Customization
    After talking about 3D capabilities on Windows Phone 7 using Silverlight in last article , Now I am moving ahead with small but equally impo...
  • Silverlight, HTML5 & Windows 8 : Where we are heading to ?
    This is not the post or yet another post on most happening debate of Silverlight and HTML5, This is just a visit to all of them to realize t...
  • Silverlight 3 : Out Of Browser
    I have already written an article over Silverlight Out Of Browser functionality few months back ( http://pendsevikram.blogspot.com/2009/04/s...
  • Mango : Using DeviceStatus in Windows Phone 7.1
    First of all “Thank You” for your wonderful response and comments on my last article on Silverlight Vs HTML5 ,I hope you like the points I ...
  • Share Status and Link on Socials in Windows Phone
      Hope you all doing good.Sorry for the great delay here,I am almost working for all 7 days in week and that too on SQL Server – SSIS whic...

Blog Archive

  • ►  2013 (4)
    • ►  August (1)
    • ►  April (3)
  • ►  2012 (4)
    • ►  July (1)
    • ►  March (2)
    • ►  January (1)
  • ►  2011 (24)
    • ►  December (1)
    • ►  September (4)
    • ►  August (2)
    • ►  July (1)
    • ►  June (4)
    • ►  May (3)
    • ►  April (3)
    • ►  March (1)
    • ►  February (4)
    • ►  January (1)
  • ►  2010 (21)
    • ►  December (1)
    • ►  November (2)
    • ►  October (3)
    • ►  September (2)
    • ►  August (4)
    • ►  July (5)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
    • ►  January (1)
  • ▼  2009 (49)
    • ►  December (1)
    • ►  November (5)
    • ►  October (2)
    • ►  September (1)
    • ▼  August (5)
      • Silverlight 3 : RIA Services for your LOB Applicat...
      • Silverlight 3 Windows 7 GA Countdown for all Windo...
      • Silverlight 3 : RIA Services for your LOB Applicat...
      • Silverlight 3 : RIA Services for your LOB Applicat...
      • Silverlight 3 : Implement Charting – Content is in...
    • ►  July (5)
    • ►  June (1)
    • ►  May (5)
    • ►  April (5)
    • ►  March (9)
    • ►  February (4)
    • ►  January (6)
  • ►  2008 (43)
    • ►  December (3)
    • ►  November (9)
    • ►  October (7)
    • ►  September (4)
    • ►  August (2)
    • ►  July (3)
    • ►  June (4)
    • ►  May (3)
    • ►  March (3)
    • ►  February (5)
Powered by Blogger.

About Me

Unknown
View my complete profile