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 cmoran13, 04-16-2026, 01:02 PM
    0 responses
    43 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    26 views
    0 likes
    Last Post PaulMohn  
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    163 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    98 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    158 views
    2 likes
    Last Post CaptainJack  
    Working...
    X