Skip to content

Make oxyplot-uwp run on OxyPlot.Core version 2.1.0 #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This is the official list of OxyPlot authors for copyright purposes.
# This file is distinct from the CONTRIBUTORS file.
# See the latter for an explanation.

# Names should be added to this file as
# Name or Organization <email address>
# The email address is not required for organizations.

# Please keep the list sorted.
# Please notify the first person on the list to be added here.

Oystein Bjorke <oystein.bjorke@gmail.com>
DNV GL AS
LECO® Corporation
TrainerRoad, LLC <lorentz@trainerroad.com>
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Change Log
All notable changes to this project will be documented in this file.

## [Unreleased]
### Added
-

[Unreleased]: https://github.com/oxyplot/oxyplot-contrib/compare/v0.0.1...HEAD
138 changes: 138 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# This is the official list of people who have contributed
# to the OxyPlot repository.
# The AUTHORS file lists the copyright holders; this file
# lists people.

# People submitting code should be listed in this file (by email address).

# Names should be added to this file like so:
# Name <email address>

# Please keep the list sorted.

Alexei Shcherbakov
Anders Musikka <anders@andersmusikka.se>
Auriou
Bartłomiej Szypelow <bszypelow@users.noreply.github.com>
benjaminrupp
Benoit Blanchon <>
br
brantheman
Brannon King
Bryan Freeman
Brian Lim <brian.lim.ca@gmail.com>
Caleb Clarke <thealmightybob@users.noreply.github.com>
Carlos Anderson <carlosjanderson@gmail.com>
Carlos Teixeira <karlmtc@gmail.com>
Chase Long <chaselfromal@gmail.com>
Choden Konigsmark <choden.konigsmark@gmail.com>
classicboss302
csabar <rumancsabi@gmail.com>
Curt Mullin <curt.mullin@gmail.com>
Cyril Martin <cyril.martin.cm@gmail.com>
Dan Aizenstros
danpaul88 <danpaul88@users.noreply.github.com>
darrelbrown
David Funk <funk.david1985@gmail.com>
David Laundav <davelaundav@gmail.com>
David Wong <dvkwong0@gmail.com>
DJDAS
DNV GL AS
Doeharrrck <doeharrrck@gmx.de>
Don Syme <donsyme@fastmail.fm>
DotNetDoctor <dotnetdoctor@outlook.com>
efontana2
elliatab
Elmar Strittmatter
episage <tilosag@gmail.com>
eric
Federico Coppola <fede@silentman.it>
Francois Botha <igitur@gmail.com>
Frank Tore Sæther <frank.sather@gmail.com>
Garrett
Geert van Horrik <geert@catenalogic.com>
Gimly
Herman Eldering <herman@eldering.net>
Iain Nicol <git@iainnicol.com>
Ilja Nosik <ilja.nosik@outlook.com>
Ilya Skriblovsky <IlyaSkriblovsky@gmail.com>
Iurii Gazin <archeg@gmail.com>
Jānis Kiršteins <janis@janiskirsteins.org>
jaykul
Jeremy Koritzinsky
Jeremie Magnette
jezza323
Johan
Johan20D
Jonathan Arweck
Jonathan Shore <jonathan.shore@gmail.com>
julien.bataille
Just Slon <just.slon@gmail.com>
Kaplas80 <kaplas80@gmail.com>
kc1212 <kc04bc@gmx.com>
kenny_evoleap
Kenny Nygaard
Kevin Crowell <crowell@proteinmetrics.com>
Kyle Pulvermacher
LECO® Corporation
Levi Botelho <levi_botelho@hotmail.com>
Linquize
lsowen
Luka B
Nils Haferkemper <nils@haferkemper.de>
Matt Williams
Matthew Leibowitz <mattleibow@live.com>
Memphisch <memphis@machzwo.de>
Mendel Monteiro-Beckerman
Menno Deij - van Rijswijk <m.deij@marin.nl>
methdotnet
Mikant <a.mikant@gmail.com>
mirolev <miroslav.levicky@gmail.com>
Mitch-Connor <acm@htri.net>
moes_leco
moljac
mroth
mrtncls
Oleg Tarasov <oleg.v.tarasov@gmail.com>
Oystein Bjorke <oystein.bjorke@gmail.com>
Patrice Marin <patrice.marin@thomsonreuters.com>
Peter-B-
Philippe AURIOU <p.auriou@live.fr>
Piotr Warzocha <pw@piootr.pl>
Poul Erik Venø <poulerikvenoehansen@gmail.com>
Régis Boudin <regis@boudin.name>
Rik Borger <isolocis@gmail.com>
ryang <decatf@gmail.com>
Sarah Müller <sy-mueller@gmx-topmail.de>
Senen Fernandez <senenf@gmail.com>
Scott W Harden <swharden@gmail.com>
Shankar Mathiah Nanjundan <shankar.ooty@hotmail.com>
Shun-ichi Goto <shunichi.goto@gmail.com>
Soarc <gor.rustamyan@gmail.com>
Stefan Rado <oxyplot@sradonia.net>
stefan-schweiger
Steve Hoelzer <shoelzer@gmail.com>
Surfin Bird <illvdg13@gmail.com>
Sven Dummis
Taldoras <taldoras@googlemail.com>
Tandy Carmichael <tcarmichael@frontier.com>
Tasos Stamadianos <tasos.a.stam@gmail.com>
Thorsten Claff <tclaff@gmail.com>
thepretender
tephyrnex
Thomas Ibel <tibel@users.noreply.github.com>
Tomasz Cielecki <tomasz@ostebaronen.dk>
ToplandJ <jostein.topland@nov.com>
twsl <45483159+twsI@users.noreply.github.com>
Udo Liess
VisualMelon
vhoehn <veit.hoehn@hte-company.de>
Vsevolod Kukol <sevo@sevo.org>
Xavier <Xavier@xavier-PC.lsi>
zur003 <Eric.Zurcher@csiro.au>
Markus Ebner
Duncan Robertson <duncanjacobrobertson@gmail.com>
LauXjpn <laucomm@gmail.com>
R. Usamentiaga
Dmytro Shaurin
Rustam Sayfutdinov
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<id>OxyPlot.Windows</id>
<title>OxyPlot for Windows apps</title>
<version>$version$</version>
<version>2.1.0</version>
<authors>Oystein Bjorke</authors>
<description>OxyPlot is a plotting library for .NET. This package targets the Universal Windows Platform (UAP10).</description>
<releaseNotes></releaseNotes>
Expand All @@ -14,18 +14,18 @@
<language>en-US</language>
<tags>winrt uap uap10 UWP win10 plotting plot charting chart</tags>
<dependencies>
<dependency id="OxyPlot.Core" version="[$version$]"/>
<dependency id="OxyPlot.Core" version="2.1.0"/>
</dependencies>
</metadata>
<files>
<file src="bin\Release\OxyPlot.Windows.???" target="lib\uap10.0" />
<file src="bin\Release\OxyPlot.Windows\*.*" target="lib\uap10.0\OxyPlot.Windows" />
<file src="bin\Release\OxyPlot.Windows\Themes\*.*" target="lib\uap10.0\OxyPlot.Windows\Themes" />
<file src="bin\x64\Release\OxyPlot.Windows.???" target="lib\uap10.0" />
<file src="bin\x64\Release\OxyPlot.Windows\*.*" target="lib\uap10.0\OxyPlot.Windows" />
<file src="bin\x64\Release\OxyPlot.Windows\Themes\*.*" target="lib\uap10.0\OxyPlot.Windows\Themes" />

