Print Page | Close Window

Creating toolbars from XAML icons

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=23929
Printed Date: 22 December 2024 at 5:52pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Creating toolbars from XAML icons
Posted By: calvi
Subject: Creating toolbars from XAML icons
Date 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.)



Replies:
Posted By: markr
Date 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!


Posted By: dbrookes
Date 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.


Posted By: sbre
Date 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?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net