Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: 4OTbIPE/imageex
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: release
Choose a base ref
...
head repository: CollapseLauncher/ImageEx
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 7 commits
  • 12 files changed
  • 2 contributors

Commits on Sep 8, 2024

  1. Revert "3.0.0 release"

    This reverts commit d7a58bb.
    bagusnl committed Sep 8, 2024
    Copy the full SHA
    2f1185e View commit details
  2. Adjust project properties

    bagusnl committed Sep 8, 2024
    Copy the full SHA
    f457d12 View commit details

Commits on Sep 12, 2024

  1. Copy the full SHA
    754f03a View commit details

Commits on Sep 14, 2024

  1. CodeQA

    bagusnl committed Sep 14, 2024
    Copy the full SHA
    d0959d9 View commit details
  2. Fixed crashing

    it expects bad path i guess...
    bagusnl committed Sep 14, 2024
    Copy the full SHA
    7a59e31 View commit details

Commits on Sep 15, 2024

  1. Remove stray debug line

    bagusnl committed Sep 15, 2024
    Copy the full SHA
    d933d0c View commit details

Commits on Sep 16, 2024

  1. Copy the full SHA
    84a9ecb View commit details
4 changes: 2 additions & 2 deletions ImageEx/DependencyObjectExtensions.cs
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@ public static class DependencyObjectExtensions
/// Find all ascendant elements of the specified element. This method can be chained with
/// LINQ calls to add additional filters or projections on top of the returned results.
/// <para>
/// This method is meant to provide extra flexibility in specific scenarios and it should not
/// This method is meant to provide extra flexibility in specific scenarios, and it should not
/// be used when only the first item is being looked for. In those cases, use one of the
/// available <see cref="FindAscendant{T}(DependencyObject)"/> overloads instead, which will
/// available <see cref="FindAscendant"/> overloads instead, which will
/// offer a more compact syntax as well as better performance in those cases.
/// </para>
/// </summary>
66 changes: 40 additions & 26 deletions ImageEx/ImageEx.Members.cs
Original file line number Diff line number Diff line change
@@ -2,40 +2,54 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace ImageEx;
using Microsoft.UI.Composition;

/// <summary>
/// The ImageEx control extends the default Image platform control improving the performance and responsiveness of your Apps.
/// Source images are downloaded asynchronously showing a load indicator while in progress.
/// Once downloaded, the source image is stored in the App local cache to preserve resources and load time next time the image needs to be displayed.
/// </summary>
public partial class ImageEx
namespace ImageEx
{
/// <summary>
/// Identifies the <see cref="NineGrid"/> dependency property.
/// The ImageEx control extends the default Image platform control improving the performance and responsiveness of your Apps.
/// Source images are downloaded asynchronously showing a load indicator while in progress.
/// Once downloaded, the source image is stored in the App local cache to preserve resources and load time next time the image needs to be displayed.
/// </summary>
public static readonly DependencyProperty NineGridProperty = DependencyProperty.Register(nameof(NineGrid), typeof(Thickness), typeof(ImageEx), new PropertyMetadata(default(Thickness)));

/// <summary>
/// Gets or sets the nine-grid used by the image.
/// </summary>
public Thickness NineGrid
public partial class ImageEx
{
get { return (Thickness)GetValue(NineGridProperty); }
set { SetValue(NineGridProperty, value); }
}
/// <summary>
/// Identifies the <see cref="NineGrid"/> dependency property.
/// </summary>
public static readonly DependencyProperty NineGridProperty = DependencyProperty.Register(nameof(NineGrid), typeof(Thickness), typeof(ImageEx), new PropertyMetadata(default(Thickness)));

/// <summary>
/// Returns the image as a <see cref="CastingSource"/>.
/// </summary>
/// <returns>The image as a <see cref="CastingSource"/>.</returns>
public CastingSource GetAsCastingSource()
{
if (IsInitialized && Image is Image image)
/// <summary>
/// Gets or sets the nine-grid used by the image.
/// </summary>
public Thickness NineGrid
{
return image.GetAsCastingSource();
get { return (Thickness)GetValue(NineGridProperty); }
set { SetValue(NineGridProperty, value); }
}

return null;
/// <inheritdoc/>
public override CompositionBrush GetAlphaMask()
{
if (IsInitialized && Image is Image image)
{
return image.GetAlphaMask();
}

return null;
}

/// <summary>
/// Returns the image as a <see cref="CastingSource"/>.
/// </summary>
/// <returns>The image as a <see cref="CastingSource"/>.</returns>
public CastingSource GetAsCastingSource()
{
if (IsInitialized && Image is Image image)
{
return image.GetAsCastingSource();
}

return null;
}
}
}
23 changes: 13 additions & 10 deletions ImageEx/ImageEx.cs
Original file line number Diff line number Diff line change
@@ -2,20 +2,23 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace ImageEx;
using System.Diagnostics;