<file src="..\..\LICENSE" />
<file src="..\..\AUTHORS" />
<file src="..\..\CONTRIBUTORS" />
<file src="..\..\README.md" />
<file src="..\..\CHANGELOG.md" />
</files>
</package>
</package>
74 changes: 74 additions & 0 deletions OxyPlot.Windows.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29403.142
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OxyPlot.Windows", "OxyPlot.Windows\OxyPlot.Windows.csproj", "{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleDemo", "OxyPlot.Windows\Examples\Windows\SimpleDemo\SimpleDemo.csproj", "{FAC17BDF-4003-4359-A366-2E2F380E1BB5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Debug|ARM.ActiveCfg = Debug|ARM
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Debug|ARM.Build.0 = Debug|ARM
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Debug|ARM64.ActiveCfg = Debug|ARM64
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Debug|ARM64.Build.0 = Debug|ARM64
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Debug|x64.ActiveCfg = Debug|x64
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Debug|x64.Build.0 = Debug|x64
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Debug|x86.ActiveCfg = Debug|x86
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Debug|x86.Build.0 = Debug|x86
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Release|Any CPU.Build.0 = Release|Any CPU
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Release|ARM.ActiveCfg = Release|ARM
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Release|ARM.Build.0 = Release|ARM
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Release|ARM64.ActiveCfg = Release|ARM64
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Release|ARM64.Build.0 = Release|ARM64
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Release|x64.ActiveCfg = Release|x64
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Release|x64.Build.0 = Release|x64
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Release|x86.ActiveCfg = Release|x86
{4F5B1D20-EA97-4DBB-94E1-8D86B4152847}.Release|x86.Build.0 = Release|x86
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Debug|Any CPU.ActiveCfg = Debug|x64
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Debug|Any CPU.Build.0 = Debug|x64
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Debug|ARM.ActiveCfg = Debug|ARM
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Debug|ARM.Build.0 = Debug|ARM
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Debug|ARM.Deploy.0 = Debug|ARM
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Debug|ARM64.ActiveCfg = Debug|x86
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Debug|x64.ActiveCfg = Debug|x64
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Debug|x64.Build.0 = Debug|x64
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Debug|x64.Deploy.0 = Debug|x64
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Debug|x86.ActiveCfg = Debug|x86
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Debug|x86.Build.0 = Debug|x86
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Debug|x86.Deploy.0 = Debug|x86
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Release|Any CPU.ActiveCfg = Release|x86
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Release|ARM.ActiveCfg = Release|ARM
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Release|ARM.Build.0 = Release|ARM
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Release|ARM.Deploy.0 = Release|ARM
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Release|ARM64.ActiveCfg = Release|x86
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Release|x64.ActiveCfg = Release|x64
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Release|x64.Build.0 = Release|x64
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Release|x64.Deploy.0 = Release|x64
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Release|x86.ActiveCfg = Release|x86
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Release|x86.Build.0 = Release|x86
{FAC17BDF-4003-4359-A366-2E2F380E1BB5}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {64FB9F5C-FD83-4AF6-967F-20344209E367}
EndGlobalSection
EndGlobal
85 changes: 85 additions & 0 deletions OxyPlot.Windows/Converters/OxyColorConverters.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="OxyColorConverter.cs" company="OxyPlot">
// Copyright (c) 2014 OxyPlot contributors
// </copyright>
// <summary>
// Converts from OxyPlot colors to Windows.UI.Color and vice versa.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace OxyPlot.Windows
{
using System;

using global::Windows.UI;
using global::Windows.UI.Xaml.Data;
using global::Windows.UI.Xaml.Media;

/// <summary>
/// Converts from OxyPlot colors to Windows.UI.Color and vice versa.
/// </summary>
public sealed class OxyColorConverter : IValueConverter
{
/// <summary>
/// The convert.
/// </summary>
/// <param name="value">The value.</param>
/// <param name="targetType">The target type.</param>
/// <param name="parameter">The parameter.</param>
/// <param name="language">The language.</param>
/// <returns>The converted value.</returns>
public object Convert(object value, Type targetType, object parameter, string language)
{
if (!(value is OxyColor))
{
return null;
}

var color = (OxyColor)value;
Color col = Color.FromArgb(color.A, color.R, color.G, color.B);
if (targetType == typeof(Color))
{
return col;
}

if (targetType == typeof(Brush))
{
Brush ret = new SolidColorBrush(col);
return ret;
}

return null;
}

/// <summary>
/// Converts back.
/// </summary>
/// <param name="value">The value.</param>
/// <param name="targetType">The target type.</param>
/// <param name="parameter">The parameter.</param>
/// <param name="language">The language.</param>
/// <returns>The converted value.</returns>
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
if (targetType != typeof(OxyColor))
{
return null;
}

if (value is Color)
{
var color = (Color)value;
return OxyColor.FromArgb(color.A, color.R, color.G, color.B);
}

var scb = value as SolidColorBrush;
if (scb != null)
{
var color = scb.Color;
return OxyColor.FromArgb(color.A, color.R, color.G, color.B);
}

return null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace OxyPlot.Windows
/// </summary>
/// <remarks>This is used to convert BorderThickness properties to Path.StrokeThickness (double).
/// The maximum thickness value is used.</remarks>
public class ThicknessConverter : IValueConverter
public sealed class ThicknessConverter : IValueConverter
{
/// <summary>
/// Converts the specified value.
Expand Down Expand Up @@ -56,4 +56,4 @@ public object ConvertBack(object value, Type targetType, object parameter, strin
return null;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Page.DataContext>
<local:MainViewModel/>
</Page.DataContext>
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<windows:PlotView Model="{Binding Model}"/>
<Grid>
<windows:PlotView Model="{Binding Model}" />
</Grid>
</Page>
Loading