Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Using SVG in Toolbar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Using SVG in Toolbar

 Post Reply Post Reply
Author
Message
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 Topic: Using SVG in Toolbar
    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>


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: 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.

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.109 seconds.