Multiple Lines of Metadata in a single text container in Design & Print?

Started by BanjoTom, July 25, 2016, 10:50:37 PM

Previous topic - Next topic

BanjoTom

In creating some dynamic templates for Design and Print, I'm wondering if it's possible to put multiple lines of metadata into a single text container, with {cr}{lf} codes used to force a new line?  I've tried, but so far cannot seem to make that work.  What I'd like to achieve in a single text container is something like:

{File.MD.Composite\City\City\0}   {cr}{lf}
{File.MD.Composite\State\State\0}

So, if that works the way I hoped it would, that Text Container would show something like:

Lexington
Kentucky

without requiring the extra space that using TWO Text Containers seems always to use. 

I have tried to find an example of this in the Design and Print help, but . . . no luck, so far.  Is this possible?
— Tom, in Lexington, Kentucky, USA

JohnZeman

I never print anything so I can't test this but I see about 3/4th of the way down the page in the "Photo Books and Contacts Sheets" page in help it explains how you can use <LineBreak/> to force a new line if you enable the XAML Markup option.  Might be worth a try.

I copied the following example from that section.

<TextBlock TextWrapping="Wrap" FontFamily="Verdana" FontSize="14pt">
<Bold>This text is bold.</Bold> Now follows normal text that should wrap into a second line.
We can also use a LineBreak<LineBreak/>to start a <Italic> new line</Italic>.<LineBreak/><LineBreak/>
With <Run Foreground="#ff0000" FontFamily="Times New Roman" FontSize="36pt">a Run we can</Run> change color and font font <Run FontSize="48">whenever</Run> we want.<Run Background="#fcc0ff">Even the background color.</Run>.</TextBlock>

Mario

This is the correct way to do it. Text in the D&P is rendered via XAML, which gives you advanced options like using different font sizes and colors in the same container, using <Bold> to make text bold, or <LineBreak/> to add a line break.

See the section in the help mentioned by John and also the "Formatting Output with XAML" (search for XAML in the help index) for an overview of the available options and formatting tags.

To get you going quickly: Replace {cr}{lf} in your example with <LineBreak/>
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

It is like John and Mario wrotes here.

The mentioned help-section is in "XAML Bascics", if you search for xaml.
Wanted only stress, that this section explains a lot and gives several very good hints.
Best wishes from Switzerland! :-)
Markus

BanjoTom

Thanks, John, Mario and Markus, for pointing me in the right direction.  I'll work with this to refine my D&P templates. 

IMatch support is the BEST!!!   :)
— Tom, in Lexington, Kentucky, USA

Mario

QuoteI'll work with this to refine my D&P templates. 

Adding a bit of XAML markup here and there can make quite a difference. It gives you possibilities that exceed most of what the competition offers. Including advanced things like tables, in-line font and color changes etc.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook