FrameworkElement ITypeEditor.ResolveEditor(PropertyItem propertyItem)
		{
			var comboBox = new OpenECryAddressComboBox { IsEditable = true, Width = double.NaN };

			var binding = new Binding("Value")
			{
				Source = propertyItem,
				Converter = new EndPointValueConverter(comboBox, OpenECryAddresses.Api),
				Mode = propertyItem.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay
			};

			BindingOperations.SetBinding(comboBox, ComboBox.TextProperty, binding);
			return comboBox;
		}
예제 #2
0
        FrameworkElement ITypeEditor.ResolveEditor(PropertyItem propertyItem)
        {
            var comboBox = new OpenECryAddressComboBox {
                IsEditable = true, Width = double.NaN
            };

            var binding = new Binding("Value")
            {
                Source    = propertyItem,
                Converter = new EndPointValueConverter(comboBox, OpenECryAddresses.Api),
                Mode      = propertyItem.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay
            };

            BindingOperations.SetBinding(comboBox, ComboBox.TextProperty, binding);
            return(comboBox);
        }