Can I have a composite form as a resource in WinRT XAML?

I am developing a Windows application in the style of Metro 8, and I want to use vector images. Since there seems to be no direct support for svg images, I am trying to use a xaml fragment consisting of several shapes (path and some lines) as an image. I would like to have a resource dictionary entry with a composite form and be able to include it on different pages. Ideally, I would also like to be able to resolve a specific compound form from a property associated with the data.

From what I read, the WPF approach was to have VisualBrushor DrawingBrush, consisting of figures, but there are no such classes in Windows 8 (and it seems that you can’t even extract from Brush).

How can I do this using WinRT UI?

+1
source share
3 answers

No, you cannot use DrawingBrush as the value of the background property in WinRT XAML. This is too bad, right? It seems like very powerful features for setting up object fill with vector layouts. In fact, DrawingBrush is not yet part of Windows 8. What is, is. So far, images are a great solution. But we feel your pain.

I could also add that VisualBrush is also not part of WinRT-XAML.

+1
source

XAML . , XAML , , "". , , , , XAML, , . , , .

0

Windows8 has a way to have vector graphics in it - just use the ViewBox + Canvas and Path elements. This works well in my opinion, although I skip VisualBrush.

0
source

Source: https://habr.com/ru/post/1540834/


All Articles