Пример #1
0
            /// <summary>
            /// Get the ICommand from the parent command map
            /// </summary>
            /// <param name="component"></param>
            /// <returns></returns>
            public override object GetValue(object component)
            {
                CommandMap map = component as CommandMap;

                if (null == map)
                {
                    throw new ArgumentException("component is not a CommandMap instance", "component");
                }

                return(map.RelayCommands[this.Name]);
            }
Пример #2
0
 /// <summary>
 /// Store the command map for later
 /// </summary>
 /// <param name="descriptor"></param>
 /// <param name="map"></param>
 public CommandMapDescriptor(ICustomTypeDescriptor descriptor, CommandMap map)
     : base(descriptor)
 {
     _map = map;
 }
Пример #3
0
 /// <summary>
 /// Store the command map for later
 /// </summary>
 /// <param name="descriptor"></param>
 /// <param name="map"></param>
 public CommandMapDescriptor(ICustomTypeDescriptor descriptor, CommandMap map)
     : base(descriptor)
 {
     _map = map;
 }