Example #1
0
        /// <summary>
        /// Return whether mouse over an selected item.
        /// </summary>
        /// <param name="lbSender"></param>
        /// <returns></returns>
        public static bool IsMouseOverSelectedItem(TreeView tvSender)
        {
            TreeViewItem _selectedItem = UITools.GetTreeViewItem(tvSender, Mouse.GetPosition(tvSender));

            if (_selectedItem != null && tvSender.SelectedItem != null)
            {
                return(tvSender.SelectedItem.Equals(_selectedItem.DataContext));
            }
            return(false);
        }