Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error trying to use sample code for Custom Brush

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

    Error trying to use sample code for Custom Brush

    Hi here is a picture which contains sample code I copied exactly. I made sure I was using System.Windows.Media yet it still generates an error I have not figured out how to avoid.
    the error by being more specific.

    Here is the code:

    // initiate new solid color brush with custom blue color
    Brush myBrush = new SolidColorBrush(Color.FromRgb(56, 120, 153));
    myBrush.Freeze();
    Draw.Line(this, "tag1", true, 10, 1000, 0, 1001, myBrush, DashStyleHelper.Dot, 2);

    Here is error followed by source I copied from
    Error
    'Brush' is an ambiguous reference between 'System.Windows.Media.Brush' and 'SharpDX.Direct2D1.Brush'
    'SolidColorBrush' is an ambiguous reference between 'System.Windows.Media.SolidColorBrush' and 'SharpDX.Direct2D1.SolidColorBrush'



    #2
    I was able to find a solution to this from an earlier post.
    No response necessary.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    230 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    149 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    161 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    243 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    198 views
    0 likes
    Last Post CarlTrading  
    Working...
    X