Skip to content

Commit

Permalink
Merge pull request #134 from microsoft/house-keeping
Browse files Browse the repository at this point in the history
House Keeping
  • Loading branch information
brianlagunas authored Apr 12, 2023
2 parents 09886e6 + 5b5fcfe commit 7497bd2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 32 deletions.
6 changes: 4 additions & 2 deletions Test/UnitTests/BehaviorUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ public override void Fail(string message)
}
#endregion

#if !NETCOREAPP
private TraceListener[] storedListeners;
private DebugTraceListener debugTraceListener;
#endif
private DebugTraceListener debugTraceListener = new DebugTraceListener();

public List<string> Messages
{
Expand Down Expand Up @@ -205,4 +207,4 @@ public void Dispose()

#endregion
}
}
}
10 changes: 8 additions & 2 deletions src/Microsoft.Xaml.Behaviors/Core/ExtendedVisualStateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,7 @@ private static Storyboard ExtractLayoutStoryboard(VisualState state)
/// Subsequent code will check these rectangles both before and after the layout change.
/// </summary>
/// <param name="control">The control whose layout is changing state.</param>
/// <param name="templateRoot">The template root.</param>
/// <param name="layoutStoryboard">The storyboard containing the layout changes.</param>
/// <param name="originalValueRecords">Any previous values from previous state navigations that might be reverted.</param>
/// <param name="movingElements">The set of elements currently in motion, if there is a state change transition ongoing.</param>
Expand Down Expand Up @@ -1014,8 +1015,10 @@ internal static Rect GetLayoutRect(FrameworkElement element)
/// Get the opacities of elements at the time of the state change, instead of visibilities, because the state change may be in process and the current value is the most important.
/// </summary>
/// <param name="control">The control whose state is changing.</param>
/// <param name="templateRoot">The template root.</param>
/// <param name="layoutStoryboard">The storyboard with the layout properties.</param>
/// <param name="originalValueRecords">The set of original values.</param>
/// <param name="movingElements">The elements currently in motion</param>
/// <returns></returns>
private static Dictionary<FrameworkElement, double> GetOldOpacities(FrameworkElement control, FrameworkElement templateRoot, Storyboard layoutStoryboard, List<OriginalLayoutValueRecord> originalValueRecords, List<FrameworkElement> movingElements)
{
Expand Down Expand Up @@ -1078,6 +1081,7 @@ private static Dictionary<FrameworkElement, double> GetOldOpacities(FrameworkEle
/// All values that are overwritten will be stored in the collection of OriginalValueRecords so that they can be replaced later.
/// </summary>
/// <param name="control">The control whose state is changing.</param>
/// <param name="templateRoot">The template root.</param>
/// <param name="layoutStoryboard">The Storyboard holding the layout properties.</param>
/// <param name="originalValueRecords">The store of original values.</param>
[SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling", Justification = "This is done in a single pass for performance reasons.")]
Expand Down Expand Up @@ -1186,6 +1190,8 @@ private static object GetValueFromTimeline(Timeline timeline, out bool gotValue)
/// they do not affect their sibling elements.
/// </summary>
/// <param name="movingElements">The set of elements that will be moving.</param>
/// <param name="oldRects">The old Rect.</param>
/// <param name="newRects">The new Rect.</param>
private static void WrapMovingElementsInCanvases(List<FrameworkElement> movingElements, Dictionary<FrameworkElement, Rect> oldRects, Dictionary<FrameworkElement, Rect> newRects)
{
foreach (FrameworkElement movedElement in movingElements)
Expand Down Expand Up @@ -1286,6 +1292,7 @@ private static void UnwrapMovingElementsFromCanvases(List<FrameworkElement> movi
/// </summary>
/// <param name="source">The source of the layout properties.</param>
/// <param name="target">The destination of the layout properties.</param>
/// <param name="restoring">A flag to indicate if a restore is occuring.</param>
private static void CopyLayoutProperties(FrameworkElement source, FrameworkElement target, bool restoring)
{
WrapperCanvas parentCanvas = (restoring ? source : target) as WrapperCanvas;
Expand Down Expand Up @@ -1339,8 +1346,7 @@ private static void CopyLayoutProperties(FrameworkElement source, FrameworkEleme
/// <summary>
/// Create the actual Storyboard that will be used to animate the transition. Use all previously calculated results.
/// </summary>
/// <param name="duration">The duration of the animation.</param>
/// <param name="ease">The easing function to be used in the animation.</param>
/// <param name="transition">The transition.</param>
/// <param name="movingElements">The set of elements that will be moving.</param>
/// <param name="oldOpacities">The old opacities of the elements whose visibility properties are changing.</param>
/// <returns>The Storyboard.</returns>
Expand Down
24 changes: 1 addition & 23 deletions src/Microsoft.Xaml.Behaviors/Microsoft.Xaml.Behaviors.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,11 @@
<DefineConstants>WPF;$(DefineConstants)</DefineConstants>
<UseWPF>true</UseWPF>
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);TimestampNugetPackage</GenerateNuspecDependsOn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net462|AnyCPU'">
<NoWarn>1701;1702;</NoWarn>
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>

<Import Project="..\Microsoft.Xaml.Behaviors.Signing.targets" />

<ItemGroup Condition="'$(TargetFramework)'=='net462'">
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xaml" />
<Reference Include="System.XML" />
<Reference Include="WindowsBase">
<Private>False</Private>
</Reference>
<Reference Include="PresentationCore">
<Private>False</Private>
</Reference>
<Reference Include="PresentationFramework">
<Private>False</Private>
</Reference>
</ItemGroup>

<ItemGroup>
<Compile Update="ExceptionStringTable.Designer.cs">
<SubType>Code</SubType>
Expand Down Expand Up @@ -73,10 +55,6 @@
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<None Include="packages.config" />
</ItemGroup>

<ItemGroup>
<!-- Install.ps1 is for .NET Framework projects (not .NET Core).
The script removes the reference to the .Design.dll in the referencing project.
Expand Down
5 changes: 0 additions & 5 deletions src/Microsoft.Xaml.Behaviors/packages.config

This file was deleted.

0 comments on commit 7497bd2

Please sign in to comment.