4 Answers, 1 is accepted
0
Gediminas
Top achievements
Rank 1
answered on 11 Nov 2014, 04:30 PM
Forgot to mention... I know of Tag element. But is it posible to add more.
0
Hi Gediminas,
The Tag property is the only way to add custom information to a document element. You could serialize the desired information in a format convenient to you and add it there.
The other option to preserve custom attributes is through a custom annotation of some sorts. This help article explains in the details the concept and demonstrates how you could adopt it.
Please note that in both cases the information will only be preserved when exporting the document to XAML format.
Regards,
Petya
Telerik
The Tag property is the only way to add custom information to a document element. You could serialize the desired information in a format convenient to you and add it there.
The other option to preserve custom attributes is through a custom annotation of some sorts. This help article explains in the details the concept and demonstrates how you could adopt it.
Please note that in both cases the information will only be preserved when exporting the document to XAML format.
Regards,
Petya
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Gediminas
Top achievements
Rank 1
answered on 14 Nov 2014, 08:09 AM
Hello Petya,
Thank you for your reply. I tried to sed json as Tag value, but get error
Inline with tag looks like this:
while I try to import saved document. Is there a recomended way to store serialized data to tag without writing your own serializer?
Thank you for your reply. I tried to sed json as Tag value, but get error
{"'Quote characters ' or \" are only allowed at the start of values.' Line number '72' and line position '49'."}
Inline with tag looks like this:
<
t:ImageInline
Width
=
"180"
Height
=
"120"
Tag
=
"{'Guid':'58cf11db-02a9-483e-9bf0-e2a05274d0cc','Type':'a','IsThumbnail':true}"
Extension
=
"png"
/>
while I try to import saved document. Is there a recomended way to store serialized data to tag without writing your own serializer?
0
Hi Gediminas,
In XAML curly brackets denote the start/end of a MarkupExtension which is the reason you are unable to place quote characters in it. You can escape the brackets to avoid the error like this:
I hope this helps.
Regards,
Petya
Telerik
In XAML curly brackets denote the start/end of a MarkupExtension which is the reason you are unable to place quote characters in it. You can escape the brackets to avoid the error like this:
<
t:ImageInline
Width
=
"180"
Height
=
"120"
Tag
=
"{}{'Guid':'58cf11db-02a9-483e-9bf0-e2a05274d0cc','Type':'a','IsThumbnail':true}"
Extension
=
"png"
/>
I hope this helps.
Regards,
Petya
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.