Skip to content

Commit

Permalink
Updated to WAS 1.0.0-preview1.
Browse files Browse the repository at this point in the history
  • Loading branch information
azchohfi committed Sep 17, 2021
1 parent 732c8bc commit 6aee9f4
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion scripts/Microsoft.Xaml.Behaviors.WinUI.Managed.nuspec
Expand Up @@ -15,7 +15,7 @@
<tags>Behavior Action Behaviors Actions Blend Managed C# Interaction Interactivity Interactions WinUI</tags>
<dependencies>
<group targetFramework="net5.0-windows10.0.18362.0">
<dependency id="Microsoft.ProjectReunion" version="0.8.0" />
<dependency id="Microsoft.WindowsAppSDK" version="1.0.0-preview1" />
</group>
</dependencies>
</metadata>
Expand Down
8 changes: 8 additions & 0 deletions src/BehaviorsSDKManaged/Directory.Build.targets
@@ -0,0 +1,8 @@
<Project>
<!-- Workaround for https://github.com/microsoft/WindowsAppSDK/issues/1217 -->
<Target Name="FixBinPlaceBootstrapDll" BeforeTargets="BinPlaceBootstrapDll">
<PropertyGroup>
<_WindowsAppSDKFoundationPlatform>x86</_WindowsAppSDKFoundationPlatform>
</PropertyGroup>
</Target>
</Project>
Expand Up @@ -7,9 +7,15 @@ namespace Microsoft.Xaml.Interactions.Core

internal static class ResourceHelper
{
#if NET5_0
private static ResourceLoader strings = new ResourceLoader(ResourceLoader.GetDefaultResourceFilePath(), "Microsoft.Xaml.Interactions/Strings");
#endif

public static string GetString(string resourceName)
{
ResourceLoader strings = ResourceLoader.GetForCurrentView("Microsoft.Xaml.Interactions/Strings");
#if !NET5_0
var strings = ResourceLoader.GetForCurrentView("Microsoft.Xaml.Interactions/Strings");
#endif
return strings.GetString(resourceName);
}

Expand Down
Expand Up @@ -122,7 +122,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.ProjectReunion" Version="0.8.0" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0-preview1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.Xaml.Interactivity.WinUI\Microsoft.Xaml.Interactivity.WinUI.csproj">
Expand Down
Expand Up @@ -30,7 +30,7 @@ public abstract class Behavior : DependencyObject, IBehavior
/// <exception cref="global::System.ArgumentNullException"><paramref name="associatedObject"/> is null.</exception>
public void Attach(DependencyObject associatedObject)
{
if (associatedObject == this.AssociatedObject || Windows.ApplicationModel.DesignMode.DesignModeEnabled)
if (associatedObject == this.AssociatedObject || global::Windows.ApplicationModel.DesignMode.DesignModeEnabled)
{
return;
}
Expand Down
Expand Up @@ -53,7 +53,7 @@ public void Attach(DependencyObject associatedObject)
return;
}

if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
if (global::Windows.ApplicationModel.DesignMode.DesignModeEnabled)
{
return;
}
Expand Down
Expand Up @@ -91,7 +91,7 @@ public static IEnumerable<object> ExecuteActions(object sender, ActionCollection
{
List<object> results = new List<object>();

if (actions == null || Windows.ApplicationModel.DesignMode.DesignModeEnabled)
if (actions == null || global::Windows.ApplicationModel.DesignMode.DesignModeEnabled)
{
return results;
}
Expand Down
Expand Up @@ -6,9 +6,15 @@ namespace Microsoft.Xaml.Interactivity

internal static class ResourceHelper
{
#if NET5_0
private static ResourceLoader strings = new ResourceLoader(ResourceLoader.GetDefaultResourceFilePath(), "Microsoft.Xaml.Interactivity/Strings");
#endif

public static string GetString(string resourceName)
{
#if !NET5_0
ResourceLoader strings = ResourceLoader.GetForCurrentView("Microsoft.Xaml.Interactivity/Strings");
#endif
return strings.GetString(resourceName);
}

Expand Down
Expand Up @@ -118,7 +118,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.ProjectReunion" Version="0.8.0" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0-preview1" />
</ItemGroup>
<ItemGroup>
<PRIResource Include="..\Microsoft.Xaml.Interactivity\Resources\de-DE\Strings.resw">
Expand Down
2 changes: 1 addition & 1 deletion src/BehaviorsSDKManaged/Version/NuGetPackageVersion.props
@@ -1,5 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PackageVersion>2.0.4</PackageVersion>
<PackageVersion>2.0.5</PackageVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/BehaviorsSDKManaged/global.json
@@ -1,7 +1,7 @@
{
"sdk":
{
"version": "5.0.301"
"version": "5.0.401"
},
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "3.0.23"
Expand Down

0 comments on commit 6aee9f4

Please sign in to comment.