Skip to content

Commit

Permalink
Updated to uno 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
dim-37 authored and xperiandri committed May 2, 2021
1 parent e79235f commit 5479cd0
Show file tree
Hide file tree
Showing 16 changed files with 161 additions and 154 deletions.
4 changes: 2 additions & 2 deletions src/Elmish.Uno.Mobile/Elmish.Uno.Mobile.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Uno.UI" Version="3.5.1" />
<PackageReference Include="Uno.UI" Version="3.7.*" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Elmish.Uno\Elmish.Uno.fsproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" Version="5.0.0" />
<PackageReference Update="FSharp.Core" Version="5.0.*" />
</ItemGroup>

</Project>
5 changes: 2 additions & 3 deletions src/Elmish.Uno.Tests/Elmish.Uno.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
<PackageReference Include="FSharp.Interop.Dynamic" Version="5.0.1.268" />
<PackageReference Include="Hedgehog" Version="0.8.3" />
<PackageReference Include="Hedgehog.Experimental" Version="0.1.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<!--<PackageReference Include="System.ValueTuple" Version="4.5.0" />-->
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.*" />
<PackageReference Include="Unquote" Version="5.0.0" />
<PackageReference Include="xunit.core" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
Expand All @@ -39,7 +38,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" Version="5.0.0" />
<PackageReference Update="FSharp.Core" Version="5.0.*" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Elmish.Uno.Uwp/Elmish.Uno.Uwp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PackageReference>
<PackageReference Include="Elmish" Version="[3.0.3, 4)" />
<PackageReference Include="Uno.Core" Version="2.3.0" />
<PackageReference Include="FSharp.Core" Version="5.0.0" />
<PackageReference Include="FSharp.Core" Version="5.0.*" />
</ItemGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down
2 changes: 1 addition & 1 deletion src/Elmish.Uno/Elmish.Uno.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" Version="5.0.0" />
<PackageReference Update="FSharp.Core" Version="5.0.*" />
</ItemGroup>

</Project>
18 changes: 9 additions & 9 deletions src/Samples/Samples.Droid/Samples.Droid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Elmish" Version="[3.0.3, 4)" />
<PackageReference Include="FSharp.Core" Version="5.0.0" />
<PackageReference Include="Uno.Microsoft.Toolkit" Version="7.0.0-build.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp" Version="7.0.0-build.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI" Version="7.0.0-build.*" />
<!--<PackageReference Include="Uno.Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.0.2-uno.*" />-->
<PackageReference Include="Uno.UI" Version="3.5.1" />
<PackageReference Include="Uno.UI.RemoteControl" Version="3.5.1" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="FSharp.Core" Version="5.0.*" />
<PackageReference Include="Uno.Microsoft.Toolkit" Version="7.0.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp" Version="7.0.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI" Version="7.0.*" />
<PackageReference Include="Uno.Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.0.2-uno.*" />
<PackageReference Include="Uno.UI" Version="3.7.*" />
<PackageReference Include="Uno.UI.RemoteControl" Version="3.7.*" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UniversalImageLoader" Version="1.9.33" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.*" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.*" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
Expand Down
12 changes: 10 additions & 2 deletions src/Samples/Samples.Shared/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@
x:Class="Elmish.Uno.Samples.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:samples="using:Elmish.Uno.Samples">
xmlns:samples="using:Elmish.Uno.Samples"
xmlns:tconv="using:Microsoft.Toolkit.Uwp.UI.Converters">

<Application.Resources>
<!-- -->
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
</ResourceDictionary.MergedDictionaries>

<tconv:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
<tconv:FormatStringConverter x:Key="FormatStringConverter" />
</ResourceDictionary>
</Application.Resources>

</Application>
110 changes: 62 additions & 48 deletions src/Samples/Samples.Shared/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,26 @@ namespace Elmish.Uno.Samples
/// </summary>
public sealed partial class App : Application
{
#if NET5_0 && WINDOWS
private Window window;

#else
private global::Windows.UI.Xaml.Window window;
#endif

/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
ConfigureFilters(global::Uno.Extensions.LogExtensionPoint.AmbientLoggerFactory);
InitializeLogging();

this.InitializeComponent();

#if HAS_UNO || NETFX_CORE
this.Suspending += OnSuspending;
#endif
}

