Skip to content

Designer's "undo" for resize does not work correctly when there is anchored control #9218

Open

Description

@mocakturk

Environment

Microsoft Visual Studio Professional 2022 (64-bit) - Version 17.6.2

.NET version

.NET 7

Did this work in a previous version of Visual Studio and/or previous .NET release?

I was using .NET framework and Visual Studio 2017. There was no such problem.

Issue description

After clicking undo in designer for undoing a resize of a control, that "resize" is undone correctly. However, another anchored control is not undone correctly.
See the example below. Anchored textbox is not undone correctly.
anchor_undo_issue

Steps to reproduce

Create a Form.
Create a group-box. Add a textbox inside the groupbox. Anchor the textbox to groupbox.
Anchor the groupbox to form.
Then resize the form. Then click "undo". Notice that, textbox is not undone correctly.

Diagnostics

No response

Activity

  1. added
    untriaged
    on Jun 2, 2023
  2. elachlan commented on Jun 3, 2023

    @elachlan
    Contributor

    @Olina-Zhang could your team please test this?

  3. MelonWang1 commented on Jun 5, 2023

    @MelonWang1
    Contributor

    Minimal Reproduction Scenario

    1. Create a .NET Core Winforms core application
    2. Add these controls:
      a groupbox with anchor value: Top, Bottom, Left, Right, resize it
      add a textbox in groupbox1, and set textbox's anchor value: Top, Bottom, Left, Right, Multiline to true, resize it
    3. Resize form designer
    4. Click Undo

    Current Behavior
    Textbox is not undone correctly.

    actual.mp4

    Expected Behavior
    Textbox should undone correctly.

    expected.mp4

    Test Environment
    Version 17.7.0 Preview 3.0 [33803.75.main]

    Have you experienced this same issue with .NET Framework designer?
    No

    Have you experienced this same issue with previous previews of VisualStudio?
    Yes, this issue also repro on VS 16.11.26. The similar issue in design time is 4049.

  4. merriemcgaw commented on Jun 7, 2023

    @merriemcgaw
    Contributor

    Thank you for reporting this issue! We've got an issue in the internal designer repo. When we've addressed the issue we will report back here.

  5. added
    area-VSDesigner
    and removed
    untriaged
    on Jun 7, 2023
  6. added this to the VS release milestone on Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-VSDesigner

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions