Creating toolbars from XAML icons |
Post Reply |
Author | |
calvi
Groupie Joined: 20 March 2004 Location: United Kingdom Status: Offline Points: 43 |
Post Options
Thanks(0)
Posted: 09 December 2019 at 1:42pm |
Has anybody successfully created toolbars from XAML icons? I have a set of SVG icons created with Inkscape and also saved as XAML files, but XTP 19.1 has undocumented limitations which causes it to fail to load them. If you've succeeded in doing this, how did you create the XAML files?
(I submitted a help ticket on this 2 weeks ago, but with no response.) |
|
markr
Senior Member Joined: 01 August 2004 Status: Offline Points: 443 |
Post Options
Thanks(0)
|
CodeJock's markup engine supports a subset of XAML, so there are indeed some limitations.
Last time I played with it, the lack of canvas clipping support was a deal-breaker for me (nearly all of the third-party XAML icons I've licensed use clipping for overlays). But most other (simpler) XAML icons I tried rendered quite well. And I believe XTP 19.1 adds ViewBox support, which is also very helpful.
My recommendation would be to experiment with a XAML icon collection that uses simple path constructs (without canvas clipping). Conversions from SVG to XAML will often not meet such criteria. I usually just test them with CodeJock's MarkupPad to make sure they render as expected. Let us know how it goes, and good luck! |
|
dbrookes
Groupie Joined: 30 August 2019 Location: Australia Status: Offline Points: 70 |
Post Options
Thanks(0)
|
We've been experimenting with this as well on XTP 19.0 and now XTP 19.1. They work quite well. XAML icons from the VS icon pack tend not to work as they use DrawingBrush which is not supported yet by XTP afaik. XAML icons from the Axialis icon packs work okay. I've had some success manually converting svg icons from the VS icon pack to compatible XAML icons for testing. The Path data syntax is the same between the two file types. There's probably a better way to do this :) Have a look at the CommandBarIcons sample or RibbonSample sample for some examples. There are still some minor-ish issues I've logged that are in progress...
- Ribbon buttons still prefer a larger size even if only a 16 vector icon is available. - When using CXTPImageManagerVectorImageHandle::CreateMarkupHandle to load a XAML string the markup context doesn't seem to be released cleanly. Hopefully this isn't my bad but this can crash the CommandBarIcons sample. We load our icons from a zip file. So I would recommend putting your XAML icons in your resources for now like in the samples until that is resolved. |
|
sbre
Groupie Joined: 10 January 2020 Status: Offline Points: 12 |
Post Options
Thanks(0)
|
I would be also very interested in the clipping support. Does anyone know when it will be supported?
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |