Microsoft Developer Network > 포럼 홈 > Windows Presentation Foundation (WPF) > Is there a way to convert a Canvas based visual element to a Drawing based one?
질문하기질문하기
 

답변됨Is there a way to convert a Canvas based visual element to a Drawing based one?

  • 2009년 7월 2일 목요일 오후 10:31erick.thompson 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    I have a number of Canvas based images that I would like to use in my application. The problem is, the system that I am using requires Drawing based images. It appears that for clip-art like images, the two have the same capabilities. Is there a way, either in code or a tool, to convert Canvas XAML to Drawing XAML?

    Thanks,
    Erick

답변

  • 2009년 7월 8일 수요일 오후 10:09mumin_abdul 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    Maybe you can adapt this: http://www.ericsink.com/wpf3d/7_XAML.html

    So maybe you could take a screen capture and then you can process it.
    Algorithms, Mathematics, and Programming http://www.algomaths.com/forum
    • 답변으로 표시됨erick.thompson 2009년 7월 9일 목요일 오전 1:34
    •  

모든 응답

  • 2009년 7월 8일 수요일 오전 7:34Bruce.ZhouMSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Hi erick,

    Would you please elaborate the problem? Currently, I did not understand what you want.

    Best regards,
    Bruce Zhou
    Please mark the replies as answers if they help and unmark if they don't.
  • 2009년 7월 8일 수요일 오후 5:55erick.thompson 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Bruce,

    Thanks for the response. Basically, I have XAML content that is expressed in terms of Canvases. A Canvas with contained Rectangles, Paths, sub-Canvases, etc. The Canvas works fine in an WPF window, but the 3rd party API that I am using requires that the content be contained within Drawings. What I was hoping is that there is a way to convert the Canvas based content to Drawing based content (i.e., DrawingGroup).

    I fully understand that there isn't 100% overlap between the two, but the XAML that I am working with could be expressed in either.

    Does that give you enough information?

    Thanks,
    Erick
  • 2009년 7월 8일 수요일 오후 10:09mumin_abdul 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    Maybe you can adapt this: http://www.ericsink.com/wpf3d/7_XAML.html

    So maybe you could take a screen capture and then you can process it.
    Algorithms, Mathematics, and Programming http://www.algomaths.com/forum
    • 답변으로 표시됨erick.thompson 2009년 7월 9일 목요일 오전 1:34
    •  
  • 2009년 7월 9일 목요일 오전 1:34erick.thompson 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Thanks, I like the approach, and I believe that it should work.

    Erick