Skip to content

Always update floating properties #92

Closed
@scdmitryvodich

Description

Case A. LayoutFloatingWindowControl does not always update floating properties of child elements when its size was changed. Sometimes (like after setting LayoutFloatingWindowControl.SizeToContent property) it's necessary to reset them explicitely.
Steps to reproduce:

  1. Go to MLibTest project.
  2. Replace code in MainWindow.xaml.cs with the code applied [MainWindow.xaml.cs.1.txt].
  3. Compile the project.
  4. Remove AvalonDock.Layout.config file from the application folder.
  5. Run the application.
  6. Undock bottom panel.
  7. Find created AvalonDock.Layout.config in application folder. Please note that FloatingWidth and FloatingHeight stored in configuration file are different from real sizes of these elements and of undocked panel size.

Case B. Currently AvalonDock does not inform application that uses this library about updates of FloatingHeight/FloatingWidth. So, it's not possible to correctly store these properties between sessions and restore them.
Steps to reproduce:

  1. Go to MLibTest project.
  2. Make FloatingWindowContentHost class public (for test simplicity).
  3. Replace code in MainWindow.xaml.cs with the code applied [MainWindow.xaml.cs.2.txt].
  4. Compile the project.
  5. Remove AvalonDock.Layout.config file from the application folder.
  6. Run the application.
  7. Undock bottom panel.
  8. Set focus to Color picker tab.
  9. Change floating window width/height. Please note that FileStats.SizeChanged event is not called and text exception is not thrown.

MainWindow.xaml.cs.1.txt
MainWindow.xaml.cs.2.txt

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions