I had some trouble today getting the actual control that hosts data in a WPF listbox. The magic class is ListBox.ItemContainerGenerator used like this:
MyStateObject current = this.myListBox.SelectedItem as MyStateObject; ListBoxItem lbi = this.myListBox.ItemContainerGenerator.ContainerFromItem(current) as ListBoxItem; lbi.Margin = new Thickness(10);