Super simple C# example

Jun 3, 2012 at 5:19 PM

Hi all,

I am trying to learn the very basics of using Helix to build an application using C#. There are some wonderful and sometimes quite spectacular examples of using XAML and C#, but I'm finding them a bit too complicated as a first example.

Frustratingly I haven't found any super simple example online. Has anyone got an example of how to build, e.g., a cube using C# and the Helix toolkit?

Many thanks,

B.

Coordinator
Jun 4, 2012 at 9:30 PM

yes, I agree, the "SimpleDemo" example should contain some very simple C# code too (a ViewModel), not only XAML. Will fix this soon!

Coordinator
Jun 4, 2012 at 9:48 PM

the "SimpleDemo" example has been changed, I hope this helps.

Jun 5, 2012 at 9:01 PM

I apologise if I'm missing something obvious, but after updating the package ..\Helix\Source\Examples\SimpleDemo\MainWindow.xaml.cs looks like this:

using System.Windows;

namespace ExampleBrowser
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
    }
}

 

There's no C# code. Where should I be looking?

Coordinator
Jun 5, 2012 at 9:09 PM

It seems like you are not looking at the latest version. There should be a line

this.DataContext = new MainViewModel();

in there. Then see MainViewModel.cs for the code.