This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Using the CustomNodeType sample, if we use DynamicResources for constructing the CursorVisual, the cursor doesn't display. Take this example:
Notice that we changed the Style property of the CursorVisual Path to use a DynamicResource. When doing this, nothing renders when we drag the shape from the toolbox. It's worth noting that using a DynamicResource for the DiagramNodeTool itself works as expected. In this contrived example, it's simple to just use a StaticResource. In our application, we have global style definitions in a separate assembly, so we need to be able to use DynamicResources. Is there another way to approach this, or is this something that can be resolved? |
|
|
Hello The only way I could get this to work is to include a resource dictionary containing the ToolBoxCursorVisual style as a merged dictionary on the Path like this:
An ugly solution, but at least it worked. Jason Fauchelle |
|
|
That's an interesting workaround, but is a less-than-desirable solution. Do you have any insight as to why the CursorVisual is not playing nicely with DynamicResource references? |
|
|
Hello I think it has something to do with the CursorVisual not being directly in the visual tree in xaml. It is simply held by a property which we then use to add to the adorner layer at runtime. This is the only difference I can find between the CursorVisual and other objects which just work with dynamic resources. I have not found a way to resolve this which is a shame because the solution I mentioned is far from ideal. If you happen to find information about making this more convenient we'd love to hear about it. Jason Fauchelle |
|