Jump to content

 

Photo
- - - - -

Run Object in your VB sample code


  • Please log in to reply
2 replies to this topic

#1 PasDuLac

PasDuLac

    Member

  • Members
  • PipPip
  • 28 posts

Posted 27 December 2011 - 01:18 PM

Hello

I am trying to add colors to a title in a graph (I am using VB code) and then try to reproduce your nice code (see Inlines topic in your documentation)

For instance

' Create Run object

Dim runElement1 As New Run() With {.Foreground = New SolidColorBrush(Colors.Red), .Text = "Athens " }

I receive an error : 'Run' is not defined


Is there something wrong ?


Bests regards


Pascal










#2 sharmila

sharmila

    Advanced Member

  • Administrators
  • PipPipPip
  • 697 posts
  • Gender:Female

Posted 28 December 2011 - 05:08 AM

Pascal,

Please make sure that you have added the reference to System.Windows.Documents in your project as shown below.

Imports System.Windows.Documents

Regards,
Sharmila

#3 PasDuLac

PasDuLac

    Member

  • Members
  • PipPip
  • 28 posts

Posted 28 December 2011 - 08:15 AM

Ooppsss !

I have added System.windows.documents.inlines instead of the one mentionned ... and now every thing works great

Merci / Bedankt / Thank you

... and happy new year !

Pascal

Pascal,

Please make sure that you have added the reference to System.Windows.Documents in your project as shown below.

Imports System.Windows.Documents

Regards,
Sharmila






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users