Skip to content

Commit c396506

Browse files
committed
ScottPlot: complete csproj, _Helpers and _View.template
1 parent e19fb5b commit c396506

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

src/CSharpMarkup.WinUI.ScottPlot/CSharpMarkup.WinUI.ScottPlot.csproj

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
<PropertyGroup>
4646
<RootNamespace>CSharpMarkup.WinUI.ScottPlot</RootNamespace>
47-
<TargetFrameworks>net8.0-windows10.0.19041;net8.0;net8.0-android34.0;net8.0-ios18.0;net8.0-maccatalyst18.0</TargetFrameworks> <!-- Identical to ScottPlot.WinUI NuGet target frameworks -->
47+
<TargetFrameworks>net8.0-windows10.0.19041.0;net8.0;net8.0-android34.0;net8.0-ios18.0;net8.0-maccatalyst18.0</TargetFrameworks> <!-- Identical to ScottPlot.WinUI NuGet target frameworks -->
4848
<EnableDefaultPageItems>false</EnableDefaultPageItems>
4949
</PropertyGroup>
5050

@@ -57,4 +57,13 @@
5757
<PackageReference Include="CSharpMarkup.WinUI" />
5858
<PackageReference Include="ScottPlot.WinUI" />
5959
</ItemGroup>
60+
61+
<ItemGroup>
62+
<ProjectReference Include="..\..\..\CSharpMarkup.Generators\WinUI\SourceGenerators\SourceGenerators.csproj" Condition=" '$(Configuration)' == 'Generate' ">
63+
<OutputItemType>Analyzer</OutputItemType>
64+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
65+
</ProjectReference>
66+
</ItemGroup>
67+
68+
<Import Project="..\..\..\CSharpMarkup.Generators\WinUI\Attributes\Attributes.projitems" Label="Shared" Condition=" '$(Configuration)' == 'Generate' " />
6069
</Project>

src/CSharpMarkup.WinUI.ScottPlot/_Helpers.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace CSharpMarkup.WinUI.ScottPlot
1313
{
1414
public static partial class Helpers
1515
{
16-
16+
1717
#if GENERATE
1818
/// <summary>Used by codegen to generate a <see cref="IDefaultBindProperty"/> implementation on markup types. Not used at runtime.</summary>
1919
/// <remarks>Types must be fully specified for codegen to work</remarks>
@@ -28,7 +28,7 @@ public static partial class Helpers
2828
/// </summary>
2929
static Type[] UIAssemblies => new Type[] // Assemblies in UI NuGets that contain UI types
3030
{
31-
// TODO: typeof(global::ScottPlot...)
31+
typeof(global::ScottPlot.WinUI.WinUIPlot)
3232
};
3333
#endif
3434
}

src/CSharpMarkup.WinUI.ScottPlot/_View.Template.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,10 @@
1616
#region NamespaceUsings
1717
using System;
1818
using System.Collections.Generic;
19-
using System.Numerics;
20-
using System.Windows.Input;
21-
using System.Runtime.Versioning;
22-
using Microsoft;
2319
using CSharpMarkup.WinUI.GeneratedCodeUtilities;
24-
using UI = Microsoft.UI;
25-
using Collections = System.Collections;
2620
using Xaml = Microsoft.UI.Xaml;
27-
using VirtualKey = Windows.System.VirtualKey;
28-
using VirtualKeyModifiers = Windows.System.VirtualKeyModifiers;
29-
using Drawing = System.Drawing;
30-
// TODO: aliases to shorten namespaces in generated code, e.g. using ScottPlotThingy = ScottPlot...Thingy;
21+
using Sp = ScottPlot;
22+
using SpUI = ScottPlot.WinUI;
3123
#endregion
3224

3325
// TODO: above aliases are workarounds for compile errors, investigate why and remove if possible

0 commit comments

Comments
 (0)