Add custom icons for GN4 toolbars

Build 1501 on 14/Nov/2017  This topic last edited on: 6/Sep/2016, at 13:33

You can add new icons to your GN4 system.

Icons should follow some rules:

1.The dimensions of icon should be either 16x16 pixels, or 32x32 pixels. Other dimensions are not supported for Ted4/Fred4/EdAdmin4, but may be supported for browser or mobile interface.

2.The name of icon should contain the dimensions marker, e.g. xxx_16.yyy or xxx_32.yyy, e.g. btn_categories_32.png.

3.The allowed file formats are PNG, GIF and JPG.

4.Keep the color depth to 8 bits.

5.Ensure the vertical and horizontal resolution of 96dpi.

Where to store additional icons?

Store icons in the ICONS subfolder of the CONFIG folder, or on any other place.

How to import icons?

Import icons from the Command Prompt window, by executing the command:

<cmd4_full_path>\Cmd4 icon -in <icon_full_path\<icon_file_name> -name <icon_name> -size <icon_size>  -srvurl <server_url> -UserName <user> -Password <password)

Where:

<cmd4_full_path>Full path to CMD4 command-line utility, e.g. C:\Tera\GN4\bin\
<icon_full_path>Full path to the folder of the icon file, e.g. c:\tera\gn4\config\icons\
<icon_file_name>Icon file name with extension, e.g. tlb_skype_16.png
<icon_name>Icon name as it will appear in the database, e.g. tlb_skype
<icon_size>Icon size, e.g. 16
<server_url> URL of the server to upload the icon to, e.g. "http://test.teradp.com/gn4/adminsrv.asmx"
<user> Login name of the GN4 user who has permissions to upload icons, e.g. john
<password)Password of the user, e.g. doe

Example:

C:\tera\GN4\main\bin>Cmd4 icon -in c:\tera\gn4\main\config\icons\tlb_skype_16.png -name tlb_skype -size 16  -srvurl "http://test.teradp.com/gn4/adminsrv.asmx" -UserName john -Password doe

Use of icons in a menu command

This is not supported for custom icons.

Add a custom icon to a toolbar

Use this syntax:

  <l:TBBtn

    CommandParameter="OpenNavigator"

    ToolTip="Open Navigator">

     <l:ConfigIcon

      IconName="testIcon"

      Size="16"

    />

</l:TBBtn>

Add a custom icon to a pinned toolbar

You can display custom icons in the pinned toolbars, e.g.

        <l:ShellToolBar Name="Search">

          <l:PinnedSearchToolBarButton PinnedSearchIndex="0" ContentTemplate="{x:Null}" >

              <l:ConfigIcon IconName="t_trigger" Size="16"/>

       </l:PinnedSearchToolBarButton>