Inline UI and Image not displaying at runtime

2 posts, 0 answers
  1. Scott
    Scott avatar
    4 posts
    Member since:
    Aug 2010

    Posted 07 Apr 2011 Link to this post

    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:RadDocument LayoutMode="Paged">
                        <telerik:Section PageMargin="10, 10, 10, 10">
                                    <telerik:TableCell TextAlignment="Center" VerticalAlignment="Center">
                                            <telerik:InlineUIContainer Width="230" Height="50">
                                                <StackPanel >
                                                    <Image Source="Images\team challenge logo.jpg"/>
                                            <telerik:ImageInline x:Name="logo"  Extension="jpg" UriSource="Images\team challenge logo.jpg" Height="50" Width="250"/>
                                    </telerik:TableCell  >
                                    <telerik:TableCell TextAlignment="Center" VerticalAlignment="Center">
                                            <telerik:Span FontWeight="ExtraBold" ForeColor="Red" FontSize="16" Text="DEPARTMENT NAME" />
                                        <telerik:Paragraph TextAlignment="Center">
                                            <telerik:Span FontWeight="ExtraBold" FontSize="16" Text="ALERT" />
                                            <telerik:Span Text="Document No.:" />
                                            <telerik:Span Text="XXX" />
  2. Iva Toteva
    Iva Toteva avatar
    1319 posts

    Posted 13 Apr 2011 Link to this post

    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,
    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
Back to Top