Skip to content

Commit

Permalink
feat: migrated to .net 9
Browse files Browse the repository at this point in the history
  • Loading branch information
0xc3u committed Feb 14, 2025
1 parent f80d33f commit bcf6ef8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
DOTNET_NOLOGO: true # Disable the .NET logo
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Disable the .NET first time experience
DOTNET_CLI_TELEMETRY_OPTOUT: true # Disable sending .NET CLI telemetry
DONET_VERSION: 8.0.402
DONET_VERSION: 9.0.200

jobs:
build:
Expand Down
10 changes: 8 additions & 2 deletions samples/Indiko.Maui.Controls.Markdown.Sample/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
namespace Indiko.Maui.Controls.Markdown.Sample;
using Indiko.Maui.Controls.Markdown.Sample.ViewModels;

namespace Indiko.Maui.Controls.Markdown.Sample;

public partial class App : Application
{
public App()
{
InitializeComponent();

MainPage = new AppShell();
}

protected override Window CreateWindow(IActivationState activationState)
{
return new Window(new AppShell());
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>Indiko.Maui.Controls.Markdown.Sample</RootNamespace>
<UseMaui>true</UseMaui>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net9.0;net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
7 changes: 2 additions & 5 deletions src/Indiko.Maui.Controls.Markdown/LatexView.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
using SkiaSharp;
using SkiaSharp.Views.Maui;
using SkiaSharp.Views.Maui.Controls;
using Typography.OpenFont;

namespace Indiko.Maui.Controls.Markdown;

public sealed class LatexView : SKCanvasView
{

private System.Drawing.RectangleF _bounds;

public static readonly BindableProperty TextProperty = BindableProperty.Create(propertyName: nameof(Text),
returnType: typeof(string), declaringType: typeof(LatexView), propertyChanged: OnLatexChanged);

Expand Down Expand Up @@ -74,6 +70,7 @@ public LatexView()
~LatexView()
{
PaintSurface -= OnPainting;
SizeChanged -= (s, e) => UpdateSize();
}

private void UpdateSize()
Expand All @@ -98,7 +95,7 @@ private void UpdateSize()
}
}

private void OnPainting(object? sender, SKPaintSurfaceEventArgs e)
private void OnPainting(object sender, SKPaintSurfaceEventArgs e)
{
SKImageInfo info = e.Info;
SKSurface surface = e.Surface;
Expand Down

0 comments on commit bcf6ef8

Please sign in to comment.