Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BasicScreenQuestionControl"/> class.
        /// </summary>
        public BasicScreenQuestionControl()
        {
            DefaultStyleKey = typeof(BasicScreenQuestionControl);

            ValueWrapper = new ValueWrapper();
            var valueBinding = new Binding();

            valueBinding.Source = this;
            valueBinding.Path   = new PropertyPath("Value");
            valueBinding.Mode   = BindingMode.TwoWay;
            BindingOperations.SetBinding(ValueWrapper, ValueWrapper.ValueProperty, valueBinding);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="BasicScreenQuestionControl"/> class.
        /// </summary>
        public BasicScreenQuestionControl()
        {
            DefaultStyleKey = typeof( BasicScreenQuestionControl );

            ValueWrapper = new ValueWrapper ();
            var valueBinding = new Binding ();
            valueBinding.Source = this;
            valueBinding.Path = new PropertyPath ( "Value" );
            valueBinding.Mode = BindingMode.TwoWay;
            BindingOperations.SetBinding ( ValueWrapper, ValueWrapper.ValueProperty, valueBinding );
        }