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 Hwop38, 05-04-2026, 07:02 PM
    0 responses
    152 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    305 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    244 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    345 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    176 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X