Support for BaseAlignment for Inline elements
Hey,
Is there any support planned for BaseAlignment for Inline elements? (https://docs.microsoft.com/en-us/dotnet ... etcore-3.1)
We have a system in place that parses text and inserts icons and styling elements into the text. For icons inside a textblock, we use an InlineUIContainer with an image inside. However we have no control over how this image is positioned vertically. The default seems to follow the BaseLine, which doesn't look correct, especially when using different fonts. In our case Center or even Bottom would be the best case for us.
Attached an image that shows various values for BaseAlignment. Test Xaml below that mimics the output of the textparser (and is used in the image).
So yeah, is this something that is on the planning?
Is there any support planned for BaseAlignment for Inline elements? (https://docs.microsoft.com/en-us/dotnet ... etcore-3.1)
We have a system in place that parses text and inserts icons and styling elements into the text. For icons inside a textblock, we use an InlineUIContainer with an image inside. However we have no control over how this image is positioned vertically. The default seems to follow the BaseLine, which doesn't look correct, especially when using different fonts. In our case Center or even Bottom would be the best case for us.
Attached an image that shows various values for BaseAlignment. Test Xaml below that mimics the output of the textparser (and is used in the image).
Code: Select all
<StackPanel Orientation="Vertical" Background="DarkGray">
<TextBlock>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
<InlineUIContainer><Rectangle Fill="Orange" Width="20" Height="20"/></InlineUIContainer>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
</TextBlock>
<TextBlock>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
<InlineUIContainer BaselineAlignment="Top"><Rectangle Fill="Orange" Width="20" Height="20"/></InlineUIContainer>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
</TextBlock>
<TextBlock>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
<InlineUIContainer BaselineAlignment="Center"><Rectangle Fill="Orange" Width="20" Height="20"/></InlineUIContainer>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
</TextBlock>
<TextBlock>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
<InlineUIContainer BaselineAlignment="Bottom"><Rectangle Fill="Orange" Width="20" Height="20"/></InlineUIContainer>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
</TextBlock>
<TextBlock>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
<InlineUIContainer BaselineAlignment="Baseline"><Rectangle Fill="Orange" Width="20" Height="20"/></InlineUIContainer>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
</TextBlock>
<TextBlock>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
<InlineUIContainer BaselineAlignment="TextTop"><Rectangle Fill="Orange" Width="20" Height="20"/></InlineUIContainer>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
</TextBlock>
<TextBlock>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
<InlineUIContainer BaselineAlignment="TextBottom"><Rectangle Fill="Orange" Width="20" Height="20"/></InlineUIContainer>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
</TextBlock>
<TextBlock>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
<InlineUIContainer BaselineAlignment="Subscript"><Rectangle Fill="Orange" Width="20" Height="20"/></InlineUIContainer>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
</TextBlock>
<TextBlock>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
<InlineUIContainer BaselineAlignment="Superscript"><Rectangle Fill="Orange" Width="20" Height="20"/></InlineUIContainer>
<Span FontSize="20">
<Run Text="test test"/>
</Span>
</TextBlock>
</StackPanel>- Attachments
-
- Preview
- BaseAlignmentComparison.png (23.2 KiB) Viewed 2349 times
Re: Support for BaseAlignment for Inline elements
Hi, thanks for the detailed information. Could you please create a ticket about this feature? We should have this implemented.
Re: Support for BaseAlignment for Inline elements
Thanks for your reply! Looking forward to this feature! Created #0001684
Re: Support for BaseAlignment for Inline elements
Thanks for reporting!
Who is online
Users browsing this forum: Bing [Bot], nadjibus and 13 guests