private void CreateAndBindToSelectionService()
        {
            var service = GlobalSelectionService.GetOrCreateSelectionService(Services);

            service.SelectionChanged += (s, e) =>
            {
                if (service.CurrentSource == this)
                {
                    return;
                }
                if (service.SelectedObject == null)
                {
                    return;
                }
                if (service.SelectedObject == parentObject)
                {
                    return;
                }

                if (service.SelectedObject is CertificateStore)
                {
                    parentObject = service.SelectedObject;
                    var systemStore = (CertificateStore)parentObject;
                    var store       = systemStore.GetX509Store();

                    // See http://msdn.microsoft.com/en-us/library/aa376559%28VS.85%29.aspx : CERT_STORE_PROV_PHYSICAL
                    //var store = new X509Store(systemStore.Name + "\\.Default", systemStore.Location.ToStoreLocation());

                    store.Open(OpenFlags.ReadOnly);

                    CurrentStoreName     = store.Name;
                    CurrentStoreLocation = store.Location;

                    FillList(
                        store.GetCertificates(),
                        store.GetCertificateRevocationLists(),
                        store.GetCertificateTrustLists());
                    store.Close();
                }
            };

            service.AddSource(this);
        }
        private void BindToSelectionService()
        {
            var service = GlobalSelectionService.GetOrCreateSelectionService(Services);

            service.SelectionChanged += (s, e) => propertyGrid.SelectedObject = service.SelectedObject;
        }