コード例 #1
0
		FrameworkElement ITypeEditor.ResolveEditor(PropertyItem propertyItem)
		{
			var comboBox = new AmazonRegionComboBox { IsEditable = false, Width = double.NaN };

			var binding = new Binding("Value")
			{
				Source = propertyItem,
				//Converter = new EndPointValueConverter(comboBox, SmartComAddresses.Matrix),
				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 AmazonRegionComboBox {
                IsEditable = false, Width = double.NaN
            };

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

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