Skip to content
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

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

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 <[email protected]>
DNV GL AS
LECO® Corporation
TrainerRoad, LLC <[email protected]>
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 <[email protected]>
Auriou
Bartłomiej Szypelow <[email protected]>
benjaminrupp
Benoit Blanchon <>
br
brantheman
Brannon King
Bryan Freeman
Brian Lim <[email protected]>
Caleb Clarke <[email protected]>
Carlos Anderson <[email protected]>
Carlos Teixeira <[email protected]>
Chase Long <[email protected]>
Choden Konigsmark <[email protected]>
classicboss302
csabar <[email protected]>
Curt Mullin <[email protected]>
Cyril Martin <[email protected]>
Dan Aizenstros
danpaul88 <[email protected]>
darrelbrown
David Funk <[email protected]>
David Laundav <[email protected]>
David Wong <[email protected]>
DJDAS
DNV GL AS
Doeharrrck <[email protected]>
Don Syme <[email protected]>
DotNetDoctor <[email protected]>
efontana2
elliatab
Elmar Strittmatter
episage <[email protected]>
eric
Federico Coppola <[email protected]>
Francois Botha <[email protected]>
Frank Tore Sæther <[email protected]>
Garrett
Geert van Horrik <[email protected]>
Gimly
Herman Eldering <[email protected]>
Iain Nicol <[email protected]>
Ilja Nosik <[email protected]>
Ilya Skriblovsky <[email protected]>
Iurii Gazin <[email protected]>
Jānis Kiršteins <[email protected]>
jaykul
Jeremy Koritzinsky
Jeremie Magnette
jezza323
Johan
Johan20D
Jonathan Arweck
Jonathan Shore <[email protected]>
julien.bataille
Just Slon <[email protected]>
Kaplas80 <[email protected]>
kc1212 <[email protected]>
kenny_evoleap
Kenny Nygaard
Kevin Crowell <[email protected]>
Kyle Pulvermacher
LECO® Corporation
Levi Botelho <[email protected]>
Linquize
lsowen
Luka B
Nils Haferkemper <[email protected]>
Matt Williams
Matthew Leibowitz <[email protected]>
Memphisch <[email protected]>
Mendel Monteiro-Beckerman
Menno Deij - van Rijswijk <[email protected]>
methdotnet
Mikant <[email protected]>
mirolev <[email protected]>
Mitch-Connor <[email protected]>
moes_leco
moljac
mroth
mrtncls
Oleg Tarasov <[email protected]>
Oystein Bjorke <[email protected]>
Patrice Marin <[email protected]>
Peter-B-
Philippe AURIOU <[email protected]>
Piotr Warzocha <[email protected]>
Poul Erik Venø <[email protected]>
Régis Boudin <[email protected]>
Rik Borger <[email protected]>
ryang <[email protected]>
Sarah Müller <[email protected]>
Senen Fernandez <[email protected]>
Scott W Harden <[email protected]>
Shankar Mathiah Nanjundan <[email protected]>
Shun-ichi Goto <[email protected]>
Soarc <[email protected]>
Stefan Rado <[email protected]>
stefan-schweiger
Steve Hoelzer <[email protected]>
Surfin Bird <[email protected]>
Sven Dummis
Taldoras <[email protected]>
Tandy Carmichael <[email protected]>
Tasos Stamadianos <[email protected]>
Thorsten Claff <[email protected]>
thepretender
tephyrnex
Thomas Ibel <[email protected]>
Tomasz Cielecki <[email protected]>
ToplandJ <[email protected]>
twsl <[email protected]>
Udo Liess
VisualMelon
vhoehn <[email protected]>
Vsevolod Kukol <[email protected]>
Xavier <[email protected]>
zur003 <[email protected]>
Markus Ebner
Duncan Robertson <[email protected]>
LauXjpn <[email protected]>
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