This is a migrated thread and some comments may be shown as answers.

Inline UI and Image not displaying at runtime

1 Answer 64 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 07 Apr 2011, 04:50 PM

I'm just starting out with RichTextBox and having an issue displaying InlineUIElements and ImageInline objects.
I've been using the rest of the suite without this type of issue.

The odd thing is that it shows up at design time.

Is there anything I'm missing?

<UserControl x:Class="FOCUSAlert.MainPage"
        mc:Ignorable="d" d:DesignWidth="860" d:DesignHeight="530">
    <Grid x:Name="LayoutRoot">
        <telerik:RadRichTextBox>
            <telerik:RadRichTextBox.Document>
                <telerik:RadDocument LayoutMode="Paged">
                    <telerik:Section PageMargin="10, 10, 10, 10">
                        <telerik:Table>
                            <telerik:TableRow>
                                <telerik:TableCell TextAlignment="Center" VerticalAlignment="Center">
                                    <telerik:Paragraph>
                                        <telerik:InlineUIContainer Width="230" Height="50">
                                            <StackPanel >
                                                <Image Source="Images\team challenge logo.jpg"/>
                                            </StackPanel>
                                        </telerik:InlineUIContainer>
                                        <telerik:ImageInline x:Name="logo"  Extension="jpg" UriSource="Images\team challenge logo.jpg" Height="50" Width="250"/>
                                    </telerik:Paragraph>
                                </telerik:TableCell  >
                                <telerik:TableCell TextAlignment="Center" VerticalAlignment="Center">
                                    <telerik:Paragraph>
                                        <telerik:Span FontWeight="ExtraBold" ForeColor="Red" FontSize="16" Text="DEPARTMENT NAME" />
                                    </telerik:Paragraph>
                                    <telerik:Paragraph TextAlignment="Center">
                                        <telerik:Span FontWeight="ExtraBold" FontSize="16" Text="ALERT" />
                                    </telerik:Paragraph>
                                </telerik:TableCell>
                                <telerik:TableCell>
                                    <telerik:Paragraph>
                                        <telerik:Span Text="Document No.:" />
                                    </telerik:Paragraph>
                                </telerik:TableCell>
                                <telerik:TableCell>
                                    <telerik:Paragraph>
                                        <telerik:Span Text="XXX" />
                                    </telerik:Paragraph>
                                </telerik:TableCell>
                            </telerik:TableRow>
                        </telerik:Table>
                    </telerik:Section>
                </telerik:RadDocument>
            </telerik:RadRichTextBox.Document>
        </telerik:RadRichTextBox>
    </Grid>
</UserControl>

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 13 Apr 2011, 02:27 PM
Hi Scott,

It seems that the problem is with the backslashes. Changing the UriSource/Source to 

"Images/team challenge logo.jpg"
solves the problem.
I have no idea why the images show at design time either. That is how they work for Images in general, not only when they are embedded in the document of the rich text box via InlineUIContainers.
On a side not, you should note that image files with build action of both Resource and Content will show in an Image, but in order to be able to show the pictures in ImageInline, the build action has to be Content.

All the best,
Iva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
RichTextBox
Asked by
Scott
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or