Exemplo n.º 1
0
        public KeyCanvas AddTextBlock(string name, KeyTextBlock textBlock)
        {
            if (_textBlocks.ContainsKey(name))
            {
                throw new Exception($"TextBlock {name} already exists");
            }

            Canvas.Children.Add(textBlock.Get());
            _textBlocks.TryAdd(name, textBlock);
            return(this);
        }
Exemplo n.º 2
0
        public KeyTextBlock CreateTextBlock(string text = "", bool centered = true)
        {
            var ktb = new KeyTextBlock(_width, _height, text, centered);

            return(ktb);
        }