How to create a tooltip in WPF dynamically

The following code snippet creates a Tooltip and adds it to a button control.

Button button = new Button();
button.Content = "Hover me.";
Tooltip tt = new ToolTip();
tt.Content = "Haha. ;
button.ToolTip = tt;
cv2.Children.Add(button);