- Intellisense in the NinjaScript editor does not show Drawing under System -- but Intellisense in Visual Studio does show it. (Why are the two different?)
- Intellsense in Visual Studio also shows System.Drawing.PointF.
- Adding a "using System.Drawing" line compiles, but does not solve the problem -- PointF is still not found.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
PointF and Intellisense question
Collapse
X
-
PointF and Intellisense question
I'm having trouble dealing with PointF. I get the compiler error:
PointF is in System.Drawing, but knowing that does not seem to help me.The type or namespace name 'PointF' could not be found (are you missing a using directive or an assembly reference?)Tags: None
-
Similar problem -- the Pen class. The code I am porting calls Pen.Dispose(). System.Windows.Media.Pen has no Dispose() method, so I presume I should use System.Drawing.Pen. That exists and has a Dispose() method, according to both Microsoft documentation and Visual Studio intellisense. However, when I explicitly qualify Pen as System.Drawing.Pen the NinjaScript compiler says Pen does not exist in the System.Drawing namespace.
I tried one obvious thing -- closing NinjaTrader and then restarting it. Same problem.
Question: what Pen should I be using?
Why does the NinjaScript system disagree with Microsoft on System.Drawing and its contents?
Am I, perhaps, running into .NET versioning issues? I doubt that because Visual Studio and the NinjaScript editor should agree and they do not agree.
-
I think the answer is that I need to get caught up -- System.Drawing is not used by NT8. I need to convert my code to SharpDX.
I still do not understand why the NinjaScript editor and Visual Studio Intellisense do not agree, though.
Comment
-
Hello ETFVoyageur,
Thank you for your post.
Correct, NinjaTrader 8 uses System.Windows.Media instead of System.Drawing. Visual Studio likely is aware of the System.Drawing namespace however it is not included NinjaTrader 8 which is why you are seeing it in VS but not NT.
Please let us know if you have any further questions.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
213 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
129 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
146 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
230 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
192 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment