Ejemplo n.º 1
0
        /// <summary>
        /// Method used for generating bindings for the <see cref="ITypeEditor"/> properties.
        /// </summary>
        public void BindEditor()
        {
            Binding b1 = new Binding();

            b1.Path = new PropertyPath("ValueOptions");
            this.SetBinding(ListEditor.ItemsSourceProperty, b1);

            Binding b = new Binding()
            {
                Mode = BindingMode.TwoWay
            };

            b.Path = new PropertyPath("PropertyValue");
            EditorsHelper.AddPropertyValueConverter(b, this);
            this.SetBinding(ListEditor.SelectedItemProperty, b);

            Binding b2 = new Windows.UI.Xaml.Data.Binding();

            b2.Path = new PropertyPath("Watermark");
            this.SetBinding(ListEditor.PlaceholderTextProperty, b2);

            Binding b3 = new Binding();

            b3.Converter = new IsEnabledEditorConvetrer();
            b3.Path      = new PropertyPath(string.Empty);
            this.SetBinding(ListEditor.IsEnabledProperty, b3);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Method used for generating bindings for the <see cref="ITypeEditor"/> properties.
        /// </summary>
        public void BindEditor()
        {
            Binding b = new Binding()
            {
                Mode = BindingMode.TwoWay
            };

            b.Path = new PropertyPath("PropertyValue");
            EditorsHelper.AddPropertyValueConverter(b, this);
            this.SetBinding(TimeEditor.ValueProperty, b);

            Binding b1 = new Binding();

            b1.Path               = new PropertyPath("Errors.Count");
            b1.Converter          = new EditorIconVisibilityConverter();
            b1.ConverterParameter = "HasErrors";
            this.SetBinding(TimeEditor.HasErrorsProperty, b1);

            Binding b2 = new Binding();

            b2.Path = new PropertyPath("Watermark");
            this.SetBinding(TimeEditor.EmptyContentProperty, b2);

            Binding b3 = new Binding();

            b3.Converter = new IsEnabledEditorConvetrer();
            b3.Path      = new PropertyPath(string.Empty);
            this.SetBinding(TimeEditor.IsEnabledProperty, b3);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Method used for generating bindings for the <see cref="ITypeEditor"/> properties.
        /// </summary>
        public void BindEditor()
        {
            Binding b1 = new Binding();

            b1.Path = new PropertyPath("Range.Min");
            this.SetBinding(SliderCustomEditor.MinimumProperty, b1);

            Binding b2 = new Binding();

            b2.Path = new PropertyPath("Range.Max");
            this.SetBinding(SliderCustomEditor.MaximumProperty, b2);

            Binding b3 = new Binding();

            b3.Converter = new IsEnabledEditorConvetrer();
            b3.Path      = new PropertyPath(string.Empty);
            this.SetBinding(SliderCustomEditor.IsEnabledProperty, b3);

            Binding b4 = new Binding();

            b4.Path = new PropertyPath("Range.Step");
            this.SetBinding(SliderCustomEditor.StepFrequencyProperty, b4);

            Binding b5 = new Binding()
            {
                Mode = BindingMode.TwoWay
            };

            b5.Path = new PropertyPath("PropertyValue");
            EditorsHelper.AddPropertyValueConverter(b5, this);
            this.SetBinding(SliderCustomEditor.ValueProperty, b5);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Method used for generating bindings for the <see cref="ITypeEditor"/> properties.
        /// </summary>
        public void BindEditor()
        {
            Binding b = new Binding()
            {
                Mode = BindingMode.TwoWay, UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
            };

            b.Path = new PropertyPath("PropertyValue");
            EditorsHelper.AddPropertyValueConverter(b, this);
            this.SetBinding(StringEditor.TextProperty, b);

            Binding b1 = new Binding();

            b1.Path               = new PropertyPath("Errors.Count");
            b1.Converter          = new EditorIconVisibilityConverter();
            b1.ConverterParameter = "HasErrors";
            this.SetBinding(StringEditor.HasErrorsProperty, b1);

            Binding b2 = new Binding();

            b2.Path = new PropertyPath("Watermark");
            this.SetBinding(StringEditor.PlaceholderTextProperty, b2);

            Binding b3 = new Binding();

            b3.Converter = new IsEnabledEditorConvetrer();
            b3.Path      = new PropertyPath(string.Empty);
            this.SetBinding(StringEditor.IsEnabledProperty, b3);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Method used for generating bindings for the <see cref="ITypeEditor"/> properties.
        /// </summary>
        public void BindEditor()
        {
            Binding b = new Binding()
            {
                Mode = BindingMode.TwoWay
            };

            b.Path = new PropertyPath("PropertyValue");
            EditorsHelper.AddPropertyValueConverter(b, this);
            this.SetBinding(AutoCompleteEditor.TextProperty, b);

            Binding b1 = new Binding();

            b1.Path               = new PropertyPath("Errors.Count");
            b1.Converter          = new EditorIconVisibilityConverter();
            b1.ConverterParameter = "HasErrors";
            this.SetBinding(AutoCompleteEditor.HasErrorsProperty, b1);

            Binding b2 = new Binding();

            b2.Path = new PropertyPath("Watermark");
            this.SetBinding(AutoCompleteEditor.WatermarkProperty, b2);

            Binding b3 = new Binding();

            b3.Converter = new IsEnabledEditorConvetrer();
            b3.Path      = new PropertyPath(string.Empty);
            this.SetBinding(AutoCompleteEditor.IsEnabledProperty, b3);

            Binding b4 = new Binding();

            b4.Path = new PropertyPath("ValueOptions");
            this.SetBinding(AutoCompleteEditor.ItemsSourceProperty, b4);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Method used for generating bindings for the <see cref="ITypeEditor"/> properties.
        /// </summary>
        public void BindEditor()
        {
            Binding b = new Binding()
            {
                Mode = BindingMode.TwoWay
            };

            b.Path = new PropertyPath("PropertyValue");
            EditorsHelper.AddPropertyValueConverter(b, this);
            this.SetBinding(EnumEditor.SelectedItemProperty, b);

            Binding b1 = new Binding();

            b1.Converter = new EnumToItemsSourceConverter();
            b1.Path      = new PropertyPath("PropertyType");
            this.SetBinding(EnumEditor.ItemsSourceProperty, b1);

            Binding b2 = new Binding();

            b2.Path = new PropertyPath("Watermark");
            this.SetBinding(EnumEditor.PlaceholderTextProperty, b2);

            Binding b3 = new Binding();

            b3.Converter = new IsEnabledEditorConvetrer();
            b3.Path      = new PropertyPath(string.Empty);
            this.SetBinding(EnumEditor.IsEnabledProperty, b3);

            Binding b4 = new Binding();

            b4.Path      = new PropertyPath("PropertyValue");
            b4.Converter = new EnumToIndexConverter();
            this.SetBinding(EnumEditor.SelectedIndexProperty, b4);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Method used for generating bindings for the <see cref="ITypeEditor"/> properties.
        /// </summary>
        public void BindEditor()
        {
            Binding b = new Binding()
            {
                Mode = BindingMode.TwoWay
            };

            b.Path = new PropertyPath("PropertyValue");
            EditorsHelper.AddPropertyValueConverter(b, this);
            this.SetBinding(BooleanEditor.IsCheckedProperty, b);

            Binding b3 = new Binding();

            b3.Converter = new IsEnabledEditorConvetrer();
            b3.Path      = new PropertyPath(string.Empty);
            this.SetBinding(BooleanEditor.IsEnabledProperty, b3);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Method used for generating bindings for the <see cref="ITypeEditor"/> properties.
        /// </summary>
        public void BindEditor()
        {
            Binding b = new Binding()
            {
                Mode = BindingMode.TwoWay
            };

            EditorsHelper.AddPropertyValueConverter(b, this);
            b.Path = new PropertyPath("PropertyValue");
            this.SetBinding(NumericEditor.ValueProperty, b);

            Binding b1 = new Binding();

            b1.Path               = new PropertyPath("Errors.Count");
            b1.Converter          = new EditorIconVisibilityConverter();
            b1.ConverterParameter = "HasErrors";
            this.SetBinding(NumericEditor.HasErrorsProperty, b1);

            Binding b2 = new Binding();

            b2.Path = new PropertyPath("Watermark");
            this.SetBinding(NumericEditor.WatermarkProperty, b2);

            Binding b3 = new Binding();

            b3.Converter = new IsEnabledEditorConvetrer();
            b3.Path      = new PropertyPath(string.Empty);
            this.SetBinding(NumericEditor.IsEnabledProperty, b3);

            Binding rangeB = new Binding();

            rangeB.Path          = new PropertyPath("Range.Min");
            rangeB.FallbackValue = double.MinValue;
            this.SetBinding(NumericEditor.MinimumProperty, rangeB);

            rangeB               = new Binding();
            rangeB.Path          = new PropertyPath("Range.Max");
            rangeB.FallbackValue = double.MaxValue;
            this.SetBinding(NumericEditor.MaximumProperty, rangeB);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Method used for generating bindings for the <see cref="ITypeEditor"/> properties.
        /// </summary>
        public void BindEditor()
        {
            Binding b1 = new Binding();

            b1.Path = new PropertyPath("ValueOptions");
            this.SetBinding(SegmentedCustomEditor.ItemsSourceProperty, b1);

            Binding b2 = new Binding()
            {
                Mode = BindingMode.TwoWay
            };

            b2.Path = new PropertyPath("PropertyValue");
            EditorsHelper.AddPropertyValueConverter(b2, this);
            this.SetBinding(SegmentedCustomEditor.SelectedItemProperty, b2);

            Binding b3 = new Binding();

            b3.Converter = new IsEnabledEditorConvetrer();
            b3.Path      = new PropertyPath(string.Empty);
            this.SetBinding(SegmentedCustomEditor.IsEnabledProperty, b3);
        }