Skip to content

Commit

Permalink
Merge branch 'feature/re-enabled-maui' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
kekyo committed Mar 6, 2024
2 parents fc1bdf5 + df51843 commit c8871de
Show file tree
Hide file tree
Showing 49 changed files with 1,935 additions and 6 deletions.
24 changes: 24 additions & 0 deletions Epoxy-build.sln
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Epoxy.Avalonia11", "src\Epo
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Epoxy.Avalonia11", "src\FSharp.Epoxy.Avalonia11\FSharp.Epoxy.Avalonia11.fsproj", "{8890BC8D-034C-4347-89DC-CC221018A378}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Epoxy.Core.Maui", "src\Epoxy.Core.Maui\Epoxy.Core.Maui.csproj", "{3C1F576F-7AFD-4004-8A50-550C3F2A95F1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Epoxy.Maui", "src\Epoxy.Maui\Epoxy.Maui.csproj", "{60769AB9-21DE-4C7E-90FC-F8ECAA4608B6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Epoxy.Core.OpenSilver", "src\Epoxy.Core.OpenSilver\Epoxy.Core.OpenSilver.csproj", "{3769F5A2-DB2A-4B34-BCA0-DD8060BE4BFE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Epoxy.OpenSilver", "src\Epoxy.OpenSilver\Epoxy.OpenSilver.csproj", "{32FB1543-CC76-4A2A-9251-72C646EE5AFC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -108,6 +116,22 @@ Global
{8890BC8D-034C-4347-89DC-CC221018A378}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8890BC8D-034C-4347-89DC-CC221018A378}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8890BC8D-034C-4347-89DC-CC221018A378}.Release|Any CPU.Build.0 = Release|Any CPU
{3C1F576F-7AFD-4004-8A50-550C3F2A95F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3C1F576F-7AFD-4004-8A50-550C3F2A95F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3C1F576F-7AFD-4004-8A50-550C3F2A95F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3C1F576F-7AFD-4004-8A50-550C3F2A95F1}.Release|Any CPU.Build.0 = Release|Any CPU
{60769AB9-21DE-4C7E-90FC-F8ECAA4608B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{60769AB9-21DE-4C7E-90FC-F8ECAA4608B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{60769AB9-21DE-4C7E-90FC-F8ECAA4608B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{60769AB9-21DE-4C7E-90FC-F8ECAA4608B6}.Release|Any CPU.Build.0 = Release|Any CPU
{3769F5A2-DB2A-4B34-BCA0-DD8060BE4BFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3769F5A2-DB2A-4B34-BCA0-DD8060BE4BFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3769F5A2-DB2A-4B34-BCA0-DD8060BE4BFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3769F5A2-DB2A-4B34-BCA0-DD8060BE4BFE}.Release|Any CPU.Build.0 = Release|Any CPU
{32FB1543-CC76-4A2A-9251-72C646EE5AFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{32FB1543-CC76-4A2A-9251-72C646EE5AFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{32FB1543-CC76-4A2A-9251-72C646EE5AFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{32FB1543-CC76-4A2A-9251-72C646EE5AFC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
206 changes: 206 additions & 0 deletions Epoxy.sln

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
|Epoxy.Avalonia|[![NuGet Epoxy.Avalonia](https://img.shields.io/nuget/v/Epoxy.Avalonia.svg?style=flat)](https://www.nuget.org/packages/Epoxy.Avalonia)|Avalonia version|
|Epoxy.OpenSilver|[![NuGet Epoxy.OpenSilver](https://img.shields.io/nuget/v/Epoxy.OpenSilver.svg?style=flat)](https://www.nuget.org/packages/Epoxy.OpenSilver)|OpenSilver version|
|Epoxy.Xamarin.Forms|[![NuGet Epoxy.Xamarin.Forms](https://img.shields.io/nuget/v/Epoxy.Xamarin.Forms.svg?style=flat)](https://www.nuget.org/packages/Epoxy.Xamarin.Forms)|Xamarin Forms version|
|Epoxy.Maui|[![NuGet Epoxy.Maui](https://img.shields.io/nuget/v/Epoxy.Maui.svg?style=flat)](https://www.nuget.org/packages/Epoxy.Maui)|.NET MAUI version|

## NuGetパッケージ F#専用

Expand All @@ -38,7 +39,8 @@
* WPF: .NET 8.0/7.0/6.0/5.0, .NET Core 3.0/3.1, .NET Framework 4.5/4.8
* Avalonia: [Avalonia](https://avaloniaui.net/) (New v11 or 0.10 series)
* OpenSilver: [OpenSilver](https://opensilver.net/) (1.0.0 or higher)
* Xamarin Forms: [Xamarin Forms](https://github.com/xamarin/Xamarin.Forms) 5.0.0.1874 or higher)
* Xamarin Forms: [Xamarin Forms](https://github.com/xamarin/Xamarin.Forms) (5.0.0.1874 or higher)
* .NET MAUI: 7.0 or higher
* 非同期処理 (async-await) を安全に書くことが出来るように配慮しています。
* C# 8.0でサポートされた、null許容参照型を使えます。
* F#は5.0以降に対応しています。F#向けのシグネチャ (camel case functions・関数型・Async型前提) が定義されています。
Expand Down Expand Up @@ -69,6 +71,9 @@

### ビルドテンプレートとビルド方法

注意: 将来のバージョンで、テンプレートプロジェクトは廃止されます。
現在のバージョンにおいても、単にあなたのプロジェクトに対応するパッケージを追加するだけで、Epoxyを使用することが出来ます。

.NET 7 SDKのCLIテンプレートに対応しています。以下のようなコマンドで、簡単にテンプレートコードをクリーンな状態で試すことができます:

```bash
Expand Down Expand Up @@ -779,6 +784,11 @@ Apache-v2

## History

* 1.13.0:
* Xamarin Formsがサポート終了となるため、 .NET MAUIパッケージを復活させました (#39)
* 但し、テンプレートプロジェクトは存在しません。あなたのMAUIプロジェクトでEpoxyを使うには、単に `Epoxy.Maui` パッケージを追加すればOKです。
* 同様に、他のプラットフォーム向けのテンプレートプロジェクトも、次のリリースで廃止する予定です。
* Avalonia 11への参照バージョンをダウングレードしました。
* 1.12.0:
* .NET 8.0 SDKに対応しました。
* 1.11.0:
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
|Epoxy.Avalonia|[![NuGet Epoxy.Avalonia](https://img.shields.io/nuget/v/Epoxy.Avalonia.svg?style=flat)](https://www.nuget.org/packages/Epoxy.Avalonia)|Avalonia version|
|Epoxy.OpenSilver|[![NuGet Epoxy.OpenSilver](https://img.shields.io/nuget/v/Epoxy.OpenSilver.svg?style=flat)](https://www.nuget.org/packages/Epoxy.OpenSilver)|OpenSilver version|
|Epoxy.Xamarin.Forms|[![NuGet Epoxy.Xamarin.Forms](https://img.shields.io/nuget/v/Epoxy.Xamarin.Forms.svg?style=flat)](https://www.nuget.org/packages/Epoxy.Xamarin.Forms)|Xamarin Forms version|
|Epoxy.Maui|[![NuGet Epoxy.Maui](https://img.shields.io/nuget/v/Epoxy.Maui.svg?style=flat)](https://www.nuget.org/packages/Epoxy.Maui)|.NET MAUI version|

## NuGet for F# specialized

Expand All @@ -39,6 +40,7 @@
* Avalonia: [Avalonia](https://avaloniaui.net/) (New v11 or 0.10 series)
* OpenSilver: [OpenSilver](https://opensilver.net/) (1.0.0 or higher)
* Xamarin Forms: [Xamarin Forms](https://github.com/xamarin/Xamarin.Forms) (5.0.0.1874 or higher)
* .NET MAUI: 7.0 or higher
* Safe asynchronous operation (async-await) ready.
* C# 8.0 nullable reference types ready.
* F# is 5.0 or upper, F# signatures (camel-case functions, function types, `Async` type assumptions) are defined.
Expand All @@ -61,6 +63,9 @@ or F# sample code in the [playground FSharp directory](playground.FSharp/).

### How to get and build the template code

Note: Template projects will be discontinued in future versions.
You can still use Epoxy in the current version by simply adding the corresponding package to your project.

The .NET 7 SDK CLI template is supported. You can easily try the template code in a clean state with the following command:

```bash
Expand Down Expand Up @@ -780,6 +785,11 @@ Apache-v2

## History

* 1.13.0:
* .NET MAUI package has been resurrected because Xamarin Forms is no longer supported (#39)
* However, there is no template project. To use Epoxy in your MAUI project, simply add the `Epoxy.Maui` package.
* Similarly, template projects for other platforms will be deprecated in the next release.
* Downgraded the reference version to Avalonia 11.
* 1.12.0:
* Supported .NET 8.0 SDK.
* 1.11.0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ public sealed partial class WaitingBlock : UserControl

public WaitingBlock()
{
InitializeComponent();
this.DataContext = this;
this.InitializeComponent();

this.CellBrushes = Enumerable.Range(0, 8).
Select(_ => Brushes.Gray).
Expand All @@ -64,8 +63,10 @@ public WaitingBlock()
}
},
null,
TimeSpan.Zero,
TimeSpan.Zero);
Timeout.InfiniteTimeSpan,
Timeout.InfiniteTimeSpan);

this.DataContext = this;
}

private void InitializeComponent() =>
Expand All @@ -79,7 +80,7 @@ protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)

protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)
{
this.timer.Change(TimeSpan.Zero, TimeSpan.Zero);
this.timer.Change(Timeout.InfiniteTimeSpan, Timeout.InfiniteTimeSpan);
base.OnDetachedFromVisualTree(e);
}

Expand Down
14 changes: 14 additions & 0 deletions playground/EpoxyHello.Maui/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:EpoxyHello.Maui"
x:Class="EpoxyHello.Maui.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
13 changes: 13 additions & 0 deletions playground/EpoxyHello.Maui/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Microsoft.Maui.Controls;

namespace EpoxyHello.Maui;

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

MainPage = new AppShell();
}
}
12 changes: 12 additions & 0 deletions playground/EpoxyHello.Maui/AppShell.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="EpoxyHello.Maui.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:views="clr-namespace:EpoxyHello.Maui.Views"
Shell.FlyoutBehavior="Disabled"
Title="EpoxyHello.Maui">

<ShellContent ContentTemplate="{DataTemplate views:MainPage}" />

</Shell>
11 changes: 11 additions & 0 deletions playground/EpoxyHello.Maui/AppShell.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Microsoft.Maui.Controls;

namespace EpoxyHello.Maui;

public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
}
}
50 changes: 50 additions & 0 deletions playground/EpoxyHello.Maui/Controls/WaitingBlock.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!--
////////////////////////////////////////////////////////////////////////////
//
// Epoxy - An independent flexible XAML MVVM library for .NET
// Copyright (c) Kouji Matsui (@kozy_kekyo, @kekyo@mastodon.cloud)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////
-->
<ContentView
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:EpoxyHello.Maui.Controls"
mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"
x:Class="EpoxyHello.Maui.Controls.WaitingBlock">

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="16" />
<RowDefinition Height="16" />
<RowDefinition Height="16" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="16" />
<ColumnDefinition Width="16" />
<ColumnDefinition Width="16" />
</Grid.ColumnDefinitions>
<Rectangle Grid.Row="0" Grid.Column="0" Fill="{Binding CellBrush0}" />
<Rectangle Grid.Row="0" Grid.Column="1" Fill="{Binding CellBrush1}" />
<Rectangle Grid.Row="0" Grid.Column="2" Fill="{Binding CellBrush2}" />
<Rectangle Grid.Row="1" Grid.Column="0" Fill="{Binding CellBrush7}" />
<Rectangle Grid.Row="1" Grid.Column="2" Fill="{Binding CellBrush3}" />
<Rectangle Grid.Row="2" Grid.Column="0" Fill="{Binding CellBrush6}" />
<Rectangle Grid.Row="2" Grid.Column="1" Fill="{Binding CellBrush5}" />
<Rectangle Grid.Row="2" Grid.Column="2" Fill="{Binding CellBrush4}" />
</Grid>
</ContentView>
Loading

0 comments on commit c8871de

Please sign in to comment.