Click here to Skip to main content
15,569,774 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to use the WPF text box as a chatbox.

initially, the user enters a text(string), and I want to use that text. After some processing with this text, I want to bind a new text (string) below the user-entered text.

What I have tried:

XAML
<TextBox x:Name="enteredMessage"  KeyDown="messageBox_EnterKeyDown"  Background="Black"  Foreground="#00ff00" BorderThickness="2" BorderBrush="#55E41B" TextWrapping="Wrap" d:LayoutOverrides="HorizontalAlignment, VerticalAlignment" Margin="0,-0.333,0,20.333" Grid.Row="1"  AcceptsReturn="True" Text="{Binding FilesDetails.StatusCount,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
Posted
Updated 23-Dec-20 6:54am

1 solution

I don't think you mean "bind".

If you want to add a string "below" an existing textbox string, append a "new line" and the new string, since you already have "text wrapping" on; and assuming your textbox "has enough room".
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900