public override DataTemplate SelectTemplate(object item, DependencyObject container)
        {
            var listBoxItem = VisualTreeHelperEx.FindAncestor <ListBoxItem>(container);

            if (listBoxItem.IsSelected)
            {
                return(this.SelectedItemTemplate);
            }
            else
            {
                return(this.ItemTemplate);
            }
        }