0

For a calendar app (silverlight WP7.5), I use wrappanel to contain days (Border with Button as child). Now I would like to add another button inside the Border. So each day will have number and additional info/graphics. Just noticed that Border can contain only 1 child. How do I do with it?

Border border = new Border();
Button btn = new Button();
border.Child = btn;
//Button btn_notification = new Button();
// how to add the btn_notification????
CalendarWrapPanel.Children.Add(border);

Thank you very much!

thsieh
  • 620
  • 8
  • 24

1 Answers1

1

Just add another Container (Grid, StackPanel, ...) inside your Border. This examples demostrates it with a StackPanel:

Border border = new Border();
Button btn = new Button();
Button btn_notification = new Button();
StackPanel panel = new StackPanel();
panel.Children.Add(btn);
panel.Children.Add(btn_notification);
border.Child = panel;
CalendarWrapPanel.Children.Add(border);
Wolfgang Ziegler
  • 1,675
  • 11
  • 23