Table of Contents
  • Getting Started
  • EO.Pdf
  • EO.Web
  • EO.WebBrowser
  • EO.Wpf
  • Common Topics
  • Reference
    • .NET API Reference
      • EO.Base
      • EO.Base.UI
      • EO.Extensions
      • EO.Pdf
      • EO.Pdf.Acm
      • EO.Pdf.Contents
      • EO.Pdf.Drawing
      • EO.Pdf.Mvc
      • EO.Web
      • EO.WebBrowser
      • EO.WebBrowser.DOM
      • EO.WebEngine
      • EO.WinForm
      • EO.Wpf
        • EO.Wpf
        • Classes
          • BareButton Class
          • Bitmap Class
          • BitmapButton Class
          • BooleanDependencyPropertyRoutedEventArgs Class
          • Button Class
          • Calendar Class
          • CalendarDayButton Class
          • CalendarMonth Class
          • CancelEventArgs Class
          • CheckBox Class
          • ChoiceMaskedEditSegment Class
          • ComboBox Class
          • ComboBoxItem Class
          • DatePicker Class
          • DateRangeCollection Class
          • DateRangeCollectionConverter Class
          • DockContainer Class
          • DockItem Class
          • DockItemClosingEventArgs Class
          • DockItemCollection Class
          • DockItemEventArgs Class
          • DockItemNeededEventArgs Class
          • DockView Class
          • DockViewCollection Class
          • DockViewCommands Class
          • DockViewEventArgs Class
          • DockViewNeededEventArgs Class
          • DocumentItem Class
          • DropDown Class
          • DropDownButton Class
          • DropDownService Class
          • EditItemEventArgs Class
          • Effect Class
          • EffectManager Class
          • Expander Class
          • ItemDragEventArgs Class
          • ItemDragOverEventArgs Class
          • ItemDropEventArgs Class
          • ItemsControlHelper Class
          • LinkButton Class
          • ListBox Class
          • ListBoxItem Class
          • MaskedEdit Class
          • MaskedEditSegment Class
          • MaskMaskedEditSegment Class
          • Menu Class
          • MenuBase Class
          • MenuItem Class
          • MonthPicker Class
          • MultiplyConverter Class
          • NamedResourceKey Class
          • NegationConverter Class
          • NewItemRequestedEventArgs Class
          • NumericMaskedEditSegment Class
          • OpacityConverter Class
          • PatternMaskedEditSegment Class
          • PdfViewer Class
          • ProgressBar Class
          • RadialPanel Class
          • RadioButton Class
          • RangeSlider Class
          • RegexMaskedEditSegment Class
          • RingDefinition Class
          • RingDefinitionCollection Class
          • Runtime Class
          • SkinStyleInfo Class
          • Slider Class
          • SliderBase Class
          • SpinEdit Class
          • SplitButton Class
          • SplitLineHeightConverter Class
          • SplitView Class
          • StaticMaskedEditSegment Class
          • TabControl Class
          • TabItem Class
          • TabItemCloseEventArgs Class
          • TabItemEventArgs Class
          • TemplatePresenter Class
          • ThemeManager Class
          • ThemeNames Class
          • ThemeStyleInfo Class
          • TreeView Class
          • TreeViewItem Class
          • UIElementHelper Class
          • UnitConverter Class
          • WebControl Class
          • WebView Class
          • WebViewHost Class
          • WeekDaysCollection Class
          • WindowChrome Class
          • WindowCommands Class
          • YearPicker Class
        • Structures
        • Enumerations
        • Delegates
      • EO.Wpf.Gauge
      • EO.Wpf.Gauge.Shapes
      • EO.Wpf.Primitives
      • EO.Wpf.Themes.Aero
      • EO.Wpf.Themes.Classic
      • EO.Wpf.Themes.Luna
      • EO.Wpf.Themes.Metro
      • EO.Wpf.Themes.Royale
    • JavaScript API Reference
ItemsControlHelper.InsertItemBetween Method 

Insert an item between two adjacent items.

Syntax
 public static UIElement InsertItemBetween(
   object itemToInsert,
   UIElement targetContainer1,
   UIElement targetContainer2
);

Parameters

itemToInsert
The item to be inserted.
targetContainer1
The first item container UIElement of the two ajacent item.
targetContainer2
The second item container UIElement of the two ajacent item.

Return Value

The item container UIElement of the newly inserted item.

Remarks

Both targetContainer1 and targetContainer2 must be an item of an EO.Wpf ListBox or a TreeView. For items of other controls, please use InsertItem instead.

This method is typically used to handle a drop event where user drags an item from one ItemsControl and drop it in between two items of another or the same ItemsControl. The two adjacent items are usually items returned by ItemDropEventArgs.TargetItemContainer1 and ItemDropEventArgs.TargetItemContainer2. These two items can be on the same level (for example, items in a ListBox), or can be on different level (for example, items in a TreeView). In case they are on different levels, the two items are still visually next to each other (for example, the last child element of a previous item and item next to the parent item).

See Also