• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TypeFace missing reference

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

    TypeFace missing reference

    I have System.Windows.Media listed as a reference but I'm getting an error saying the type or namespace name 'TypeFace' could not be found. I copied the typeface code from the superdom columns APQ code

    Code:
    #region Using declarations
    using NinjaTrader.Data;
    using NinjaTrader.Gui.SuperDom;
    using System;
    using System.Collections.Concurrent;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.Windows;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Text;
    using System.Xml.Serialization;
    #endregion
    
    private TypeFace typeFace	= new Typeface(fontFamily, fontStyle, fontWeight, FontStretches.Normal);
    
    
    FormattedText pnlText = new FormattedText(accumVol, Core.Globals.GeneralOptions.CurrentCulture, FlowDirection.LeftToRight, typeFace, SuperDom.Font.Size, Brushes.Black );

    #2
    Hello habibalex,

    To confirm, you are trying to create a System.Windows.Media.TypeFace object in an Addon window, is this correct?

    I will need to further research this and I will let you know what I find.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Im making a superdom Column

      If I use the full path it works for some reason...


      System.Windows.Media.Typeface typeFace = new System.Windows.Media.Typeface(fontFamily, fontStyle, fontWeight, FontStretches.Normal);

      Comment


        #4
        Hello habibalex,

        In the first post you have:
        Code:
        private TypeFace typeFace	= new Typeface(fontFamily, fontStyle, fontWeight, FontStretches.Normal);
        Where you intending to have:
        Code:
        private TypeFace typeFace	= new TypeFace(fontFamily, fontStyle, fontWeight, FontStretches.Normal);
        The capital F on TypeFace is a different type than with the lowercase f on Typeface.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          ugh sorry about that, yes it's supposed to be all lowercase. thanks!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by faustf, Today, 05:00 AM
          0 responses
          6 views
          0 likes
          Last Post faustf
          by faustf
           
          Started by NinjaCustomer, Today, 03:19 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_ChrisSch  
          Started by MarianApalaghiei, Today, 02:54 AM
          1 response
          5 views
          0 likes
          Last Post MarianApalaghiei  
          Started by RandanAL, Yesterday, 11:58 PM
          0 responses
          5 views
          0 likes
          Last Post RandanAL  
          Started by Kabua, Yesterday, 11:24 PM
          0 responses
          5 views
          0 likes
          Last Post Kabua
          by Kabua
           
          Working...
          X