예제 #1
0
        public BlueprintsControl()
        {
            var descriptor   = DependencyPropertyDescriptor.FromProperty(DesignerProperties.IsInDesignModeProperty, typeof(FrameworkElement));
            var isDesignMode = (bool)descriptor.Metadata.DefaultValue;

            InitializeComponent();

            if (!isDesignMode)
            {
                this.Blueprints = EoiInterface.GetBlueprints();
                var collectionView = new CollectionViewSource()
                {
                    Source = this.Blueprints
                };
                var itemList = collectionView.View;
                var filter   = new Predicate <object>(CustomFilter);
                itemList.Filter = filter;
                this.BlueprintsCollectionView = itemList;
            }
        }
 public BlueprintsComboBox()
 {
     this.ItemsSource = EoiInterface.GetBlueprints();
 }