How to insert image inside the text block ?

the great vinay

New member
Dec 7, 2013
3
0
0
I am building a very basic ( I am a super beginner to windows phone and programming). I want to convert some pages in word as Windows Phone Application. it just contains text and inline images I have decided to go with panorama

  1. inserted the panorama to plain WP8 app
  2. Inserted Scrollbox
  3. inserted textblock inside scrollbox

but when i need to insert the image between the text it doesn't work. I have tried including by adding reference, copying along with text. I know this app should be dead easy one but no demo or sample apps for this problem . I have made all the changes using Xaml and its a C# based app.

is this can be done with data binding ?

What should I do now ?

This throws an error when i inserted with image with help of toolbar.

Code:
<InlineUIContainer>
<Image Height="225.6" Stretch="Fill" Width="376">
<Image.Source>
<BitmapImage UriSource="/ApplicationIcon.png"/>
</Image.Source>
</Image>
</InlineUIContainer>

Error	1	Cannot add value of type 'System.Windows.Documents.InlineUIContainer' to a 'InlineCollection' in a 'System.Windows.Controls.TextBlock'
 
Moved to Developers Corner forum, since developers should be better able to assist.
 
I would personally use bunch of TextBlock and Image controls positioned in Grid or StackPanel.
 
I am using Visual Studio 2012 and of course I am using static text and image and designed using xaml designer using toolbox. the above quoted code is what i obtained after inserted image which shows error .
 
I am using Visual Studio 2012 and of course I am using static text and image and designed using xaml designer using toolbox. the above quoted code is what i obtained after inserted image which shows error .

I would go with what nemecek_f said then and create it using a grid and placing a bunch of TextBlock and Image controls. Either that or parse the data and create the objects on the fly in code. The first option sounds much better to me lol.
 
Thanks a lot developers. Now I can insert images. But another question. How to insert image inline the text ? and a issue with scrollviewer . how to view the bottom part of scrollviewer. Should i have to extend the area of the scrollviewer entirely below ? how do I know all the text got covered.
screenvs.png
 

Members online

Forum statistics

Threads
339,477
Messages
2,262,500
Members
428,761
Latest member
Jamie1