Question: In C I could write a plugin by having a shared library implement the following interface:

```
extern "C" int initialize(SomeArgument * state);
extern "C" int shutdown(SomeArgument * state);

```

Obviously this is a *very* high level interface, but I think it gets the point across. I've heard that a good use of reflection is to write plugins, but why would that be superior to what I have here? Using an interface like this gives the following advantages:

* faster (reflection isn't fast, both looking up methods and calling indirectly)
* memory (reflection has memory overhead)
* straight-forward (entry/exit points for the plugin are intuitively obvious)

Am I just missing something?

Answer: 
Try this,

```
DataGridRow row = (DataGridRow)grid.ItemContainerGenerator.ContainerFromIndex(index);
        if (row == null)
        {
                          grid.UpdateLayout();
            grid.ScrollIntoView(grid.Items[index]);
            row = (DataGridRow)grid.ItemContainerGenerator.ContainerFromIndex(index);
        }

```
Use this subscription:

```
TheListBox.ItemContainerGenerator.StatusChanged += (sender, e) =>
{
  TheListBox.Dispatcher.Invoke(() =>
  {
     var TheOne = TheListBox.ItemContainerGenerator.ContainerFromIndex(0) as ListBoxItem;
       if (TheOne != null)
         // Use The One
  });
};

```