VinnieP79 Posted January 12, 2009 Report Share Posted January 12, 2009 Microsoft had provided some sample code that would draw a complex "living" visual tree into a "dumb" DrawingGroup. We're looking at incorporating this code into our application. I created a simple test that would render a ChartFX WPF chart to DrawingGroup (see attachment). Compile the solution and when the chart appears, right-click anywhere on it and you'll see a DrawingGroup version of the Chart appear in a new window. It looks like a transform or brush is being skipped someplace, and it seems like it's internal to the Chart. There's one border in the tree that isn't freezable in this sample, and I'd assumed this was the cause, but in my own tests using custom-styled charts without the unfreezable border, the problem still appears. I was wondering if you could take a peek and let me know if there's anything I can add to the DrawingContextExtensions.cs class that would handle whatever is happening inside the Chart, or if there's a change you can make internally on your end that would help remedy this. It seems like the former should be possible, as the Chart renders fine but it's just the visual-grabbing that seems to fail. Let me know if there's anything else I can provide that would help. Thanks! Quote Link to comment Share on other sites More sharing options...
JuanC Posted January 13, 2009 Report Share Posted January 13, 2009 I am not sure if this is a bug in our code or something wrong in DrawingContextExtensions, you can workaround this issue by setting the PlotArea.ClipToBounds to false to avoid clipping. Most of the time setting ClipToBounds to false will have no effect unless you are manually setting the Y min/max. chart.PlotArea.ClipToBounds = false;JuanC Quote Link to comment Share on other sites More sharing options...
VinnieP79 Posted January 13, 2009 Author Report Share Posted January 13, 2009 I just tested it, and it works for our usage! Thanks! I love easy fixes. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.