/// <summary> /// Code (from Infragistics) to show how to see if the item or the image was clicked. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ultraExplorerBar1_MouseDown(object sender, MouseEventArgs e) { // return; Infragistics.Win.UIElement lastElementEntered = ultraExplorerBar1.UIElement.LastElementEntered; Infragistics.Win.ImageUIElement imgUIElement; if (lastElementEntered is Infragistics.Win.ImageUIElement) { imgUIElement = (Infragistics.Win.ImageUIElement)lastElementEntered; } else { imgUIElement = (Infragistics.Win.ImageUIElement)lastElementEntered.GetAncestor(typeof(Infragistics.Win.ImageUIElement)); } // The actual subsequent Click event will use this property value // to determine how to act. if (imgUIElement == null) { //MessageBox.Show("Item Clicked"); VWA4Common.AppContext.TaskItemImageClicked = false; } else { //MessageBox.Show("Image Clicked"); VWA4Common.AppContext.TaskItemImageClicked = true; //this.ultraExplorerBar1.Groups[0].Items[0].Settings.AppearancesSmall.Appearance.Image = // Image.FromFile(Application.StartupPath + "./Resources/arrow_black.gif"); } }
/// Event Handlers /// <summary> /// Code (from Infragistics) to show how to see if the item or the image was clicked. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ultraExplorerBar1_MouseDown(object sender, MouseEventArgs e) { Infragistics.Win.UIElement lastElementEntered = ultraExplorerBar1.UIElement.LastElementEntered; Infragistics.Win.ImageUIElement imgUIElement; if (lastElementEntered is Infragistics.Win.ImageUIElement) { imgUIElement = (Infragistics.Win.ImageUIElement)lastElementEntered; } else { imgUIElement = (Infragistics.Win.ImageUIElement)lastElementEntered.GetAncestor(typeof(Infragistics.Win.ImageUIElement)); } // The actual subsequent Click event will use this property value // to determine how to act. if (imgUIElement == null) { //MessageBox.Show("Item Clicked"); VWA4Common.AppContext.TaskItemImageClicked = false; } else { //MessageBox.Show("Image Clicked"); VWA4Common.AppContext.TaskItemImageClicked = true; } }