I have the following definition for a drag source:
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> <ig:DragDropManager.DragSource> <ig:DragSource IsDraggable="True" DragChannels="ChannelA" Drop="DragSource_Drop" DragStart="DragSource_DragStart"> </ig:DragSource> </ig:DragDropManager.DragSource> <TextBlock Text="Barcode" /> <TextBlock Text="Price" /> <TextBlock Text="Description" /> <TextBlock Text="Sale Price" /> <TextBlock Text="Extended Description" /> </StackPanel>
When I drag the text "Extended Description" the cursor looks like this:
When I drag the text "Sale Price", however, the cursor looks like this:
How can I get the text to be the correct size? I've looked for a transformation I can set/reset but there doesn't appear to be one.
If all the items in the panel are approximately the same size the issue is still there, but less noticeable. However, in the real system the items to be dragged will be the range of lengths shown here.
Great, 5 minutes after I post this I find a solution.
By changing the TextBlock definitions to be:
<TextBlock Text="Barcode" HorizontalAlignment="Left"/> <TextBlock Text="Price" HorizontalAlignment="Left"/> <TextBlock Text="Description" HorizontalAlignment="Left"/> <TextBlock Text="Sale Price" HorizontalAlignment="Left"/> <TextBlock Text="Extended Description" HorizontalAlignment="Left"/>
i.e. explicitly setting the horizontal alignment it cures the problem.