FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Update the WpfApplication2 example to be compatible with version 2.2.0 by Ming-jiayou · Pull Request #25 · oxyplot/documentation-examples · GitHub

Repository navigation

Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cs  (1) .csproj  (2) .sln  (2) .xaml  (1) All 4 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
11 changes: 6 additions & 5 deletions DocumentationExamples.sln
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29403.142
# Visual Studio Version 17
VisualStudioVersion = 17.13.35931.197 d17.13
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExampleGenerator", "ExampleGenerator\ExampleGenerator.csproj", "{FE37EF85-360E-46BA-95D5-3A336F70297A}"
EndProject
Expand Down Expand Up @@ -34,9 +34,6 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NormalDistributionsWpf", "Showcases\NormalDistributionsWpf\NormalDistributionsWpf.csproj", "{B09A57B7-811F-4D90-BDA2-FB3144FFA072}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Showcases\NormalDistributions.Shared\NormalDistributions.Shared.projitems*{70ff713a-e9d7-4cfe-a856-96a4faf05373}*SharedItemsImports = 13
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
Ad-Hoc|ARM = Ad-Hoc|ARM
Expand Down Expand Up @@ -457,4 +454,8 @@ Global
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2E3AA08A-64C3-480F-885C-57CB0E5195F0}
EndGlobalSection
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Showcases\NormalDistributions.Shared\NormalDistributions.Shared.projitems*{70ff713a-e9d7-4cfe-a856-96a4faf05373}*SharedItemsImports = 13
Showcases\NormalDistributions.Shared\NormalDistributions.Shared.projitems*{b09a57b7-811f-4d90-bda2-fb3144ffa072}*SharedItemsImports = 5
EndGlobalSection
EndGlobal
4 changes: 2 additions & 2 deletions HelloWorld/WpfApplication1/WpfApplication1.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<UseWPF>true</UseWPF>
<OutputType>WinExe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OxyPlot.Wpf" Version="2.0.0" />
<PackageReference Include="OxyPlot.Wpf" Version="2.2.0" />
</ItemGroup>
</Project>
33 changes: 19 additions & 14 deletions HelloWorld/WpfApplication2/MainViewModel.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,30 @@ namespace WpfApplication2
using System.Collections.Generic;

using OxyPlot;
using OxyPlot.Series;

public class MainViewModel
{
public MainViewModel()
{
this.Title = "Example 2";
this.Points = new List<DataPoint>
{
new DataPoint(0, 4),
new DataPoint(10, 13),
new DataPoint(20, 15),
new DataPoint(30, 16),
new DataPoint(40, 12),
new DataPoint(50, 12)
};
// Create the plot model
var model = new PlotModel { Title = "Example 2" };

// Create a line series
var series = new LineSeries();
series.Points.Add(new DataPoint(0, 4));
series.Points.Add(new DataPoint(10, 13));
series.Points.Add(new DataPoint(20, 15));
series.Points.Add(new DataPoint(30, 16));
series.Points.Add(new DataPoint(40, 12));
series.Points.Add(new DataPoint(50, 12));

// Add the series to the plot model
model.Series.Add(series);

this.Model = model;
}

public string Title { get; private set; }

public IList<DataPoint> Points { get; private set; }
public PlotModel Model { get; private set; }
}
}
}
6 changes: 1 addition & 5 deletions HelloWorld/WpfApplication2/MainWindow.xaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
<local:MainViewModel/>
</Window.DataContext>
<Grid>
<oxy:Plot Title="{Binding Title}">
<oxy:Plot.Series>
<oxy:LineSeries ItemsSource="{Binding Points}"/>
</oxy:Plot.Series>
</oxy:Plot>
<oxy:PlotView Model="{Binding Model}"/>
</Grid>
</Window>
4 changes: 2 additions & 2 deletions HelloWorld/WpfApplication2/WpfApplication2.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<UseWPF>true</UseWPF>
<OutputType>WinExe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OxyPlot.Wpf" Version="2.0.0" />
<PackageReference Include="OxyPlot.Wpf" Version="2.2.0" />
</ItemGroup>
</Project>
24 changes: 24 additions & 0 deletions HelloWorld/WpfApplication2/WpfApplication2.sln
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.2.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfApplication2", "WpfApplication2.csproj", "{186EA68F-62CD-4C09-ECFB-FC13B86121CC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{186EA68F-62CD-4C09-ECFB-FC13B86121CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{186EA68F-62CD-4C09-ECFB-FC13B86121CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{186EA68F-62CD-4C09-ECFB-FC13B86121CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{186EA68F-62CD-4C09-ECFB-FC13B86121CC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A32A7879-09EF-40A6-BA3C-F81D1309047E}
EndGlobalSection
EndGlobal

Back | FazBrowse Home | New Git URL