I have an ItemsControl which has a Canvas as ItemsPanelTemplate and an ellipse as ItemTemplate. What I want to do is when I drag an existing Ellipse I want it to be removed out of my observable collection of EllipseXY objects, meaning it will be removed from my Canvas as well. My drag event passes on an EllipseXY object which can then be compared in the Drop event. However when I remove the EllipseXY object in my collection it remains shown on my canvas despite the Remove being triggered. What could be the possible reasons?

Model:

```
public class EllipseXY
{
    public double X { get; set; }
    public double Y { get; set; }
    public Ellipse EllipseObject { get; set; }
}

```

Viewmodel:

```
private ObservableCollection<EllipseXY> ellipses;
    public ObservableCollection<EllipseXY> Ellipses
    {
        get { return ellipses; }
        set
        {
            if (ellipses == null)
            {
                ellipses = new ObservableCollection<EllipseXY>();
                ellipses = value;
            }
            else
            {
                ellipses = value;

            }
RaisePropertyChanged("Ellipses");
        }
    }

 #region EllipseXY
    public EllipseXY EllipseXY
    {
        get { return ellipsexy; }
        set
        {
            ellipsexy = value;
            RaisePropertyChanged("EllipseXY");
        }
    }

    public Ellipse EllipseObject
    {
        get { return ellipsexy.EllipseObject; }
        set
        {
            ellipsexy.EllipseObject = value;
            RaisePropertyChanged("EllipseObject");
        }
    }

    public double X
    {
        get { return ellipsexy.X; }
        set
        {
            ellipsexy.X = value;
            RaisePropertyChanged("X");
        }
    }

    public double Y
    {
        get { return ellipsexy.Y; }
        set
        {
            ellipsexy.Y = value;
            RaisePropertyChanged("Y");
        }
    }
    #endregion

```

Drag:

```
DataObject dragObject= new DataObject("dragObject", elliXY);
DragDrop.DoDragDrop(dragEllipse, dragObject, DragDropEffects.Move);

```

Drop (not all the code but the only relevant one to this question):

```
Model.EllipseXY ellipseXY = (Model.EllipseXY)e.Data.GetData("dragObject");
Ellipses.Remove(ellipseXY);

```

I also tried using LINQ:

```
        EllipseXY test = (EllipseXY)Ellipses.Where(ellipse => ellipse.EllipseObject.Fill == dropEllipse.Fill);
        Ellipses.Remove(test);

```

But with no success :P

Edit XAML:

```
 <ItemsControl ItemsSource="{Binding Ellipses}" DockPanel.Dock="Top">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <Canvas Name="CanvasDrop" Margin="10,0,10,0" Width="500" Height="400"
                            ClipToBounds="True" Background="{Binding Image}" AllowDrop="True" IsItemsHost="True">
                        <i:Interaction.Triggers>
                            <i:EventTrigger EventName="MouseMove">
                                <gala:EventToCommand Command="{Binding DragCommand}" PassEventArgsToCommand="True" />
                            </i:EventTrigger>
                            <i:EventTrigger EventName="Drop">
                                <gala:EventToCommand Command="{Binding DropCommand}" PassEventArgsToCommand="True" />
                            </i:EventTrigger>
                        </i:Interaction.Triggers>
                    </Canvas>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemContainerStyle>
                <Style TargetType="ContentPresenter">
                    <Setter Property="Canvas.Left" Value="{Binding Path=X}"/>
                    <Setter Property="Canvas.Top" Value="{Binding Path=Y}"/>
                </Style>
            </ItemsControl.ItemContainerStyle>
            <ItemsControl.ItemTemplate>
                <DataTemplate DataType="Ellipse">
                    <Ellipse Fill="{Binding EllipseObject.Fill}" Style="{StaticResource ellipseStyle}" />
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>

```