/// <summary> /// process headline click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void RssViewer_MouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e) { Headline item = (Headline)VisualHelper.GetObjectAtPoint <ListBoxItem>((ItemsControl)sender, e.GetPosition((IInputElement)sender)); if (item != null) { ProcessHelper.LaunchShellUri(new Uri(item.LinkUri)); } }
/// <summary> /// highlight drop item /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void listViewContent_DragOver(object sender, DragEventArgs e) { if (!e.Data.GetDataPresent("CBR.Book.Path")) { e.Effects = DragDropEffects.None; return; } ListSysObjectViewModel item = (ListSysObjectViewModel)VisualHelper.GetObjectAtPoint <ListViewItem>((ItemsControl)sender, e.GetPosition((IInputElement)sender)); if (item != null && item is ListSysDirectoryViewModel) { if (old != null) { old.IsHighlighted = false; } item.IsHighlighted = true; old = item; } }