protected virtual void OnSelectedFeaturesChanged(SelectedFeaturesChangedEventArgs e)
        {
            EventHandler <SelectedFeaturesChangedEventArgs> handler = SelectedFeaturesChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
        private void RaiseSelectedFeaturesChangedEvent()
        {
            Collection <Feature> features = new Collection <Feature>();
            var items = featureList.ItemsSource as Collection <FeatureIdItem>;

            if (items != null)
            {
                foreach (var item in items.Where(i => i.IsChecked))
                {
                    features.Add(item.Feature);
                }
            }

            var args = new SelectedFeaturesChangedEventArgs(features);

            OnSelectedFeaturesChanged(args);
        }