/// <summary>
        /// Initializes a new instance of the <see cref="CountrySectorChartView"/> class.
        /// </summary>
        /// <param name="viewModel">The view model.</param>
        public CountrySectorChartView(CountrySectorChartViewModel viewModel)
        {
            InitializeComponent();
            model            = viewModel;
            this.DataContext = viewModel;

            this.IsVisibleChanged += delegate(object sender, DependencyPropertyChangedEventArgs e)
            {
                viewModel.IsVisible = (bool)e.NewValue;
            };
        }
        /// <summary>
        /// Registers the views with regions.
        /// </summary>
        private void RegisterViewsWithRegions()
        {
            CountrySectorChartViewModel chartmodel = new CountrySectorChartViewModel(eventaggregator);

            this.regionManager.Regions[RegionNames.DockingRegion].Add(new CountrySectorChartView(chartmodel), "countrysectorchartView");
        }