photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: Ooteboe on February 03, 2018, 02:00:30 PM

Title: Custom png for Pending metadata
Post by: Ooteboe on February 03, 2018, 02:00:30 PM
Playing with variables (all new to me). In order to get a custom pencil for pending metadata i've tried the following code in the file window: {File.MetadataModified|cast:int;is:0,;is:1,<Image Source='file://C:\Pencil.png></Image>'} Doesn't work. Alternative text in stead of the png does. Am I doing something wrong?

Thanks, Hans
Title: Re: Custom png for Pending metadata
Post by: Mario on February 03, 2018, 02:20:14 PM
Try using / in your path.

Maybe check out the Using Custom Icons in File Window layouts (https://www.photools.com/3906/custom-icons-file-window/) article in the IMatch knowledge-base. Many other useful articles there.
Title: Re: Custom png for Pending metadata
Post by: loweskid on February 03, 2018, 02:37:43 PM
I have been using the example given in your knowledgebase article to display two icons if the Keywords or Description fields are empty. However this stopped working after the last update and now shows the text as described by Ooteboe.  I assumed this was due to the XAML problem as described in the topic ....

https://www.photools.com/community/index.php?topic=7645

which, I hope.. :), has been fixed for the next update - bug fix #00477.

This is the code I am using (in Header 1 right)....

{File.MD.hierarchicalkeywords|hasvalue:;default:<Image Source='file://C:\ProgramData\photools.com\IMatch5\vl_icons\nokeys.png'></Image>}{File.MD.description|hasvalue:;default:<Image Source='file://C:\ProgramData\photools.com\IMatch5\vl_icons\nodesc.png'></Image>}
Title: Re: Custom png for Pending metadata
Post by: Ooteboe on February 04, 2018, 01:33:25 PM
Thanks for your reply. So i'll wait for the next update. In the meantime i'll stick with text ('MD!') and then later the pencil.png.

Hans
Title: Re: Custom png for Pending metadata
Post by: loweskid on February 09, 2018, 06:10:59 PM
Just to confirm - this has now been fixed for me in the latest update.  Thanks Mario.
Title: Re: Custom png for Pending metadata
Post by: Ooteboe on February 10, 2018, 11:29:23 AM
For me it still doesn't work. I use the following code: {File.MetadataModified|cast:int;is:0,;is:1,<Image Source='file://C:/Pencil.png></Image>'} I've tried backslashes too, all the same.

Hans
Title: Re: Custom png for Pending metadata
Post by: Mario on February 10, 2018, 11:42:53 AM
Define "Does not work". What happens. Nothing displayed? Text displayed? Error message?

You did use ' (should better be ") and there is a missing " after the .png. This may be it already, our XAML is invalid.
Title: Re: Custom png for Pending metadata
Post by: Ooteboe on February 10, 2018, 03:22:30 PM
Thanks, this works. After placing a ' after the .png.

Hans