Skip to content

Commit

Permalink
Got rid of unneeded variable.
Browse files Browse the repository at this point in the history
Since I changed it from the gridrow's height to the TreeViewItem's ActualHeight..
  • Loading branch information
claudekennilol committed Apr 22, 2014
1 parent 6d334ea commit 4de36d7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions GongSolutions.Wpf.DragDrop/DropTargetHighlightAdorner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ protected override void OnRender(DrawingContext drawingContext)

var tvItem = visualTargetItem as TreeViewItem;
if (tvItem != null && VisualTreeHelper.GetChildrenCount(tvItem) > 0) {
var grid = VisualTreeHelper.GetChild(tvItem, 0) as Grid;
if (grid != null) {
var descendant = VisualTreeHelper.GetDescendantBounds(tvItem);
rect = new Rect(tvItem.TranslatePoint(new Point(), this.AdornedElement), new Size(descendant.Width + 4, tvItem.ActualHeight));
}
var descendant = VisualTreeHelper.GetDescendantBounds(tvItem);
rect = new Rect(tvItem.TranslatePoint(new Point(), this.AdornedElement), new Size(descendant.Width + 4, tvItem.ActualHeight));
}
if (rect.IsEmpty) {
rect = new Rect(visualTargetItem.TranslatePoint(new Point(), this.AdornedElement), VisualTreeHelper.GetDescendantBounds(visualTargetItem).Size);
Expand Down

0 comments on commit 4de36d7

Please sign in to comment.