diff --git a/getting-started/hello-wpf-xaml.rst b/getting-started/hello-wpf-xaml.rst deleted file mode 100644 index b514205..0000000 --- a/getting-started/hello-wpf-xaml.rst +++ /dev/null @@ -1,103 +0,0 @@ -========== -WPF (XAML) -========== - -.. note:: This section is under construction. Please contribute! - - -This example shows how to create a WPF application with a ``Plot`` control, where the content of the plot (axes, series, annotations) is defined in XAML. - - -Create project --------------- - -Start Visual Studio and select "FILE -> New -> Project..." to create a new WPF application: - -.. image:: wpf-new-project.png - - -Add references --------------- - -You need references to the OxyPlot and OxyPlot.Wpf assemblies. The easiest way to add these is to right click on the "References" item in the Solution Explorer and select "Manage NuGet Packages..." (this requires that the "NuGet Package Manager" extension is installed): - -.. image:: wpf-add-reference.png - -In the "Manage NuGet packages" dialog, search for "OxyPlot" (activate the Include prerelease option) and select the "OxyPlot.Wpf" package: - -.. image:: wpf-install-package.png - -You can also use the `Package Manager Console `_ to install the package: - -.. sourcecode:: bat - - PM> Install-Package OxyPlot.Wpf -Pre - -Create a view model -------------------- - -Then create a class that defines the data to be plotted. - -.. sourcecode:: csharp - - namespace WpfApplication2 - { - using System.Collections.Generic; - - using OxyPlot; - - public class MainViewModel - { - public MainViewModel() - { - this.Title = "Example 2"; - this.Points = new List - { - new DataPoint(0, 4), - new DataPoint(10, 13), - new DataPoint(20, 15), - new DataPoint(30, 16), - new DataPoint(40, 12), - new DataPoint(50, 12) - }; - } - - public string Title { get; private set; } - - public IList Points { get; private set; } - } - } - - -Create the view ---------------- - -Define the namespace in the ``Window`` element, set the ``DataContext`` and add a ``Plot`` control: - -.. sourcecode:: xml - - - - - - - - - - - - - - -If you want to add a ``Plot`` control in the design view, press ``Choose Items...`` in the Toolbox and browse for the ``OxyPlot.Wpf.dll`` file. If you used NuGet, it should be located in the `packages` folder in your solution folder. - -The application should now look like this: - -.. image:: wpf-example2.png - -The source code can be found in the `HelloWorld\\WpfApplication2 `_ folder in the `documentation-examples `_ repository. diff --git a/getting-started/index.rst b/getting-started/index.rst index 7a91b70..92370f9 100644 --- a/getting-started/index.rst +++ b/getting-started/index.rst @@ -16,7 +16,6 @@ The following sections contain platform specific descriptions about how to get s hello-uwp.rst hello-wpf.rst - hello-wpf-xaml.rst hello-wpf-vb.rst hello-windows-forms.rst hello-xamarin-ios.rst