Combobox绑定价值

时间:2010-11-24 23:24:31

标签: silverlight data-binding combobox

    [Display(Name = "Type of Delivery:",
        Description = "(TBC)")]
    public string DeliveryType
    {
        get { return _deliveryType; }
        set
        {
            Validator.ValidateProperty(value,
                                       new ValidationContext(this, null, null)
                                           {MemberName = CalculatorParameters.GetPropertyName()});
            _deliveryType = value;
        }
    }





    <ComboBox ItemsSource="{Binding ElementName=v_DeliveriesOrderedDomainDataSource, Path=Data}"  SelectedItem="{Binding DeliveryType, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True}" DisplayMemberPath="Description" Margin="12,12"/>

这个工作正常,除了值绑定是我的对象v_DeliveriesOrdered的ToString(),但我想使用特定的字段 即:值为“V_DeliveriesOrdered:{US,U.S.A.Port of Entry}”,而我想使用的值只是美国的字段代码

我该怎么办? (而不是采取'{'和','

之间的任何内容

1 个答案:

答案 0 :(得分:0)

所以我用常规的Silverlight WCF服务替换了DomainServices,问题就消失了