private TextBlockWithTitle GeneratePropertyTextBox()
        {
            TextBlockWithTitle textBlock = new TextBlockWithTitle();

            textBlock.Text  = (string)TargetProperty;
            textBlock.Title = (string)Application.Current.FindResource(TargetPropertyName);
            textBlock.Style = Application.Current.FindResource("DefaultTextBlockWithTitle") as Style;

            textBlock.TextChanged += OnPropertyChanged;

            return(textBlock);
        }
Ejemplo n.º 2
0
        private void InitSP()
        {
            foreach (var @var in LinguisticVariableService.Instance.InputLinguisticVariables)
            {
                TextBlockWithTitle tbwt = new TextBlockWithTitle();

                tbwt.Style = Application.Current.FindResource("DefaultTextBlockWithTitle") as Style;
                tbwt.Title = var.Name;

                dic.Add(tbwt, @var);
            }

            foreach (var @var in dic)
            {
                ctrMainSP.Children.Add(var.Key);
            }
        }