public ComponentDescriptor[] GetAvailableComponents() { return(ComponentDescriptorCache.GetDescriptors(new Type[] { typeof(VesselDimentionsViewModel), typeof(WaterSimulationViewModel), typeof(FileOutputViewModel), typeof(UdpOutputViewModel), typeof(TCPOutputViewModel), })); }
private void AddInspectableComponent(IInspectableComponent component) { InspectableProperty[] properties = component.Properties; //Add Container independently of any properties ComponentDescriptor descriptor = ComponentDescriptorCache.GetDescriptor(component); CategoryContainer container = null; if (descriptor.Removable) { container = GetComponentCategoryContainer(component, descriptor.Title); } else { container = GetDefaultHeaderCategoryContainer(descriptor.Title); } foreach (InspectableProperty property in properties) { InspectablePropertyMetadata propertyMetadata = DefaultPropertyFactory.GetPropertyMetadata(property); ListenToPropertyChanged(property); AddProperty(property, propertyMetadata, container); } }