public ShapeComponentText()
            : base()
        {
            connector = new ControlConnector();
            connector.HorizontalAlignment = HorizontalAlignment.Center;
            connector.VerticalAlignment   = VerticalAlignment.Center;
            connector.CanSelectConnection = true;
            this.AddVisualChild(connector);
            connector.InitConnectable(this);

            this.IsEnabled           = true;
            this.MinWidth            = 20;
            this.Background          = null;
            this.AcceptsReturn       = false;
            this.AcceptsTab          = false;
            this.BorderThickness     = new Thickness(0);
            this.TextAlignment       = TextAlignment.Center;
            this.HorizontalAlignment = HorizontalAlignment.Center;
            this.VerticalAlignment   = VerticalAlignment.Center;
            this.Padding             = new Thickness(0);
            this.Margin = new Thickness(0);
            //this.FontSize = 14;
            //this.FontWeight = FontWeights.Bold;

            this.Unloaded += ShapeComponentText_Unloaded;
            this.KeyDown  += ShapeComponentText_KeyDown;
        }
Example #2
0
        private int?prevCaretOffset;   // caret offset before lost focus

        public ExpressionTextBox() : base()
        {
            connector = new ControlConnector();
            connector.HorizontalAlignment = HorizontalAlignment.Center;
            connector.VerticalAlignment   = VerticalAlignment.Center;
            this.AddVisualChild(connector);
            connector.InitConnectable(this);

            //this.MinWidth = 50;
            //this.MinHeight = 25;
            this.IsEnabled           = true;
            this.AcceptsReturn       = false;
            this.AcceptsTab          = false;
            this.BorderThickness     = new Thickness(0);
            this.HorizontalAlignment = HorizontalAlignment.Center;
            this.VerticalAlignment   = VerticalAlignment.Center;
            this.Padding             = new Thickness(0);
            this.Margin         = new Thickness(0);
            this.FontSize       = 14;
            this.FontWeight     = FontWeights.Bold;
            this.KeyDown       += textBox_KeyDown;
            this.GotFocus      += textBox_GotFocus;
            this.LostFocus     += textBox_LostFocus;
            this.LayoutUpdated += textBox_LayoutUpdated;

            referredMacroParams = new List <string>();

            this.CommandBindings.Add(new CommandBinding(ApplicationCommands.Copy, Copy_Executed));
            this.CommandBindings.Add(new CommandBinding(ApplicationCommands.Cut, Cut_Executed));
            this.CommandBindings.Add(new CommandBinding(ApplicationCommands.Paste, Paste_Executed));

            this.Unloaded += ExpressionTextBox_Unloaded;
        }
Example #3
0
        public IfComponentControl(IfComponentData data, IComponentValueStore valueStore)
        {
            InitializeComponent();
            this.Loaded    += IfComponentControl_Loaded;
            this.data       = data;
            this.valueStore = valueStore;

            textCondition.data        = data.conditionData;
            textTrue.data             = data.trueData;
            textFalse.data            = data.falseData;
            textCondition.valueStore  = valueStore;
            textTrue.valueStore       = valueStore;
            textFalse.valueStore      = valueStore;
            textCondition.placeholder = "if";
            textTrue.placeholder      = "then";
            textFalse.placeholder     = "else";

            connector = new ControlConnector();
            connector.HorizontalAlignment = HorizontalAlignment.Center;
            connector.VerticalAlignment   = VerticalAlignment.Center;
            this.AddVisualChild(connector);
            connector.InitConnectable(this);

            this.Unloaded += IfComponentControl_Unloaded;
        }
Example #4
0
 public ControlConnection(ControlConnector source, ControlConnector sink)
     : base(source, sink)
 {
     EdgeCount       = 1;
     IsSelectable    = false;
     this.IsOpaque   = false;
     this.GotFocus  += ControlConnection_GotFocus;
     this.LostFocus += ControlConnection_LostFocus;
 }
        public LoopComponentTextParam()
            : base()
        {
            connector = new ControlConnector();
            connector.HorizontalAlignment = HorizontalAlignment.Center;
            connector.VerticalAlignment   = VerticalAlignment.Center;
            this.AddVisualChild(connector);
            connector.InitConnectable(this);

            this.Unloaded += LoopComponentTextParam_Unloaded;
        }
        public SpreadsheetHeaderText()
            : base()
        {
            connector = new ControlConnector();
            connector.HorizontalAlignment = HorizontalAlignment.Center;
            connector.VerticalAlignment   = VerticalAlignment.Center;
            this.AddVisualChild(connector);
            connector.InitConnectable(this);

            this.Unloaded += SpreadsheetHeaderText_Unloaded;
        }
        public SpreadsheetComponentControl(SpreadsheetComponentData data, IComponentValueStore valueStore)
        {
            InitializeComponent();
            this.Loaded          += SpreadsheetComponentControl_Loaded;
            this.Unloaded        += SpreadsheetComponentControl_Unloaded;
            this.data             = data;
            this.valueStore       = valueStore;
            this.grid.ItemsSource = data.cells;
            SetupColumns();

            connector = new ControlConnector();
            connector.HorizontalAlignment = HorizontalAlignment.Center;
            connector.VerticalAlignment   = VerticalAlignment.Center;
            this.AddVisualChild(connector);
            connector.InitConnectable(this);
        }