Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Creating toolbars from XAML icons
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Creating toolbars from XAML icons

 Post Reply Post Reply
Author
Message
calvi View Drop Down
Groupie
Groupie


Joined: 20 March 2004
Location: United Kingdom
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote calvi Quote  Post ReplyReply Direct Link To This Post Topic: Creating toolbars from XAML icons
    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.)
Back to Top
markr View Drop Down
Senior Member
Senior Member


Joined: 01 August 2004
Status: Offline
Points: 443
Post Options Post Options   Thanks (0) Thanks(0)   Quote markr Quote  Post ReplyReply Direct Link To This Post Posted: 09 December 2019 at 6:54pm
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!
Back to Top
dbrookes View Drop Down
Groupie
Groupie


Joined: 30 August 2019
Location: Australia
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote dbrookes Quote  Post ReplyReply Direct Link To This Post Posted: 11 December 2019 at 7:57pm
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.
Back to Top
sbre View Drop Down
Groupie
Groupie


Joined: 10 January 2020
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote sbre Quote  Post ReplyReply Direct Link To This Post Posted: 13 January 2020 at 4:08am
I would be also very interested in the clipping support. Does anyone know when it will be supported?
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.