Hello, I organiza my windows like tabItems in tab controls. when i click on menu item:
ListTemplate is a user control. In List template is a button "Close". Now when i click this button, i need that this tab,whitch contains this user control, would close. I try code from other forum in telerik:
But his code shows error:
| private void PaieskaTab_Click(object sender, Telerik.Windows.RadRoutedEventArgs e) |
| { |
| RadTabItem tabItem = new RadTabItem(); |
| ListTemplate lst = new ListTemplate(); |
| lst.tabWindow = tabItem; |
| tabItem.Content = lst; |
| tabItem.Header = "Paieskos langas"; |
| tabItem.Name = "tabPaieskosTestas"; |
| tabControlR.Items.Add(tabItem); |
| } |
| var tabItem = tabWindow as RadTabItem; |
| var parentItemsControl = Telerik.Windows.Controls.ItemsControl.ItemsControlFromItemContainer(tabItem); |
| parentItemsControl.Items.Remove(tabItem); |
Error 23 The type or namespace name 'ItemsControl' does not exist in the namespace 'Telerik.Windows.Controls' (are you missing an assembly reference?) D:\!_Projects\Teleric_EmptyProject WPF\XSoftArt.WPFengine\XSoftArt.WPFengine\BaseClasses\ListTemplate.xaml.cs 1102 63 XSoftArt.WPFengine
Its this becouse that code is for Silverlight..?How i must change it to get working..?
