Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to use Font (Chart -> Properties -> General -> Font) in SharpDX

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to use Font (Chart -> Properties -> General -> Font) in SharpDX

    I would like to use the Font (Chart -> Properties -> General -> Font) in SharpDX.

    Click image for larger version

Name:	NT82020-12-08_233215.jpg
Views:	339
Size:	36.8 KB
ID:	1131373

    At the moment I use the following code:
    SharpDX.Direct2D1.Brush textDXBrush = new SolidColorBrush((Color) ColorConverter.ConvertFromString((ChartControl.Pro perties.ChartText).ToString())).ToDxBrush(RenderTa rget);

    to get just the color.

    Is there a better methode to get the complete Font properties?


    #2
    Hello Goldy,
    I am not certain about SharpDX but you can use Font Family as below:
    Code:
    In SetDefaults,[INDENT]myFont = new SimpleFont("Arial", 12);[/INDENT]
     In Properties,[INDENT][NinjaScriptProperty]
    [Display(ResourceType = typeof(Custom.Resource), Name = "My Font", GroupName = "Parameters", Order = 0)]
    public SimpleFont myFont { get; set; }[/INDENT]
    Hope it helps!

    Comment


      #3
      Hello s.kinra,
      thank you, but this was not my question.
      In your code you declare a new Font ("Arial",12). I want to use the existing from NT Chart Properties

      Comment


        #4
        Hello Goldy,
        If you wish to use the Font from Chart Properties then you can use
        Code:
        ChartControl.Properties.LabelFont

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        577 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X