diff --git a/samples/Basic/WindowsForms/SkiaSharpSample/SkiaSharpSample.csproj b/samples/Basic/WindowsForms/SkiaSharpSample/SkiaSharpSample.csproj index 33b4ee0a8..0cbb7160d 100644 --- a/samples/Basic/WindowsForms/SkiaSharpSample/SkiaSharpSample.csproj +++ b/samples/Basic/WindowsForms/SkiaSharpSample/SkiaSharpSample.csproj @@ -11,11 +11,6 @@ icon.ico - - - - - diff --git a/source/SkiaSharp.Build.props b/source/SkiaSharp.Build.props index 245004937..774b44094 100644 --- a/source/SkiaSharp.Build.props +++ b/source/SkiaSharp.Build.props @@ -117,7 +117,8 @@ - netstandard2.0;netstandard2.1;net462;$(TFMCurrent) + net462 + netstandard2.0;netstandard2.1;$(FullFrameworkTargetFrameworks);$(TFMCurrent) $(TFMCurrent)-ios$(TPViOSCurrent);$(TFMCurrent)-maccatalyst$(TPVMacCatalystCurrent);$(TFMCurrent)-android$(TPVAndroidCurrent) $(PlatformTargetFrameworksCurrent);$(TFMCurrent)-tizen$(TPVTizenCurrent) $(PlatformTargetFrameworksCurrent);$(TFMCurrent)-tvos$(TPVtvOSCurrent) @@ -151,7 +152,7 @@ - net462 + $(WindowsDesktopTargetFrameworks);$(WindowsTargetFrameworks) diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.WPF/SkiaSharp.Views.WPF.csproj b/source/SkiaSharp.Views/SkiaSharp.Views.WPF/SkiaSharp.Views.WPF.csproj index cc8ba3e40..abbe34d93 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.WPF/SkiaSharp.Views.WPF.csproj +++ b/source/SkiaSharp.Views/SkiaSharp.Views.WPF/SkiaSharp.Views.WPF.csproj @@ -1,20 +1,20 @@  - $(WindowsDesktopTargetFrameworks) + $(FullFrameworkTargetFrameworks);$(WindowsDesktopTargetFrameworks) true SkiaSharp.Views.WPF SkiaSharp.Views.WPF SkiaSharp.Views.WPF $(DefineConstants);__DESKTOP__;__WPF__ SkiaSharp Views & Layers for Windows Presentation Foundation (WPF) - false + false wpf - + - + diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.WindowsForms/SKGLControl.cs b/source/SkiaSharp.Views/SkiaSharp.Views.WindowsForms/SKGLControl.cs index 60fc8148a..45d8fe1f3 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.WindowsForms/SKGLControl.cs +++ b/source/SkiaSharp.Views/SkiaSharp.Views.WindowsForms/SKGLControl.cs @@ -2,6 +2,9 @@ using System.ComponentModel; using System.Windows.Forms; using OpenTK; +#if WINDOWS +using OpenTK.GLControl; +#endif using OpenTK.Graphics; using OpenTK.Graphics.ES20; @@ -24,6 +27,19 @@ namespace SkiaSharp.Views.Desktop private SKSizeI lastSize; +#if WINDOWS + public SKGLControl() + : base(new GLControlSettings { AlphaBits = 8, RedBits = 8, GreenBits = 8, BlueBits = 8, DepthBits = 24, StencilBits = 8 }) + { + Initialize(); + } + + public SKGLControl(GLControlSettings settings) + : base(settings) + { + Initialize(); + } +#else public SKGLControl() : base(new GraphicsMode(new ColorFormat(8, 8, 8, 8), 24, 8)) { @@ -41,6 +57,7 @@ namespace SkiaSharp.Views.Desktop { Initialize(); } +#endif private void Initialize() { diff --git a/source/SkiaSharp.Views/SkiaSharp.Views.WindowsForms/SkiaSharp.Views.WindowsForms.csproj b/source/SkiaSharp.Views/SkiaSharp.Views.WindowsForms/SkiaSharp.Views.WindowsForms.csproj index 8ae005dc4..5c8d9717d 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views.WindowsForms/SkiaSharp.Views.WindowsForms.csproj +++ b/source/SkiaSharp.Views/SkiaSharp.Views.WindowsForms/SkiaSharp.Views.WindowsForms.csproj @@ -1,6 +1,6 @@  - $(WindowsDesktopTargetFrameworks) + $(FullFrameworkTargetFrameworks);$(WindowsDesktopTargetFrameworks) true SkiaSharp.Views.Desktop SkiaSharp.Views.WindowsForms @@ -8,11 +8,16 @@ $(DefineConstants);__DESKTOP__;__WINFORMS__ SkiaSharp Views & Layers for Windows.Forms windows.forms;winforms + false - + + + + + diff --git a/source/SkiaSharp.Views/SkiaSharp.Views/SkiaSharp.Views.csproj b/source/SkiaSharp.Views/SkiaSharp.Views/SkiaSharp.Views.csproj index 9747d196d..29c715b3b 100644 --- a/source/SkiaSharp.Views/SkiaSharp.Views/SkiaSharp.Views.csproj +++ b/source/SkiaSharp.Views/SkiaSharp.Views/SkiaSharp.Views.csproj @@ -1,6 +1,6 @@  - $(PlatformTargetFrameworks);$(WindowsDesktopTargetFrameworks) + $(PlatformTargetFrameworks);$(FullFrameworkTargetFrameworks);$(WindowsDesktopTargetFrameworks) SkiaSharp.Views SkiaSharp.Views SkiaSharp Views & Layers for Android, iOS, Mac Catalyst, macOS, and tvOS