photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: Darius1968 on May 14, 2022, 09:04:37 AM

Title: Word wrapping in tabular layout
Post by: Darius1968 on May 14, 2022, 09:04:37 AM
For one of the columns in my tabular layout: 
<TextBlock Background="#F39632" TextWrapping="Wrap"> {File.AT.File Info.Info|pereplace:{cr}{If}==</Run><LineBreak/>;prefix:<Run FontSize="7pt" FontWeight="Bold" Foreground="#000000">;postfix:</Run>}</TextBlock>

...Which is not displaying with text wrapped; Output is chopped off at the end of the first line.  So, what's wrong with the syntax? 
Title: Re: Word wrapping in tabular layout
Post by: Mario on May 14, 2022, 09:45:00 AM
Not all XAML constructs must work in all IMatch features.
When I recall correctly, line feeds are automatically processed by FW layouts, so no need for all the pereplace logic.
Try to remove all the stuff and replace {cr} or {lf} with AAA to see what the result is and it it does what you expect. Don't try to create too complex constructs.
They are usually not really needed and the XAML support i have included in FW layouts has been designed for simple things like changing a color or making some text bold. Not as a layout engine.
The FW tip and Design & Print handle more XAML than FW layouts, which have restrictions due to performance and layout considerations. A File Window must be capable of displaying 100,000 files, which means 100,000 x n markup blocks...

Basically, if your custom XAML markup does not work for FW layouts, it does not work.
I don't develop the XAML engine, I just integrate them for the benefit of the IMatch user base. It does what it does.