Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where Is DrawingBrush In Windows Metro for XAML

Im writing a Windows Metro XAML based app in C#, and I want to draw grid lines with a brush on my custom grid control.

In WPF I would create a DrawingBrush to do the job, but there seems to be no equivalent in Metro ???

Does anyone know if this feature exists under another name, or that you achieve the same result differently ?

As an additional note, I do not want to draw lines etc directly on my grid (adding lines to my panel's children collection), It really needs to be done via the background property - i.e a brush.

Thanks

like image 540
Dean Chalk Avatar asked Nov 05 '22 00:11

Dean Chalk


1 Answers

WinRT-XAML stack is closer to Silverlight - also in its limited graphics features when compared with Silverlight. The only TileBrush for WinRT apps is the ImageBrush, so you would need to save your drawing as an image first. You can't do that with the XAML stack either though - because there is no drawing class and WriteableBitmap has no Render() method. On the other hand - you can access DirectX for any more advanced features and combine some DirectX code with your XAML.

like image 124
Filip Skakun Avatar answered Dec 30 '22 16:12

Filip Skakun