Specify icons for pinned search toolbars

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

Since the version 1,5, you can define icons to be displayed in pinned toolbars, or load and use custom icons.

Define icons to be displayed in pinned toolbars

Examples

<l:GlobalPinnedSearchToolBarButton PinnedSearchIndex="0" Icon="%3_find_16.png"/>

<l:GlobalPinnedSearchToolBarButton PinnedSearchIndex="1" Icon="#GN4/3_find_16.png"/>

<l:GlobalPinnedSearchToolBarButton PinnedSearchIndex="2" Icon="/WinUI;component/Resources/Bitmaps/GN4/3_find_16.png"/>

All three Icon values above reference the same icon embedded in the WinUI assembly, with the % and # characters being replaced with /WinUI;component/Resources/Bitmaps/GN4/ and /WinUI;component/Resources/Bitmaps/ respectively.

The "PinnedSearchIndex" value can be in the range 0-99 allowing 100 pinned searches per set.

The value "PinnedSearchIndex" is displayed in the toolbar button over the icon, but it can be hidden by setting the "IsShowIndex" to false, e.g.

<l:GlobalPinnedSearchToolBarButton PinnedSearchIndex="0" IsShowIndex="False" Icon="%120_open_16.png"/>

Custom icons in pinned toolbars

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>

Create the icon in the format PNG, JPG or GIF, with 16 x 16 pixels dimension, and import it in the database with:

cmd4 icon -in ..\config\Icons\GN4\iconfilename.ext -name iconname -size 16 -userName xxxx -password yyyy

where xxxx is the name of a GN4 user who can logon to system with sufficient permissions to perform this operation and yyyy is the password.

Note: the above connects to the default connection: should you want to specify the connection or server name, see cmd4 examples.

Note: the iconname and size should be is the same as specified in <l:ConfigIcon IconName="t_trigger" Size="16"/>