/// <summary>
Expand All @@ -51,10 +61,10 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
#endif

#if NET5_0 && WINDOWS
var window = new Window();
window = new Window();
window.Activate();
#else
var window = global::Windows.UI.Xaml.Window.Current;
window = global::Windows.UI.Xaml.Window.Current;
#endif

Shell shell = window.Content as Shell;
Expand Down Expand Up @@ -91,6 +101,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
}
}


/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
Expand All @@ -109,54 +120,57 @@ private void OnSuspending(object sender, SuspendingEventArgs e)
/// <summary>
/// Configures global logging
/// </summary>
/// <param name="factory"></param>
static void ConfigureFilters(ILoggerFactory factory)
private static void InitializeLogging()
{
factory
.WithFilter(new FilterLoggerSettings
{
{ "Uno", LogLevel.Warning },
{ "Windows", LogLevel.Warning },

// Debug JS interop
// { "Uno.Foundation.WebAssemblyRuntime", LogLevel.Debug },

// Generic Xaml events
// { "Windows.UI.Xaml", LogLevel.Debug },
// { "Windows.UI.Xaml.VisualStateGroup", LogLevel.Debug },
// { "Windows.UI.Xaml.StateTriggerBase", LogLevel.Debug },
// { "Windows.UI.Xaml.UIElement", LogLevel.Debug },

// Layouter specific messages
// { "Windows.UI.Xaml.Controls", LogLevel.Debug },
// { "Windows.UI.Xaml.Controls.Layouter", LogLevel.Debug },
// { "Windows.UI.Xaml.Controls.Panel", LogLevel.Debug },
// { "Windows.Storage", LogLevel.Debug },

// Binding related messages
// { "Windows.UI.Xaml.Data", LogLevel.Debug },

// DependencyObject memory references tracking
// { "ReferenceHolder", LogLevel.Debug },

// ListView-related messages
// { "Windows.UI.Xaml.Controls.ListViewBase", LogLevel.Debug },
// { "Windows.UI.Xaml.Controls.ListView", LogLevel.Debug },
// { "Windows.UI.Xaml.Controls.GridView", LogLevel.Debug },
// { "Windows.UI.Xaml.Controls.VirtualizingPanelLayout", LogLevel.Debug },
// { "Windows.UI.Xaml.Controls.NativeListViewBase", LogLevel.Debug },
// { "Windows.UI.Xaml.Controls.ListViewBaseSource", LogLevel.Debug }, //iOS
// { "Windows.UI.Xaml.Controls.ListViewBaseInternalContainer", LogLevel.Debug }, //iOS
// { "Windows.UI.Xaml.Controls.NativeListViewBaseAdapter", LogLevel.Debug }, //Android
// { "Windows.UI.Xaml.Controls.BufferViewCache", LogLevel.Debug }, //Android
// { "Windows.UI.Xaml.Controls.VirtualizingPanelGenerator", LogLevel.Debug }, //WASM
}
)
#if DEBUG
.AddConsole(LogLevel.Debug);
var factory = LoggerFactory.Create(builder =>
{
#if __WASM__
builder.AddProvider(new global::Uno.Extensions.Logging.WebAssembly.WebAssemblyConsoleLoggerProvider());
#elif __IOS__
builder.AddProvider(new global::Uno.Extensions.Logging.OSLogLoggerProvider());
#elif NETFX_CORE
builder.AddDebug();
#else
.AddConsole(LogLevel.Information);
builder.AddConsole();
#endif
// Exclude logs below this level
builder.SetMinimumLevel(LogLevel.Information);
// Default filters for Uno Platform namespaces
builder.AddFilter("Uno", LogLevel.Warning);
builder.AddFilter("Windows", LogLevel.Warning);
builder.AddFilter("Microsoft", LogLevel.Warning);
// Generic Xaml events
// builder.AddFilter("Windows.UI.Xaml", LogLevel.Debug );
// builder.AddFilter("Windows.UI.Xaml.VisualStateGroup", LogLevel.Debug );
// builder.AddFilter("Windows.UI.Xaml.StateTriggerBase", LogLevel.Debug );
// builder.AddFilter("Windows.UI.Xaml.UIElement", LogLevel.Debug );
// builder.AddFilter("Windows.UI.Xaml.FrameworkElement", LogLevel.Trace );
// Layouter specific messages
// builder.AddFilter("Windows.UI.Xaml.Controls", LogLevel.Debug );
// builder.AddFilter("Windows.UI.Xaml.Controls.Layouter", LogLevel.Debug );
// builder.AddFilter("Windows.UI.Xaml.Controls.Panel", LogLevel.Debug );
// builder.AddFilter("Windows.Storage", LogLevel.Debug );
// Binding related messages
// builder.AddFilter("Windows.UI.Xaml.Data", LogLevel.Debug );
// builder.AddFilter("Windows.UI.Xaml.Data", LogLevel.Debug );
// Binder memory references tracking
// builder.AddFilter("Uno.UI.DataBinding.BinderReferenceHolder", LogLevel.Debug );
// RemoteControl and HotReload related
// builder.AddFilter("Uno.UI.RemoteControl", LogLevel.Information);
// Debug JS interop
// builder.AddFilter("Uno.Foundation.WebAssemblyRuntime", LogLevel.Debug );
});

global::Uno.Extensions.LogExtensionPoint.AmbientLoggerFactory = factory;
}
}
}
17 changes: 8 additions & 9 deletions src/Samples/Samples.Skia.Gtk/Samples.Skia.Gtk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Elmish" Version="[3.0.3, 4)" />
<PackageReference Include="FSharp.Core" Version="5.0.0" />
<!-- Note that for WebAssembly version 1.1.1 of the console logger required -->
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
<PackageReference Include="Uno.Microsoft.Toolkit" Version="7.0.0-build.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp" Version="7.0.0-build.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI" Version="7.0.0-build.*" />
<PackageReference Include="FSharp.Core" Version="5.0.*" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.*" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.*" />
<PackageReference Include="Uno.Microsoft.Toolkit" Version="7.0.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp" Version="7.0.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI" Version="7.0.*" />
<PackageReference Include="Uno.Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.0.2-uno.*" />
<PackageReference Include="Uno.UI.Skia.Gtk" Version="3.5.1" />
<PackageReference Include="Uno.UI.RemoteControl" Version="3.5.1" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Skia.Gtk" Version="3.7.*" />
<PackageReference Include="Uno.UI.RemoteControl" Version="3.7.*" Condition="'$(Configuration)'=='Debug'" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Elmish.Uno.Mobile\Elmish.Uno.Mobile.fsproj" />
Expand Down
19 changes: 8 additions & 11 deletions src/Samples/Samples.Skia.Tizen/Samples.Skia.Tizen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,16 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Elmish" Version="[3.0.3, 4)" />
<PackageReference Include="FSharp.Core" Version="5.0.0" />
<!-- Note that for WebAssembly version 1.1.1 of the console logger required -->
<PackageReference Include="Elmish" Version="[3.0.3, 4)" />
<PackageReference Include="FSharp.Core" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
<PackageReference Include="FSharp.Core" Version="5.0.*" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.*" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.*" />
<PackageReference Include="SkiaSharp.Views" Version="2.80.2" />
<PackageReference Include="Uno.Microsoft.Toolkit" Version="7.0.0-build.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp" Version="7.0.0-build.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI" Version="7.0.0-build.*" />
<PackageReference Include="Uno.Microsoft.Toolkit" Version="7.0.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp" Version="7.0.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI" Version="7.0.*" />
<PackageReference Include="Uno.Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.0.2-uno.*" />
<PackageReference Include="Uno.UI.Skia.Tizen" Version="3.5.1" />
<PackageReference Include="Uno.UI.RemoteControl" Version="3.5.1" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Skia.Tizen" Version="3.7.*" />
<PackageReference Include="Uno.UI.RemoteControl" Version="3.7.*" Condition="'$(Configuration)'=='Debug'" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Elmish.Uno.Mobile\Elmish.Uno.Mobile.fsproj" />
Expand Down
12 changes: 6 additions & 6 deletions src/Samples/Samples.Skia.Wpf.Host/Samples.Skia.Wpf.Host.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Elmish" Version="[3.0.3, 4)" />
<PackageReference Include="FSharp.Core" Version="5.0.0" />
<PackageReference Include="Uno.Microsoft.Toolkit" Version="7.0.0-build.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp" Version="7.0.0-build.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI" Version="7.0.0-build.*" />
<PackageReference Include="FSharp.Core" Version="5.0.*" />
<PackageReference Include="Uno.Microsoft.Toolkit" Version="7.0.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp" Version="7.0.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI" Version="7.0.*" />
<PackageReference Include="Uno.Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.0.2-uno.*" />
<PackageReference Include="Uno.UI.Skia.Wpf" Version="3.5.1" />
<PackageReference Include="Uno.UI.RemoteControl" Version="3.5.1" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Skia.Wpf" Version="3.7.*" />
<PackageReference Include="Uno.UI.RemoteControl" Version="3.7.*" Condition="'$(Configuration)'=='Debug'" />
</ItemGroup>
<ItemGroup>
<Content Include="Assets\Fonts\uno-fluentui-assets.ttf" />
Expand Down
17 changes: 8 additions & 9 deletions src/Samples/Samples.Skia.Wpf/Samples.Skia.Wpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Elmish" Version="[3.0.3, 4)" />
<PackageReference Include="FSharp.Core" Version="5.0.0" />
<!-- Note that for WebAssembly version 1.1.1 of the console logger required -->
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
<PackageReference Include="Uno.Microsoft.Toolkit" Version="7.0.0-build.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp" Version="7.0.0-build.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI" Version="7.0.0-build.*" />
<PackageReference Include="FSharp.Core" Version="5.0.*" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.*" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.*" />
<PackageReference Include="Uno.Microsoft.Toolkit" Version="7.0.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp" Version="7.0.*" />
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI" Version="7.0.*" />
<PackageReference Include="Uno.Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.0.2-uno.*" />
<PackageReference Include="Uno.UI.Skia.Wpf" Version="3.5.1" />
<PackageReference Include="Uno.UI.RemoteControl" Version="3.5.1" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Skia.Wpf" Version="3.7.*" />
<PackageReference Include="Uno.UI.RemoteControl" Version="3.7.*" Condition="'$(Configuration)'=='Debug'" />
</ItemGroup>
<ItemGroup>
<UpToDateCheckInput Include="..\Samples.Shared\**\*.xaml" />
Expand Down
15 changes: 8 additions & 7 deletions src/Samples/Samples.UWP/Samples.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@
-->
</PackageReference>
<PackageReference Include="Elmish" Version="[3.0.3, 4)" />
<PackageReference Include="FSharp.Core" Version="5.0.0" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.0.1" />
<PackageReference Include="FSharp.Core" Version="5.0.*" />
<PackageReference Include="Microsoft.UI.Xaml" Version="2.5.0" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.0.*" />
<PackageReference Include="Uno.Core" Version="2.3.0" />
<PackageReference Include="Microsoft.Toolkit" Version="7.0.0" />
<PackageReference Include="Microsoft.Toolkit.Uwp" Version="7.0.0" />
<PackageReference Include="Microsoft.Toolkit.Uwp.UI" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
<PackageReference Include="Microsoft.Toolkit" Version="7.0.*" />
<PackageReference Include="Microsoft.Toolkit.Uwp" Version="7.0.*" />
<PackageReference Include="Microsoft.Toolkit.Uwp.UI" Version="7.0.*" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.*" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.*" />
</ItemGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down
Loading

0 comments on commit 5479cd0

Please sign in to comment.