WPF bind to a static double var

Posted by devin250 on Stack Overflow See other posts from Stack Overflow or by devin250
Published on 2010-04-23T13:14:31Z Indexed on 2010/04/23 13:23 UTC
Read the original article Hit count: 432

Filed under:
|

hi, i have these double values:

 public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
            double num1 = 50.0;
            double num2 = 90.0;
            double num3 = 120.0;
            double num4 = 20.0;
            double num5 = 80.0;

        }
    }

how do i bind them to xaml?

<vc:Chart.Series>
                <vc:DataSeries RenderAs="Column" AxisYType="Primary" >
                    <vc:DataSeries.DataPoints>
                        <vc:DataPoint AxisXLabel="Wall-Mart" YValue="{Binding Source={StaticResource num1}}" />

....

help please

© Stack Overflow or respective owner

Related posts about wpf

Related posts about wpf-binding