Hello,
I'm attempting to add and remove items to the RadTileView. I'm having trouble removing the item from the collection. I'm sure I'm missing something obvious.
When I click the button i get a KeyNotFoundException.
Any help would be appreciated.
Thanks again,
Boots
I'm attempting to add and remove items to the RadTileView. I'm having trouble removing the item from the collection. I'm sure I'm missing something obvious.
public partial class Window1 : Window |
{ |
RadTileViewItem item0 = new RadTileViewItem() { Header = "1" }; |
RadTileViewItem item1 = new RadTileViewItem() { Header = "2" }; |
RadTileViewItem item2 = new RadTileViewItem() { Header = "3" }; |
public Window1() |
{ |
InitializeComponent(); |
tileview.Items.Add(item0); |
tileview.Items.Add(item1); |
tileview.Items.Add(item2); |
} |
void btn_Click(object sender, RoutedEventArgs e) |
{ |
tileview.Items.Remove(item1); |
} |
} |
<Window x:Class="addDeleteTileViewItem.Window1" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"> |
<Grid> |
<Grid.RowDefinitions> |
<RowDefinition Height="30" /> |
<RowDefinition /> |
</Grid.RowDefinitions> |
<Button Click="btn_Click" /> |
<telerik:RadTileView Name="tileview" Grid.Row="1" /> |
</Grid> |
</Window> |
When I click the button i get a KeyNotFoundException.
Any help would be appreciated.
Thanks again,
Boots