PageRenderTime 18ms CodeModel.GetById 12ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/V4/StockTrader RI/Desktop/StockTraderRI.Modules.Position/PositionSummary/PositionPieChartView.xaml.cs

#
C# | 52 lines | 30 code | 3 blank | 19 comment | 0 complexity | 5fe2d4caca91644bc9b47404547dd622 MD5 | raw file
 1//===================================================================================
 2// Microsoft patterns & practices
 3// Composite Application Guidance for Windows Presentation Foundation and Silverlight
 4//===================================================================================
 5// Copyright (c) Microsoft Corporation.  All rights reserved.
 6// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
 7// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
 8// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 9// FITNESS FOR A PARTICULAR PURPOSE.
10//===================================================================================
11// The example companies, organizations, products, domain names,
12// e-mail addresses, logos, people, places, and events depicted
13// herein are fictitious.  No association with any real company,
14// organization, product, domain name, email address, logo, person,
15// places, or events is intended or should be inferred.
16//===================================================================================
17using System;
18using System.ComponentModel.Composition;
19using System.Windows.Controls;
20using Microsoft.Practices.Prism.Events;
21using StockTraderRI.Infrastructure;
22
23namespace StockTraderRI.Modules.Position.PositionSummary
24{
25    /// <summary>
26    /// Interaction logic for PositionPieChartView.xaml
27    /// </summary>
28    [ViewExport(RegionName = RegionNames.ResearchRegion)]
29    [PartCreationPolicy(CreationPolicy.NonShared)]
30    public partial class PositionPieChartView : UserControl
31    {
32        public event EventHandler<DataEventArgs<string>> PositionSelected = delegate { };
33
34        public PositionPieChartView()
35        {
36            InitializeComponent();
37        }
38
39        [Import]
40        public IPositionPieChartViewModel Model
41        {
42            get
43            {
44                return this.DataContext as IPositionPieChartViewModel;
45            }
46            set
47            {
48                this.DataContext = value;
49            }
50        }
51    }
52}