This is a migrated thread and some comments may be shown as answers.

WPF scrollbar and drag drop tooltip styling

7 Answers 114 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Julian
Top achievements
Rank 1
Julian asked on 07 Aug 2009, 09:26 AM
Hi

I would like to change the WPF Treeview scrollbar colours, editing the template has yielded some minor results, I managed to change the color of the bottom right area to green (where the horizontal and vertical scrollbars would interleave if extended) but I cannot change the main scrollbar colors, I think this would be the Thumb and RepeatButtons and other such scrollbar elements. It is as if values are coerced from some higher priority property, as I can find the elements, but changes are not reflected at design or runtime. Screenshot: http://i30.tinypic.com/x21gld.png


My second request is how to make the drag and drop tooltip appear adjacent (to the right) of the mouse pointer when the operation starts. This was the behaviour I had with an earlier version of Telerik WPF but upgrading to version 2009.2.701.35 seems to have broken this. The issue is that the drag/drop tooltip is appearing about 100 pixels to the right of the mouse pointer, which looks weird.
Any ideas would be helpful. Screenshot: http://i29.tinypic.com/6t3cqt.png

Regards

7 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 12 Aug 2009, 11:37 AM
Hi Julian Borthwick,

We are using the default scrollviewer from the WPF platform without modifications. You should style it the way you like and then to apply that style in the template of the RadTreeView.

The second issue you are reporting about  the tooltip drag position is fixed in the SP1 release that will be available later today. Let us know if you are still epxeriencing the problem with the latest version.

Regards,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Julian
Top achievements
Rank 1
answered on 14 Aug 2009, 01:45 PM
Hi

Thanks for the suggestion on the first issue, that helped resolve the issue.

The second issue with the RadTree persists through the next version I'm afraid (2009 Q2 0813), being only -marginally- improved.
Currently, when the element is dragged near the tree the distance between the mouse pointer and the dragged element is OK-ish, but as you move the mouse away from the tree, the dragged element moves away at a higher rate! So if you move say 100 pixels to the right of the RadTreeView, the element moves around 150 pixels. If you move 300 pixels it moves 500. So the distance is not fixed! Can you please have a look at this in more detail?

Many thanks
0
Valentin.Stoychev
Telerik team
answered on 14 Aug 2009, 03:17 PM
Hello Julian Borthwick,

I just checked our online WPF demos: http://demos.telerik.com/wpf/

and the issue is not reproducible there - e.g. you can drag the element outside of the treeview and the preview tooltip is always in the correct place - see attached screenshot.

Is there anything specific in your scenario? In what panel is the treeview hosted? do you get this behavior on a plain page with just the treeview there?

Thanks!

Best wishes,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Julian
Top achievements
Rank 1
answered on 17 Aug 2009, 10:23 AM
The problem occurs when the RadTreeView exists within a viewbox panel. My guess is that the object translation does not take into account this fact.
0
Miroslav
Telerik team
answered on 17 Aug 2009, 04:23 PM
Hi Julian Borthwick,

I tried putting the TreeView in a ViewBox and still it seems to move the DragCue correctly. Quite possibly there is something we are missing.

On a technical note the DragCue of the TreeView is an Adorner that appears in the AdornerLayer of the first panel of the content of the current window. This generally tends to be an adorner layer in the Window's control template. If there are transformations to this adorner layer (or the elements that contain it) there may be problems.

Could you try putting an AdornerDecorator for the root visual of the content of the window where the TreeView is present?

Could you provide more information for your scenario or best, send us a sample project where this issue occurs?

I am sending the simple project that I used to test this.

Hopefully we will be able to quickly get to whatever is causing this,

Greetings,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Julian
Top achievements
Rank 1
answered on 19 Aug 2009, 09:13 AM
Hello

I have prepared a project for you to download. My setup is Vista x64, .NET 3.5 sp1, and WPF RadControls 2009.2.813.35.
You may download this from:
http://www.mediafire.com/?sharekey=f44ac6bb730cd5c60dec85adfe0a530ae545834ad1271d13c95965eaa7bc68bc

Simply try to drag a tree view item from the top left of the screen to the bottom right to see how the item moves ahead of the mouse pointer in a linear way.

Regards,
0
Accepted
Miroslav
Telerik team
answered on 20 Aug 2009, 10:35 AM
Hi Julian,

Thank you for sending the sample project!

There was a bug in the way the DragDrop discovers the root AdornerLayer. The workaround is to put a panel (e.g. Grid) as the root element of the application, like so:

<Grid> 
    <Viewbox> 
        <WpfApplication1_UserControls:DocumentManagerContainer x:Name="DocumentsManager" 
                Margin="{DynamicResource PageHeadingMargin}" /> 
    </Viewbox> 
</Grid> 


Your Telerik Points have been updated for your feedback.

Hopefully this will work in your case,

Regards,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
TreeView
Asked by
Julian
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Julian
Top achievements
Rank 1
Miroslav
Telerik team
Share this question
or