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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 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
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X