public override PropertyDescriptorCollection GetProperties() { PropertyDescriptor[] props = new PropertyDescriptor[_map.Commands.Count]; int pos = 0; foreach (KeyValuePair <string, ICommand> command in _map.Commands) { props[pos++] = new CommandPropertyDescriptor(command); } return(new PropertyDescriptorCollection(props)); }
/// <summary> /// Get the properties for this command map /// </summary> /// <returns>A collection of synthesized property descriptors</returns> public override PropertyDescriptorCollection GetProperties() { //TODO: See about caching these properties (need the _map to be observable so can respond to add/remove) PropertyDescriptor[] props = new PropertyDescriptor[_map.Commands.Count]; int pos = 0; foreach (KeyValuePair <string, ICommand> command in _map.Commands) { props[pos++] = new CommandPropertyDescriptor(command); } return(new PropertyDescriptorCollection(props)); }
/// <summary> /// Get the properties for this command map /// </summary> /// <returns>A collection of synthesized property descriptors</returns> public override PropertyDescriptorCollection GetProperties() { //TODO: See about caching these properties (need the _map to be observable so can respond to add/remove) PropertyDescriptor[] props = new PropertyDescriptor[_map.RelayCommands.Count]; int pos = 0; foreach (KeyValuePair<string, IRelayCommand> command in _map.RelayCommands) props[pos++] = new CommandPropertyDescriptor(command); return new PropertyDescriptorCollection(props); }