Print Page | Close Window

Using SVG in Toolbar

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=23938
Printed Date: 25 June 2024 at 11:55pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Using SVG in Toolbar
Posted By: sbre
Subject: Using SVG in Toolbar
Date Posted: 10 January 2020 at 7:51am
Hello,

I want to use SVG images for my Toolbar like in sample "CommandBarIcons".

Therefore I am using:

XTPImageManager()->SetVectorIcon(_T("RT_XAML"), IDR_XAML_ICON_NORMAL_NEW, ID_FILE_NEW, XTP_DPI_X(16));

to load my image.

Having an xaml file that already contains more than one image I want to display only the first, how do I do that?

All I get is something like this:

... where the first and half of the second image are shown.

Thanks in advance.

Best regards,
sbre




XAML-File:
<Viewbox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Stretch="Uniform">
  <Canvas Width="32" Height="16" Canvas.Left="0" Canvas.Top="0">
    <Canvas>
      <Polygon Points="13.5,15.5 2.5,15.5 2.5,0.5 9.533,0.5 13.5,4.557" Fill="#FFFFFF" Stroke="#33383C" StrokeThickness="1" StrokeMiterLimit="5" StrokeLineJoin="Miter"/>
      <Polyline Points="13.5,4.5 9.5,4.5 9.5,0.5" Stroke="#33383C" StrokeThickness="1" StrokeMiterLimit="5" StrokeLineJoin="Miter"/>
    </Canvas>
    <Canvas Canvas.Left="16">
      <Polygon Points="13.5,15.5 2.5,15.5 2.5,0.5 9.533,0.5 13.5,4.557" Fill="#FF0000" Stroke="#33383C" StrokeThickness="1" StrokeMiterLimit="5" StrokeLineJoin="Miter"/>
      <Polyline Points="13.5,4.5 9.5,4.5 9.5,0.5" Stroke="#33383C" StrokeThickness="1" StrokeMiterLimit="5" StrokeLineJoin="Miter"/>
    </Canvas>
  </Canvas>
</Viewbox>





Replies:
Posted By: sbre
Date Posted: 04 February 2020 at 4:47am
Answer from the support team:

A XAML icon is considered as a whole image, it's not designed to using XAML for multiple icons. Just split those images in multiple files and it should work fine.




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