locked
Segoe UI Symbol by Vb Code

    Question

  • Hi,

    I am trying to display a symbol from the Segoe UI Symbol list in a textblock for a metro app by vb code.

    My problem is that I only get to display the symbols only in xaml but not in Vb. What happens is that the bold code appears on screen. This is my code:

    myTBlock = New TextBlock
    myTBlock.Height = 40
    myTBlock.Width = 75
    myTBlock.Foreground = brushblue
    myTBlock.FontSize = 28
    myTBlock.FontFamily = New FontFamily("Segoe UI Symbol")
    myTBlock.Text = ""

    GridMain.Children.Add(myTBlock)

    Thanks for help


    • Edited by Problem449 Friday, August 15, 2014 4:36 PM
    Friday, August 15, 2014 4:35 PM

Answers

  • I found a way. I am using the following code now

    myTBlock = New TextBlock
    myTBlock.Height = 40
    myTBlock.Width = 75
    myTBlock.Foreground = brushblue
    myTBlock.FontSize = 28
    myTBlock.FontFamily = New FontFamily("Segoe UI Symbol")
    myTBlock.Text = ChrW(57618) & ChrW(57617)

    GridMain.Children.Add(myTBlock)

    Friday, August 15, 2014 4:47 PM