public ExpressionTextBoxAutomationPeer(ExpressionTextBox owner)
     : base(owner)
 { 
 }
Exemplo n.º 2
0
 public ExpressionValidationRule(ExpressionTextBox owner)
 {
     this.owner = owner;
 }
Exemplo n.º 3
0
 void SetBinding(string path, DependencyProperty property, FrameworkElement target, ExpressionTextBox source,
     BindingMode mode = BindingMode.OneWay, IEnumerable<ValidationRule> validationRules = null)
 {
     Binding binding = new Binding(path);
     binding.Source = source;
     binding.Mode = mode;
     if ((validationRules != null) && (validationRules.Count<ValidationRule>() > 0))
     {
         foreach (ValidationRule rule in validationRules)
         {
             binding.ValidationRules.Add(rule);
         }
     }
     target.SetBinding(property, binding);
 }
Exemplo n.º 4
0
        internal void InitializeEditor(ExpressionActivityEditor editor, ExpressionTextBox expressionTextBox)
        {
            if (editor != null)
            {
                expressionTextBox.InitializeHintText(editor.HintText);
                expressionTextBox.InternalHintText = expressionTextBox.HintText;
                SetBinding("InternalHintText", ExpressionActivityEditor.HintTextProperty, editor, expressionTextBox, BindingMode.TwoWay);
                SetBinding("IsSupportedExpression", ExpressionActivityEditor.IsSupportedExpressionProperty, editor, expressionTextBox, BindingMode.OneWayToSource, null);
                SetBinding("HorizontalScrollBarVisibility", ExpressionActivityEditor.HorizontalScrollBarVisibilityProperty, editor, expressionTextBox);
                SetBinding("VerticalScrollBarVisibility", ExpressionActivityEditor.VerticalScrollBarVisibilityProperty, editor, expressionTextBox);
                SetBinding("AcceptsReturn", ExpressionActivityEditor.AcceptsReturnProperty, editor, expressionTextBox);
                SetBinding("AcceptsTab", ExpressionActivityEditor.AcceptsTabProperty, editor, expressionTextBox);
                SetBinding("Expression", ExpressionActivityEditor.ExpressionProperty, editor, expressionTextBox, BindingMode.TwoWay, new Collection<ValidationRule> { new ExpressionValidationRule(expressionTextBox) });
                SetBinding("ExpressionType", ExpressionActivityEditor.ExpressionTypeProperty, editor, expressionTextBox);
                SetBinding("OwnerActivity", ExpressionActivityEditor.OwnerActivityProperty, editor, expressionTextBox);
                SetBinding("UseLocationExpression", ExpressionActivityEditor.UseLocationExpressionProperty, editor, expressionTextBox);
                SetBinding("PathToArgument", ExpressionActivityEditor.PathToArgumentProperty, editor, expressionTextBox);
                SetBinding("IsReadOnly", ExpressionActivityEditor.IsReadOnlyProperty, editor, expressionTextBox);
                SetBinding("ExplicitCommit", ExpressionActivityEditor.ExplicitCommitProperty, editor, expressionTextBox);
                SetBinding("ClipToBounds", ExpressionActivityEditor.ClipToBoundsProperty, editor, expressionTextBox);

                TextualExpressionEditor textEditor = editor as TextualExpressionEditor;
                if (textEditor != null)
                {
                    SetBinding("MaxLines", TextualExpressionEditor.MaxLinesProperty, textEditor, expressionTextBox);
                    SetBinding("MinLines", TextualExpressionEditor.MinLinesProperty, textEditor, expressionTextBox);
                    SetBinding("DefaultValue", TextualExpressionEditor.DefaultValueProperty, textEditor, expressionTextBox);
                }

                SetBinding("IsIndependentExpression", ExpressionActivityEditor.IsIndependentExpressionProperty, editor, expressionTextBox);
            }
        }
Exemplo n.º 5
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.stateContentGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 2:
     this.conditionBox = ((System.Activities.Presentation.View.ExpressionTextBox)(target));
     return;
     }
     this._contentLoaded = true;
 }