Auto sizing drop targets and Reasons behind design decisions

Aug 16, 2012 at 7:41 AM

I would like to know how to size the DropTargets to AutoSize to Grid Cell's full size through xaml or Code Behind. Find my reference code below

  1. Drop target displays the glow when dragsource is hovered over droptarget. I see that drop target is thin strip in the stack panel. How do i make the drop target full width and height of the stack panel?
  2. What made the project developers think that Content of Drop Targets are going to be only of type Drag Sources. This is very detrimental in case I want the content within Drag Source not be draggable


<Grid Grid.Column="1" ShowGridLines="True" Height="640" VerticalAlignment="Bottom">
         <SolidColorBrush Color="AliceBlue" Opacity="0.6"></SolidColorBrush>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
      <StackPanel Grid.Column="0" Grid.Row="0" Background="#FFCADDE5">