Apply style based on another spanbox

2 posts, 0 answers
  1. Patrick
    Patrick avatar
    31 posts
    Member since:
    Aug 2011

    Posted 15 Feb 2013 Link to this post

    Hi,

    I'm trying to get the style of a spanbox by code and apply it to another spanbox. I'm confused on how to get the job done. Can I get a sample on how to do it?

    Thanks a lot,

    Pat
  2. Patrick
    Patrick avatar
    31 posts
    Member since:
    Aug 2011

    Posted 15 Feb 2013 Link to this post

    Ok, I found how to do that. It could be faster if telerik documentation would be complete for all functions. Here is the snippet :
    Spn = New Span
    Spn.Text = "Text"
      
    'NBM is a custom annotation. In my case, NBM.NextSibling is always a span.
    Spn.CopyPropertiesFrom(DirectCast(NBM.NextSibling, Span)) 'CopyPropertiesFrom will copy all properties of NBM into spn.
    editor.Document.InsertInline(Spn)
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top