This is a migrated thread and some comments may be shown as answers.

ImageInline Tag-attribute bug

2 Answers 21 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Terje
Top achievements
Rank 1
Terje asked on 23 Apr 2013, 01:10 PM
Hello
I have observed that if I insert an ImageInline programmatically into a RichTextBox, like this:
Stream stream = File.OpenRead("<path-to-file>");
ImageInline image = new ImageInline(stream, new Size(30, 30), ".jpg");
image.Tag = "<some-custom-information>";
richTextBox.InsertImage(image);

then, when I export the XAML of the richTextBox, the Tag attribute is present in the ImageInline tag, as expected.
But if I then enter the Image editor and push the OK button (no actual editing is needed), export the RichTextBox XAML again, the Tag attribute is no longer present and the information originally in it, is lost.

I hope this is a bug and not a feature ;)

Best regards,
Terje

2 Answers, 1 is accepted

Sort by
0
Terje
Top achievements
Rank 1
answered on 24 Apr 2013, 01:25 PM
Hello
I have observed that if I insert an ImageInline programmatically into a RichTextBox, like this:
Stream stream = File.OpenRead("<path-to-file>");
ImageInline image = new ImageInline(stream, new Size(30, 30), ".jpg");
image.Tag = "<some-custom-information>";
richTextBox.InsertInline(image);

then, when I export the XAML of the richTextBox, the Tag attribute is present in the ImageInline tag, as expected.
But if I then enter the Image editor and push the OK button (no actual editing is needed), export the RichTextBox XAML again, the Tag attribute is no longer present and the information originally in it, is lost.

I hope this is a bug and not a feature ;)

Best regards,
Terje
0
Iva Toteva
Telerik team
answered on 25 Apr 2013, 08:30 AM
Hello Terje,

You may be right that in most cases users would expect that the Tag property of the controls should be the same as in the original image. However, users can also substitute the picture in the image editor altogether and in these cases it is not quite clear if that is so.

We have logged this scenario for revision, but it it not certain yet if the current behavior will be changed and when.

Kind regards,
Iva Toteva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Terje
Top achievements
Rank 1
Answers by
Terje
Top achievements
Rank 1
Iva Toteva
Telerik team
Share this question
or