Profile Picture

How to set font size and style for each shape file

Posted By Kirk Kanjian 2 Years Ago
Author
Message
Kirk Kanjian
Posted 2 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 2 Years Ago
Posts: 8, Visits: 18
Hi
I am using Nevron diagram and trying to set Font size and style for each shape.
But it is taking the last shape style for the entire renderings.
Please let me know how to set font styles for each shape

Code used for setting font style for each shape:

For Each s As NShape In document.Descendants(NFilters.Shape2D, -1)
      If Not IsNothing(s.Tag) Then
      Dim roomInfo As RoomInfo = s.Tag
      Dim roomNumber As String = roomInfo.RoomNumber
      Dim customFontSize as Single = roomInfo.CustomFontSize

      Dim textSize As Single
      If Not String.IsNullOrEmpty(customFontSize ) Then
        textSize = Convert.ToSingle(customFontSize )
        Dim textStyle As New NTextStyle
        textStyle = s.ComposeTextStyle()
        textStyle.FontStyle = New NFontStyle("Arial", textSize)
         NStyle.SetTextStyle(s, textStyle)
       End If
    End If
   Next






Similar Topics


Reading This Topic