Where Is DrawingBrush In Windows Metro for XAML

坚强是说给别人听的谎言 提交于 2019-12-07 07:43:25

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/10562768/where-is-drawingbrush-in-windows-metro-for-xaml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!