/// <summary>
/// The ImageEx control extends the default Image platform control improving the performance and responsiveness of your Apps.
/// Source images are downloaded asynchronously showing a load indicator while in progress.
/// Once downloaded, the source image is stored in the App local cache to preserve resources and load time next time the image needs to be displayed.
/// </summary>
public partial class ImageEx : ImageExBase
namespace ImageEx
{
/// <summary>
/// Initializes a new instance of the <see cref="ImageEx"/> class.
/// The ImageEx control extends the default Image platform control improving the performance and responsiveness of your Apps.
/// Source images are downloaded asynchronously showing a load indicator while in progress.
/// Once downloaded, the source image is stored in the App local cache to preserve resources and load time next time the image needs to be displayed.
/// </summary>
public ImageEx() : base()
public partial class ImageEx : ImageExBase
{
DefaultStyleKey = typeof(ImageEx);
/// <summary>
/// Initializes a new instance of the <see cref="ImageEx"/> class.
/// </summary>
public ImageEx()
{
DefaultStyleKey = typeof(ImageEx);
}
}
}
43 changes: 25 additions & 18 deletions ImageEx/ImageEx.csproj
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>uap10.0.22621;net8.0-windows10.0.22621</TargetFrameworks>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<!-- Platform Properties -->
<Platforms>x64</Platforms>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<WindowsSdkPackageVersion>10.0.22621.41</WindowsSdkPackageVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<EnableMsixTooling>true</EnableMsixTooling>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<LangVersion>12.0</LangVersion>
<NoWarn>NETSDK1023;CA1416</NoWarn>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<DebugType>embedded</DebugType>
</PropertyGroup>
<!-- Assembly Info Properties-->
<AssemblyTitle>ImageEx</AssemblyTitle>
<Product>ImageEx</Product>
<PackageId>ImageEx</PackageId>
<Version>3.0.0</Version>
<Description>Extended Image Control for UWP and WinUI apps. Originally developed for WCT, initially desynced by 4OTbIPE, forked by CollapseLauncher project to maintain its codebase.</Description>
<Authors>Byklex, WindowsCommunityToolkit, FourSoft (@4OTbIPE), CollapseLauncher</Authors>
<Copyright>Copyright 2023-2024</Copyright>
<PackageProjectUrl>https://github.com/CollapseLauncher/ImageEx</PackageProjectUrl>
</PropertyGroup>

<PropertyGroup Condition="$(TargetFramework.Contains('net8.0'))">
<IsAotCompatible>true</IsAotCompatible>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<IsAotCompatible>true</IsAotCompatible>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
</PropertyGroup>

<ItemGroup Condition="$(TargetFramework.Contains('windows'))">
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.Contains('uap'))">
<Page Include="ImageEx.xaml" />
<Page Include="Themes\Generic.xaml" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240829007" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.Contains('uap'))">
<None Remove="ImageEx.xaml" />
<None Remove="Themes\Generic.xaml" />

<ItemGroup>
<PackageReference Include="CommunityToolkit.WinUI.Extensions" Version="8.1.240821" />
</ItemGroup>

</Project>
Loading