Skip to content

Commit

Permalink
Updated versions and deps
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKoell committed Jan 8, 2025
1 parent dadb589 commit 9ed791f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.1.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.1.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.3" />
<PackageReference Include="Avalonia" Version="11.2.3" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.3" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.3" />

<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.3" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.2.3" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,8 @@ protected sealed override IPlatformHandle CreateNativeControlCore(IPlatformHandl
/// If not implemented, the instance will be created automatically.
/// </summary>
/// <returns>An instance of the WinForms control to host.</returns>
protected virtual T? OnCreateWinFormsControl()
{
return null;
}

protected virtual T? OnCreateWinFormsControl() => null;

/// <inheritdoc cref="DestroyNativeControlCore"/>
protected sealed override void DestroyNativeControlCore(IPlatformHandle control)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,10 @@ public void AddControl(IDisposeWinFormsControl viewModel, Control control)
viewModel.DisposeWinFormsControl += DisposeWinFormsControl;
}

public Control? GetControl(IDisposeWinFormsControl? viewModel)
{
if (viewModel == null)
return null;

return _controls.TryGetValue(viewModel, out var existingInstance)
? existingInstance
: null;
}

public Control? GetControl(IDisposeWinFormsControl? viewModel) => viewModel == null
? null
: _controls.GetValueOrDefault(viewModel);

private void DisposeWinFormsControl(object? sender, WinFormsDisposeEventArgs e)
{
var viewModel = e.ViewModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<PackageIcon>RoyalApps_1024.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RootNamespace>RoyalApps.Community.Avalonia.Windows</RootNamespace>
<Version>1.1.0-beta1</Version>
<Version>1.2.0</Version>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFrameworks>net8.0-windows;net9.0-windows</TargetFrameworks>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<Configurations>Debug;Release</Configurations>
<Platforms>x64;ARM64</Platforms>
Expand All @@ -29,7 +29,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.1.3" />
<PackageReference Include="Avalonia" Version="11.2.0" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit 9ed791f

Please sign in to comment.