本文整理匯總了VB.NET中System.Windows.Controls.TabControl.ContentStringFormat屬性的典型用法代碼示例。如果您正苦於以下問題:VB.NET TabControl.ContentStringFormat屬性的具體用法?VB.NET TabControl.ContentStringFormat怎麽用?VB.NET TabControl.ContentStringFormat使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。
在下文中一共展示了TabControl.ContentStringFormat屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: ToString
Public Overloads Function ToString(ByVal format As String, ByVal formatProvider As IFormatProvider) As String Implements IFormattable.ToString
' 'n': print the name only.
If format = "n" Then
Return Name
End If
' 'cl': print the course list.
If format = "cl" Then
Dim stringFormat As String = "{0,-25}{1,-30}{2,-10}" & vbCrLf
Dim str As New StringBuilder()
str.AppendLine()
str.AppendFormat(stringFormat, "Title", "Description", "ID")
str.AppendLine()
For Each c As Course In Courses
str.AppendFormat(stringFormat, c.Title, c.Description, c.SectionID)
Next c
Return str.ToString()
End If
Return Me.ToString()
End Function