Click here to Skip to main content
15,074,394 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
As the title say's, I tried to create this using a template.
The problem is when the text box went multiline the graphic did not relocate with it.

I wish to reuse this in many places.

Question 0: Will i have to add a Dependency Property?

Question 1: Should this be a UserControl, a resource or a template?

Thank You.
Updated 11-Mar-14 5:09am
Sergey Alexandrovich Kryukov 11-Mar-14 11:54am
Looks like a bad idea to me. Why not adding something below the text box..?

Use a stack panel as a workaround.
 <Image Source="image.jpg" Visibility="Collapsed"/>
 <TextBlock Text="Text"/>
David C# Hobbyist. 11-Mar-14 12:27pm
I ended up creating a user control similar to the one on stack overflow.

Thank You for the input.
Sergey Alexandrovich Kryukov 11-Mar-14 12:40pm
No you didn't. :-)
Sergey Alexandrovich Kryukov 11-Mar-14 12:40pm
Fair enough, my 5. But please see my comments to the question and to the Solution 1.
Abhinav S 11-Mar-14 13:07pm
Thank you SA.
I found a idea on how to do it on SO. Here is the link for anyone interested.[^]
Sergey Alexandrovich Kryukov 11-Mar-14 12:39pm
Sorry, I down-voted you answer by some minor reasons, but serious ones:

1) I already told you such solution. This is a work-around. Exactly as I advised, it does not add anything in the text box to its bottom, it adds elements around, which is way too trivial; you did not even need to ask any questions.

2) You question was about TextBox, and your answer is about TextBlock. In the sense of the problem you tried to formulate in first place, the difference is huge. In essence, you did not answer to your own question at all, not in any sense.

Keeping the above in mind, the fact you even self-accepted your own "answer" is just outrageous. How could you do it?

David C# Hobbyist. 11-Mar-14 12:49pm
I understand and except your downvote. My verbal skills are indeed lacking.

As to accepting my own answer Please forgive me, but I thought it would help others.

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