How to add or insert png or emoticon in a textbox ?
-
Saturday, October 17, 2009 5:57 PM
I develop chat box for my project.
I want add support for emoticons (like msn) to mu chat box.
Can you tell me simple way to add or insert image (png) in textbox ? (VB code if possible ? or xaml ? )
Thanks a lot
try chat here : UserName : guest / Pass : guesthttp://www.furukoo.fr/furukoov2/TestPage.html
Thanks a lot
Yvan
All Replies
-
Saturday, October 17, 2009 11:52 PM
Hello, I don't think it's possible to add the image in TextBox. You can take a look at this sample http://michaelsync.net/2008/04/14/silverlight-2-beta1-rich-text-viewer
I got your comment. Do you think that it's so complex? I think it's not that complex.
-
Sunday, October 18, 2009 1:59 AM
try this,
http://www.codeplex.com/richtextedit
Sharker Khaleed Mahmud
Software Developer
(MCP,MCTS,MCPD[web])This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
-
Sunday, October 18, 2009 3:19 AM
Thanks for quick reply ...
I got your comment. Do you think that it's so complex? I think it's not that complex.
Your RichTextBox is fully fonctionalities. Great.
I just want TextBox whit emoticon support. Il dont need full option like your RichTextBox.
What is your way for adding msn emoticones and insert in the text ?
I just want to understand how to.
Yvan -
Wednesday, October 21, 2009 7:20 PMA textbox is inherently a bit limited in what it can do, mainly so we don't have fully-featured high-graphics textboxes for every input method. Basically, all it can hold is text. The ability to actually put an image - an object of its own, inside, a rich textbox is kind of necessary. I might bet that most existing IM clients use something like that. Hope that helps.
-
Wednesday, October 28, 2009 6:40 AM
I try to learn RichTextBox editeur.
But they don't work.
I try :
- one TextBox for enter message (SendBox)
- one TextBox for displaying (ChatBox)
Have you sample ?
Thanks -
Thursday, July 15, 2010 11:22 PM
Hi Furukoo !
I think we can add image in TextBox, I got your forum link from google while facing same issue.
Try this :
<TextBox x:Name="txt" Width="16" Height="16" HorizontalAlignment="Left" BorderThickness="0" Padding="0" Margin="0">
<TextBox.Background>
<ImageBrush ImageSource="Images/icon_error.png" />
</TextBox.Background>
</TextBox>Hope it works.
-
Friday, July 16, 2010 3:23 PM
Thanks dheeraj,
I am trying to use Silverlight 4 RichTextBox.
-
Friday, January 27, 2012 4:54 PM
You can try this code and this works:
RichTextBox rtb = new RichTextBox();
Paragraph _para = new Paragraph();
InlineUIContainer _inLine = new InlineUIContainer();
_img.Source = new BitmapImage(new Uri("images/someimage.png", UriKind.RelativeOrAbsolute));
_img.Width = 20;
_img.Height = 20;_inLine.Child = _img;
_para.Inlines.Add(_inLine);
_para.Inlines.Add(new LineBreak());
rtb.Blocks.Add(_para);

