MSDN > フォーラム ホーム > 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日 22: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日 22: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

すべての返信

  • 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日 17: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日 22: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
  • 2009年7月9日 1:34erick.thompson ユーザーのメダルユーザーのメダルユーザーのメダルユーザーのメダルユーザーのメダル
     
    Thanks, I like the approach, and I believe that it should work.

    Erick