photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: Darius1968 on May 08, 2024, 05:34:04 AM

Title: Conditional Enumeration Of A StackPanel
Post by: Darius1968 on May 08, 2024, 05:34:04 AM
Consider the following XAML code: 
[color=#cccccc][size=5][color=#808080]<[/color][color=#569cd6]StackPanel[/color][color=#808080]>[/color]{File.MD.XMP::iptcExt\PersonInImage\PersonInImage\0|hasvalue:TB{File.MD.XMP::iptcExt\PersonInImage\PersonInImage\0|prefix:FORMAT;postfix:AAA}xxx;pereplace:TB==[color=#808080]<[/color][color=#569cd6]TextBlock[/color][color=#808080]>[/color];pereplace:xxx==[color=#808080]</[/color][color=#569cd6]TextBlock[/color][color=#808080]>[/color];pereplace:FORMAT==[color=#808080]<[/color][color=#569cd6]Run[/color] [color=#9cdcfe]FontSize[/color]=[color=#ce9178]"36pt"[/color][color=#808080]>[/color];pereplace:AAA==[color=#808080]</[/color][color=#569cd6]Run[/color][color=#808080]>[/color]}{File.MD.webstatement|hasvalue:TB{File.MD.webstatement|prefix:FORMAT;postfix:AAA}xxx;pereplace:TB==[color=#808080]<[/color][color=#569cd6]TextBlock[/color][color=#808080]>[/color];pereplace:xxx==[color=#808080]</[/color][color=#569cd6]TextBlock[/color][color=#808080]>[/color];pereplace:FORMAT==[color=#808080]<[/color][color=#569cd6]Run[/color] [color=#9cdcfe]FontSize[/color]=[color=#ce9178]"36pt"[/color][color=#808080]>[/color];pereplace:AAA==[color=#808080]</[/color][color=#569cd6]Run[/color][color=#808080]>[/color]}[color=#808080]</[/color][color=#569cd6]StackPanel[/color][color=#808080]>[/color][/size][/color]


The two <TextBlock> statements are successfully set up so as to enumerate if and only if the variable that is represented has a value.  So, my question now is if it is possible to somehow set up the <StackPanel> so that it enumerates if and only if one or both of the variables have a value? 
Title: Re: Conditional Enumeration Of A StackPanel
Post by: Mario on May 08, 2024, 08:53:31 AM
Did you try the hasvalue: (https://www.photools.com/help/imatch/var_basics.htm?dl=h-203) formatting function?