Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Remove legend series borders

How do I remove the purple and yellow borders around the legend icons (left of the "Waiting" "Running" text)

No Data
  • 340
    Verified Answer
    Offline posted


    I have created a small sample trying to reproduce the described behavior.  I'm using Infragistics WPF v19.2 and there is no border by default.

    However, what I can suggest you is re-templating the Series's LegendItemTemplate. In this case, you will be able to override the look of each legend item as per your requirement.

                                <Grid Margin="0, 5, 10, 0">
                                    <Ellipse Grid.Column="0"  
                                             Margin="0, 0, 5, 0"
                                             Fill="{Binding Series.ActualBrush}"
                                             Width="15" Height="15"  />
                                    <TextBlock Grid.Column="1" VerticalAlignment="Center" Text="{Binding Series.Title}" />                               

    By changing the Ellipse Stroke and StrokeTickness properties, you can change the border color and thickness as you need. When the StrokeTickness is set to 0 there would be no border.

    Attached you will find my sample for your reference. Please test it on your side and let me know how it behaves. If this is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me along with steps to reproduce. Alternatively, if the behavior cannot be replicated please feel free to provide your own sample. Remove any external dependencies and code that is not directly related to the issue, zip your application and attach it in this case.

    Having a working sample on my side, which I can debug, is going to be very helpful in finding the root cause of this behavior.

    Thank you for your cooperation.

    Looking forward to hearing from you.


    Teodosia Hristodorova

    Associate Software Developer