Graphing Calculator Demo -- Part 1

It's been nearly a month since my last post but I haven't been idle. I've actually been working hard on a private project and, one day, I may document the steps I took to create it. For now, I'm going to go back to the MSDN samples. This time, I'm not going to bother with a one-to-one port of the program for two reasons: one, it's a very complicated program; two, I want to focus on the logical elements of the program rather than fiddle with the design aspects.

The topic here is centered on the Graphing Calculator Demo over at the .NET Framework Library. My goal is to understand the function plotting aspect of the demo. Once I've reached that goal then I may extend this series to include the parametric and 3d graphing but that may take a while since I will continue on with my private project before thinking about that.

First of all, you will notice that someone commented "This sample have [sic.] bugs when opened in Visual Studio 2008. The xaml design window cannot load the file because of errors." I couldn't comment back or edit that region in either Chrome or IE so I'll just write the solution here to kick things off.

Go to Window1.xaml and follow my fix below:

<!--JM: This doesn't work.
          <Setter Property="Background" Value="LinearGradient 0,0 0.03,.9 #ffcccccc #ffeeeeee"/>
    Check out below for fix.
-->
<Setter Property="Background">
    <Setter.Value>
        <LinearGradientBrush StartPoint="0,0" EndPoint="0.03,.9">
            <GradientStop Color="#ffcccccc" Offset="0" />
            <GradientStop Color="#ffeeeeee" Offset="1" />
        </LinearGradientBrush>
    </Setter.Value>
</Setter>

The most interesting part of this program, for me, is the parser so that's what I will talk about next time.

0 comments:

Post a Comment