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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    35 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    12 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    18 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    20 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X