ImageInline Tag-attribute bug

3 posts, 0 answers
  1. Terje
    Terje avatar
    6 posts
    Member since:
    Jun 2009

    Posted 23 Apr 2013 Link to this post

    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. Terje
    Terje avatar
    6 posts
    Member since:
    Jun 2009

    Posted 24 Apr 2013 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 25 Apr 2013 Link to this post

    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.

Back to Top