Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
23bde30
Initial Commit of ContentSizer
michael-hawker Jul 30, 2020
78574fb
Remove backing page from ContentSizer samples
michael-hawker Jun 15, 2021
8af0680
init commit
XAML-Knight Dec 30, 2021
935df69
split common code out to new base class
XAML-Knight Jan 5, 2022
612d1b1
Implement appropriate cursor shape
XAML-Knight Jan 5, 2022
696aa7c
stage automation peer class
XAML-Knight Jan 6, 2022
df03fad
add unit test for AutomationPeer
XAML-Knight Jan 6, 2022
49d64b0
changes for test
XAML-Knight Jan 6, 2022
0c2d100
InvertDragDirection
XAML-Knight Jan 12, 2022
a69493c
Remove GripperHoverWrapper
XAML-Knight Jan 13, 2022
5f9e58a
Further refactoring
XAML-Knight Jan 14, 2022
ce0a1ac
Pass unit test
XAML-Knight Jan 15, 2022
765a983
Gripper cursor refactor
XAML-Knight Jan 21, 2022
cfcfc02
Remove local enum
XAML-Knight Jan 20, 2022
d02b539
Removed XAML comment
XAML-Knight Jan 21, 2022
b5dc2e6
Addressing PR concerns
XAML-Knight Jan 26, 2022
a09d597
Updated UI changes
XAML-Knight Jan 31, 2022
ace8309
Address unit test reqs
XAML-Knight Jan 31, 2022
354a501
Refactor keyboard event into base class
XAML-Knight Feb 1, 2022
d5e5baa
Comment for event
XAML-Knight Feb 1, 2022
b85926b
Applying PR changes
XAML-Knight Feb 5, 2022
30689d2
Addressing PR comments
XAML-Knight Feb 8, 2022
30a1aea
Make HorizontalMove and VerticalMove in SplitBase abstract and separa…
michael-hawker Feb 26, 2022
7d74e08
Clean-up ContentSizer example to place ContentSizer outside of Expander.
michael-hawker Feb 26, 2022
96fcfe6
Fix Stylecop spacing for TODO comments
michael-hawker Feb 26, 2022
75889af
Split out TargetControl property to ContentSizer control from SplitBase
michael-hawker Mar 1, 2022
2f8379a
Add note for automation peer for ContentSizer to be generalized later
michael-hawker Mar 1, 2022
b7ff319
Move Sizer based controls under a central folder in the Layout project
michael-hawker Mar 1, 2022
06872ca
Refactor and move more logic for Sizers into SizerBase to share betwe…
michael-hawker Mar 2, 2022
9c4eec2
Centralize an OnLoaded virtual event for Sizer
michael-hawker Mar 2, 2022
2cd1051
Fix keyboard behavior for GridSplitter/ContentSizer for RTL languages
michael-hawker Mar 2, 2022
69e237f
Refactor out some properties and helper methods of SizerBase to their…
michael-hawker Mar 2, 2022
c034c27
Fixes #3949 - SizerBase, GridSplitter, and ContentSizer all use Cumul…
michael-hawker Mar 3, 2022
283d6a1
Add WPF properties `DragIncrement` and `KeyboardIncrement` to our Siz…
michael-hawker Mar 3, 2022
ffd0f29
Rename internal events for SizerBase from GridSplitter
michael-hawker Mar 3, 2022
de44a6a
Add support for IsEnabled in the VSM of SizerBase
michael-hawker Mar 3, 2022
048d2f9
Created OrientationToObjectConverter for SizerBar/GripperBarBase
michael-hawker Mar 4, 2022
893ea02
Change GripperCursor to Cursor on SizerBase/GripperBarBase
michael-hawker Mar 4, 2022
63de628
Clean-up Sizer based samples and move to central directory, remove un…
michael-hawker Mar 4, 2022
449e01d
Add PropertySizer with NavigationView sample
michael-hawker Mar 4, 2022
fdd4d12
Add Minimum and Maximum constraint properties to the PropertySizer co…
michael-hawker Mar 5, 2022
968f1e6
Make Pane open by default of NavigationView in PropertySizer example.
michael-hawker Mar 5, 2022
0ac40ef
Update AutomationPeer naming and types to be generalized (untested st…
michael-hawker Mar 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update AutomationPeer naming and types to be generalized (untested st…
…ill with new base class)
  • Loading branch information
michael-hawker committed Mar 7, 2022
commit 0ac40efffc036f74f89929a2c20db4a90c99d7c1
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Microsoft.Toolkit.Uwp.UI.Automation.Peers;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Automation.Peers;
using Windows.UI.Xaml.Controls;

namespace Microsoft.Toolkit.Uwp.UI.Controls
Expand All @@ -14,13 +11,5 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
/// </summary>
public partial class ContentSizer : SizerBase
{
/// <summary>
/// Creates AutomationPeer (<see cref="UIElement.OnCreateAutomationPeer"/>)
/// </summary>
/// <returns>An automation peer for this <see cref="ContentSizer"/>.</returns>
protected override AutomationPeer OnCreateAutomationPeer()
{
return new ContentSizerAutomationPeer(this);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,27 @@

namespace Microsoft.Toolkit.Uwp.UI.Automation.Peers
{
// TODO: Make this generalize for SizerBase?

/// <summary>
/// Defines a framework element automation peer for the <see cref="ContentSizer"/> control.
/// Defines a framework element automation peer for the <see cref="SizerBase"/> controls.
/// </summary>
public class ContentSizerAutomationPeer : FrameworkElementAutomationPeer
public class SizerAutomationPeer : FrameworkElementAutomationPeer
{
/// <summary>
/// Initializes a new instance of the <see cref="ContentSizerAutomationPeer"/> class.
/// Initializes a new instance of the <see cref="SizerAutomationPeer"/> class.
/// </summary>
/// <param name="owner">
/// The <see cref="ContentSizer" /> that is associated with this <see cref="T:Windows.UI.Xaml.Automation.Peers.ContentSizerAutomationPeer" />.
/// The <see cref="SizerBase" /> that is associated with this <see cref="SizerAutomationPeer" />.
/// </param>
public ContentSizerAutomationPeer(ContentSizer owner)
public SizerAutomationPeer(SizerBase owner)
: base(owner)
{
}

private ContentSizer OwningContentSizer
private SizerBase OwningSizer
{
get
{
return Owner as ContentSizer;
return Owner as SizerBase;
}
}

Expand All @@ -55,13 +53,13 @@ protected override string GetClassNameCore()
/// </returns>
protected override string GetNameCore()
{
string name = AutomationProperties.GetName(this.OwningContentSizer);
string name = AutomationProperties.GetName(this.OwningSizer);
if (!string.IsNullOrEmpty(name))
{
return name;
}

name = this.OwningContentSizer.Name;
name = this.OwningSizer.Name;
if (!string.IsNullOrEmpty(name))
{
return name;
Expand Down
13 changes: 11 additions & 2 deletions Microsoft.Toolkit.Uwp.UI.Controls.Layout/Sizers/SizerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Windows.UI.Core;
using Microsoft.Toolkit.Uwp.UI.Automation.Peers;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Automation.Peers;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Markup;

namespace Microsoft.Toolkit.Uwp.UI.Controls
{
Expand Down Expand Up @@ -75,6 +75,15 @@ public SizerBase()
this.DefaultStyleKey = typeof(SizerBase);
}

/// <summary>
/// Creates AutomationPeer (<see cref="UIElement.OnCreateAutomationPeer"/>)
/// </summary>
/// <returns>An automation peer for this <see cref="SizerBase"/>.</returns>
protected override AutomationPeer OnCreateAutomationPeer()
{
return new SizerAutomationPeer(this);
}

/// <inheritdoc/>
protected override void OnApplyTemplate()
{
Expand Down
2 changes: 1 addition & 1 deletion UnitTests/UnitTests.UWP/UI/Controls/Test_ContentSizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void ShouldConfigureContentSizerAutomationPeer()
const string name = "ContentSizer";

var contentSizer = new ContentSizer();
var contentSizerAutomationPeer = FrameworkElementAutomationPeer.CreatePeerForElement(contentSizer) as ContentSizerAutomationPeer;
var contentSizerAutomationPeer = FrameworkElementAutomationPeer.CreatePeerForElement(contentSizer) as SizerAutomationPeer;

Assert.IsNotNull(contentSizerAutomationPeer, "Verify that the AutomationPeer is ContentSizerAutomationPeer.");

Expand Down