Ejemplo n.º 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;
            }
        }
Ejemplo n.º 2
0
 public BlueprintsComboBox()
 {
     this.ItemsSource = EoiInterface.GetBlueprints();
 }