locked
Rendering a DrawingGroup in WinRT RRS feed

  • Question

  • How does one go about drawing a <DrawingGroup> XAML resource like the one below in WinRT?

    <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
        <DrawingGroup x:Key="MyDrawing">
            <DrawingGroup.Children>
                <GeometryDrawing Brush="#0036A3C0" Geometry="F1 M 699,-1.00006L 751,-1.00006L 751,51L 699,51L 699,-1.00006 Z "/>
            </DrawingGroup.Children>
        </DrawingGroup>
    </ResourceDictionary>


    Sunday, September 16, 2012 12:56 AM

Answers

  • If using Expression Design, it would be better to target your XAML to Silverlight rather than WPF.

    Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)

    • Marked as answer by Min ZhuMember Tuesday, October 9, 2012 6:09 AM
    Sunday, September 16, 2012 10:17 PM

All replies

  • This is a WPF API that isn't in WinRT.

    Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)

    Sunday, September 16, 2012 3:28 AM
  • Understood. That's why I ask what the equivalent is in WinRT? There must be a way to draw a vector drawing exported from Expression Design. Are you saying that Expression Design is now obsolete?
    Sunday, September 16, 2012 10:23 AM
  • If using Expression Design, it would be better to target your XAML to Silverlight rather than WPF.

    Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)

    • Marked as answer by Min ZhuMember Tuesday, October 9, 2012 6:09 AM
    Sunday, September 16, 2012 10:17 PM
  • Yes but as far as I have read WinRT's XAML is different than Silverlight's XAML (i.e. no radial gradients, etc.) so it looks like we need a new export option in Expression Design to export to WinRT. Do you know if this is being worked on?
    Monday, September 17, 2012 2:23 AM
  • It is not being worked on, no.  However despite the one item you noted RadialGradientBrush, Silverlight will be closer in overall XAML structure (APIs) than will WPF.

    Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)

    Monday, September 17, 2012 3:21 PM
  • Closer than WPF fine but will we ever get proper export support from Expression Design to WinRT without having to hand code stuff? Is this a product of WinRT's immaturity? And why is there no work on better support for this new platform if it is to supplant the others? WPF was a great architecture. Silver-light was a subset with inferior features. Now we have WinRT that has even less. Not a good trend.

    I don't even see a way to create visual tree layers in WinRT.

    • Edited by Perry Manole Wednesday, September 19, 2012 1:41 AM
    Wednesday, September 19, 2012 1:39 AM