Ignoring Paragraph Marks In XAML

Started by Darius1968, April 30, 2024, 05:58:31 AM

Previous topic - Next topic

Darius1968

Consider:

<Grid.RowDefinitions>
    <RowDefinition />
    <RowDefinition />
</Grid.RowDefinitions>


For the above to work in either the File Window Tip or in a Custom Template of a layout, the paragraph marks would first need to be removed.  Instead of removing the paragraph marks, is it in any way possible to have IMatch ignore those marks? 

Mario

What is a paragraph mark and why would it have to be ignored?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

Because they prevent the file window tip from working. 

Darius1968

For instance, in the File Window Tip...

This works:
<StackPanel Orientation="Vertical">  <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Justify">Textblock 1</TextBlock><TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Justify">Textblock 2</TextBlock></StackPanel>

This does not work: 
<StackPanel Orientation="Vertical">
  <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Justify">Textblock 1</TextBlock>
  <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Justify">Textblock 2</TextBlock>
</StackPanel>


So, while the paragraphs in the 2nd code help the reader to follow, it is not well taken by the editor in the File Window Tip, and therefore those paragraph marks need removed, or there has to be a way for them to be ignored, and I'm asking is there any such way? 

Mario

The File Window tip is designed to render pretty simple XAML. The edit fields are standard Windows single line edit controls.
If you copy & paste text that contains multiple lines, the edit control will not accept them.

If you have formatted your XAML that way somewhere else, you have to remove the line breaks (what you refer to as paragraph marks) before copying it into the single line edit field.

Using stack panels in something like a File Window Tip seems quite a bit of overkill.
The File Window Tip already allow for multiple rows, which is way you usually never need stack panels.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook