Skip to content

Commit

Permalink
Merge pull request #177 from AvaloniaUI/preview8
Browse files Browse the repository at this point in the history
Update to 11.0.0-preview8
  • Loading branch information
grokys authored May 11, 2023
2 parents 998f586 + 84545d3 commit 51336cf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<MSBuildEnableWorkloadResolver>false</MSBuildEnableWorkloadResolver>
</PropertyGroup>
<PropertyGroup>
<AvaloniaVersion>11.0.0-preview7</AvaloniaVersion>
<AvaloniaVersion>11.0.0-preview8</AvaloniaVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion build/SharedVersion.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Product>Avalonia.Controls.TreeDataGrid</Product>
<Version>11.0.0-preview7</Version>
<Version>11.0.0-preview8</Version>
<Copyright>Copyright © AvaloniaUI 2022</Copyright>
<Authors>Steven Kirk</Authors>
<Company>AvaloniaUI</Company>
Expand Down
8 changes: 3 additions & 5 deletions samples/TreeDataGridDemo/ViewModels/FilesPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,9 @@ public static IMultiValueConverter FileIconConverter
{
if (s_iconConverter is null)
{
var assetLoader = AvaloniaLocator.Current.GetRequiredService<IAssetLoader>();

using (var fileStream = assetLoader.Open(new Uri("avares://TreeDataGridDemo/Assets/file.png")))
using (var folderStream = assetLoader.Open(new Uri("avares://TreeDataGridDemo/Assets/folder.png")))
using (var folderOpenStream = assetLoader.Open(new Uri("avares://TreeDataGridDemo/Assets/folder-open.png")))
using (var fileStream = AssetLoader.Open(new Uri("avares://TreeDataGridDemo/Assets/file.png")))
using (var folderStream = AssetLoader.Open(new Uri("avares://TreeDataGridDemo/Assets/folder.png")))
using (var folderOpenStream = AssetLoader.Open(new Uri("avares://TreeDataGridDemo/Assets/folder-open.png")))
{
var fileIcon = new Bitmap(fileStream);
var folderIcon = new Bitmap(folderStream);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace Avalonia.Controls.Primitives
{
public abstract class TreeDataGridPresenterBase<TItem> : Border, IPresenter
{
#pragma warning disable AVP1002
public static readonly DirectProperty<TreeDataGridPresenterBase<TItem>, TreeDataGridElementFactory?>
ElementFactoryProperty =
AvaloniaProperty.RegisterDirect<TreeDataGridPresenterBase<TItem>, TreeDataGridElementFactory?>(
Expand All @@ -25,7 +26,7 @@ public abstract class TreeDataGridPresenterBase<TItem> : Border, IPresenter
nameof(Items),
o => o.Items,
(o, v) => o.Items = v);

#pragma warning restore AVP1002
private static readonly Rect s_invalidViewport = new(double.PositiveInfinity, double.PositiveInfinity, 0, 0);
private readonly Action<Control> _recycleElement;
private readonly Action<Control, int> _updateElementIndex;
Expand Down

0 comments on commit 51336cf

Please sign in to comment.