Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
445
Copy to Clipboard
posted

I am trying to copy a XamDataChart to my clipboard, this is what i am currently using:

      

        Dim OldSize As New Size(Me.ActualWidth, Me.ActualHeight)
        copyChart.Measure(New Size(Me.ActualWidth, Me.ActualHeight))
        copyChart.Arrange(New Rect(0, 0, Me.ActualWidth, Me.ActualHeight))

        Dim Tb As New RenderTargetBitmap(CInt(Me.ActualWidth), CInt(Me.ActualHeight), 96, 96,             PixelFormats.Pbgra32)
        copyChart.UpdateLayout()
        Tb.Render(copyChart)
        Clipboard.SetImage(Tb)

 

This creates the chart and copies it to the clipboard, but the lines aren't on there, and it's not drawn quite correctly...is there a quick snippet that will copy a chart to clipboard?