Esempio n. 1
0
 public BubbleContent(Bubble parent, string text = "")
 {
     this.parent = parent;
     double radius = parent.getRadius();
     textblock = new TextBlock()
     {
         Text = text,
         Foreground = new SolidColorBrush(ColorSettings.TextColor),
         TextAlignment = Windows.UI.Xaml.TextAlignment.Center,
         FontSize = Preferences.FontSize,
         FontFamily = Preferences.FontFamily,
         Width = radius * 2,
         MaxHeight = radius * 2,
         TextWrapping = TextWrapping.WrapWholeWords,
         TextTrimming = TextTrimming.CharacterEllipsis,
         VerticalAlignment = VerticalAlignment.Center,
     };
     textcontainer = new Border()
     {
         Height = radius * 2,
         Child = textblock,
     };
     BubbleContainer.canvas.Children.Add(textcontainer);
     Canvas.SetZIndex(textcontainer, Int16.MaxValue);
 }
Esempio n. 2
0
 public BubbleShape(Bubble parent)
 {
     this.parent = parent;
     double radius = parent.getRadius();
     shape = new Ellipse()
     {
         Width = radius * 2,
         Height = radius * 2,
         Fill = new SolidColorBrush(ColorSettings.BubbleColor)
     };
     BubbleContainer.canvas.Children.Add(shape);
 }