/// <summary> /// Raises the PrepareContainerForItem event. /// </summary> protected void OnPrepareContainerForItem(PrepareContainerForItemEventArgs args) { if (PrepareContainerForItem != null) { PrepareContainerForItem(this, args); } }
private void ItemsControl_PrepareContainerForItem(object sender, PrepareContainerForItemEventArgs e) { var element = e.Element as UIElement; // handle events on the elements added to the ItemsControl element.MouseLeftButtonUp += Element_MouseLeftButtonUp; element.ManipulationStarted += Element_ManipulationStarted; element.ManipulationDelta += Element_ManipulationDelta; }