private void AddCommand(Panel workItemPanel) { if (workItemPanel == null) return; var separator = new Separator(); separator.Style = (Style)workItemPanel.FindResource("VerticalSeparator"); workItemPanel.Children.Add(separator); var textLink = new TextLink(); textLink.Text = "Select last"; textLink.ToolTip = "Select workitem associated with last changeset"; textLink.Command = new RelayCommand(SetLastWorkItem); workItemPanel.Children.Add(textLink); }