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
760
Can Axis Gridlines be made dotted?
posted

I'm interested in finding some way to make a gridline dotted for relevant xamWebChart types. Thank you in advance for your time.

  • 8607
    Verified Answer
    Offline posted in reply to Will

    Hello,

    I used this code converter! :)  I pasted the code below.  Let me know if there's anything else.

     

    Elizabeth Albert
    Localization Engineer

     

    // First line might not be necessary
    // or should change?
    using Microsoft.VisualBasic;
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Data;
    using System.Diagnostics;

    public partial class MainPage : UserControl
    {

    public MainPage()
    {
    InitializeComponent();

    }

    }


    public class BoundsRectangle : Panel
    {

    public static DependencyProperty PathDataProperty =
    DependencyProperty.Register("PathData", typeof(GeometryGroup), typeof(BoundsRectangle),
    new PropertyMetadata(PathDataPropertyChanged));

    public BoundsRectangle()
    {
    this.SizeChanged += OnSizeChanged;

    }

    public GeometryGroup PathData {

    get { return (GeometryGroup)GetValue(PathDataProperty); }

    set { SetValue(PathDataProperty, value); }
    }


    private void OnSizeChanged(object sender, SizeChangedEventArgs args)
    {
    double newWidth = args.NewSize.Width;

    GeometryGroup newData = new GeometryGroup();
    LineGeometry top = new LineGeometry();
    top.StartPoint = new Point(0, 0);
    top.EndPoint = new Point(newWidth, 0);

    newData.Children.Add(top);

    PathData = newData;

    }


    private static void PathDataPropertyChanged(DependencyObject sender,
    DependencyPropertyChangedEventArgs args)
    {
    }

    }


    public class DoublingConverter : IValueConverter
    {
    public object Convert(object value, System.Type targetType, object parameter,
    System.Globalization.CultureInfo culture)
    {
    if (value != null && value is double) {
    return value * 2.0;

    }

    return null;

    }

    public object ConvertBack(object value, System.Type targetType, object parameter,
    System.Globalization.CultureInfo culture)
    {

    throw new NotImplementedException();

    }

    }

  • 8607
    Offline posted

    Hello willmiller,

    Please take a look at this forum post.  It sounds like the same thing you're trying to accomplish.  If it's not, I can pass your question onto a developer.



    Elizabeth Albert
    Localization Engineer