diff --git a/build/Avalonia.Desktop.props b/build/Avalonia.Desktop.props
index e47d26016..35ceb5a04 100644
--- a/build/Avalonia.Desktop.props
+++ b/build/Avalonia.Desktop.props
@@ -1,6 +1,6 @@
-
+
diff --git a/build/Avalonia.Diagnostics.props b/build/Avalonia.Diagnostics.props
index 90095b392..fce0030cd 100644
--- a/build/Avalonia.Diagnostics.props
+++ b/build/Avalonia.Diagnostics.props
@@ -1,6 +1,6 @@
-
+
diff --git a/build/Avalonia.ReactiveUI.props b/build/Avalonia.ReactiveUI.props
index 0b8cfafd4..6625b9d90 100644
--- a/build/Avalonia.ReactiveUI.props
+++ b/build/Avalonia.ReactiveUI.props
@@ -1,6 +1,6 @@
-
+
diff --git a/build/Avalonia.Themes.Fluent.props b/build/Avalonia.Themes.Fluent.props
index c01d7726b..a585479a6 100644
--- a/build/Avalonia.Themes.Fluent.props
+++ b/build/Avalonia.Themes.Fluent.props
@@ -1,6 +1,7 @@
-
+
+
diff --git a/build/Avalonia.Themes.Simple.props b/build/Avalonia.Themes.Simple.props
index f3e05c276..28bd08f0b 100644
--- a/build/Avalonia.Themes.Simple.props
+++ b/build/Avalonia.Themes.Simple.props
@@ -1,6 +1,7 @@
-
+
+
diff --git a/build/Avalonia.Web.props b/build/Avalonia.Web.props
index 88f3229a5..12101b42f 100644
--- a/build/Avalonia.Web.props
+++ b/build/Avalonia.Web.props
@@ -1,6 +1,6 @@
-
+
diff --git a/build/Avalonia.props b/build/Avalonia.props
index f4077509f..cde92f313 100644
--- a/build/Avalonia.props
+++ b/build/Avalonia.props
@@ -1,6 +1,6 @@
-
+
diff --git a/build/Base.props b/build/Base.props
index 8c2547506..66f56e3d4 100644
--- a/build/Base.props
+++ b/build/Base.props
@@ -2,7 +2,7 @@
11.0.0
- preview5
+ preview6
Wiesław Šoltés
Wiesław Šoltés
A docking layout system.
diff --git a/samples/DockMvvmSample/Views/Documents/DocumentView.axaml.cs b/samples/DockMvvmSample/Views/Documents/DocumentView.axaml.cs
index c81bd0311..618d7f4c6 100644
--- a/samples/DockMvvmSample/Views/Documents/DocumentView.axaml.cs
+++ b/samples/DockMvvmSample/Views/Documents/DocumentView.axaml.cs
@@ -3,15 +3,10 @@
namespace DockMvvmSample.Views.Documents;
-public class DocumentView : UserControl
+public partial class DocumentView : UserControl
{
public DocumentView()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
diff --git a/samples/DockMvvmSample/Views/MainView.axaml b/samples/DockMvvmSample/Views/MainView.axaml
index 703e6ea7a..89172e39e 100644
--- a/samples/DockMvvmSample/Views/MainView.axaml
+++ b/samples/DockMvvmSample/Views/MainView.axaml
@@ -10,7 +10,7 @@
mc:Ignorable="d"
d:DesignWidth="1000" d:DesignHeight="550"
x:DataType="vm:MainWindowViewModel" x:CompileBindings="True"
- FontFamily="avares://Avalonia.Themes.Fluent/Assets#Inter">
+ FontFamily="avares://Avalonia.Fonts.Inter/Assets#Inter">
diff --git a/samples/DockMvvmSample/Views/MainView.axaml.cs b/samples/DockMvvmSample/Views/MainView.axaml.cs
index 56e81997b..e3515c181 100644
--- a/samples/DockMvvmSample/Views/MainView.axaml.cs
+++ b/samples/DockMvvmSample/Views/MainView.axaml.cs
@@ -4,7 +4,7 @@
namespace DockMvvmSample.Views;
-public class MainView : UserControl
+public partial class MainView : UserControl
{
public MainView()
{
@@ -12,10 +12,6 @@ public MainView()
InitializeThemes();
InitializeMenu();
}
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
private void InitializeThemes()
{
diff --git a/samples/DockMvvmSample/Views/MainWindow.axaml b/samples/DockMvvmSample/Views/MainWindow.axaml
index a8cf3386e..e6e4049aa 100644
--- a/samples/DockMvvmSample/Views/MainWindow.axaml
+++ b/samples/DockMvvmSample/Views/MainWindow.axaml
@@ -8,7 +8,7 @@
xmlns:views="using:DockMvvmSample.Views"
mc:Ignorable="d"
d:DesignWidth="1200" d:DesignHeight="680"
- x:Name="MainWindow"
+ x:Name="MainWindowView"
UseLayoutRounding="True" RenderOptions.BitmapInterpolationMode="HighQuality"
WindowState="Normal" WindowStartupLocation="CenterScreen"
Background="{x:Null}"
@@ -33,8 +33,8 @@
MaterialOpacity="0.55" />
-
-
+
+
diff --git a/samples/DockMvvmSample/Views/MainWindow.axaml.cs b/samples/DockMvvmSample/Views/MainWindow.axaml.cs
index db67295d6..ae41a9d14 100644
--- a/samples/DockMvvmSample/Views/MainWindow.axaml.cs
+++ b/samples/DockMvvmSample/Views/MainWindow.axaml.cs
@@ -4,7 +4,7 @@
namespace DockMvvmSample.Views;
-public class MainWindow : Window
+public partial class MainWindow : Window
{
public MainWindow()
{
@@ -13,9 +13,4 @@ public MainWindow()
this.AttachDevTools();
#endif
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
diff --git a/samples/DockMvvmSample/Views/ProportionalStackPanelView.axaml.cs b/samples/DockMvvmSample/Views/ProportionalStackPanelView.axaml.cs
index 18c8a10f8..8453cbff0 100644
--- a/samples/DockMvvmSample/Views/ProportionalStackPanelView.axaml.cs
+++ b/samples/DockMvvmSample/Views/ProportionalStackPanelView.axaml.cs
@@ -3,15 +3,10 @@
namespace DockMvvmSample.Views;
-public class ProportionalStackPanelView : UserControl
+public partial class ProportionalStackPanelView : UserControl
{
public ProportionalStackPanelView()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
diff --git a/samples/DockMvvmSample/Views/Tools/Tool1View.axaml.cs b/samples/DockMvvmSample/Views/Tools/Tool1View.axaml.cs
index b9d65e1f5..a9551048e 100644
--- a/samples/DockMvvmSample/Views/Tools/Tool1View.axaml.cs
+++ b/samples/DockMvvmSample/Views/Tools/Tool1View.axaml.cs
@@ -3,15 +3,10 @@
namespace DockMvvmSample.Views.Tools;
-public class Tool1View : UserControl
+public partial class Tool1View : UserControl
{
public Tool1View()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
diff --git a/samples/DockMvvmSample/Views/Tools/Tool2View.axaml.cs b/samples/DockMvvmSample/Views/Tools/Tool2View.axaml.cs
index b42c6d12c..4b0a4e9ba 100644
--- a/samples/DockMvvmSample/Views/Tools/Tool2View.axaml.cs
+++ b/samples/DockMvvmSample/Views/Tools/Tool2View.axaml.cs
@@ -3,15 +3,10 @@
namespace DockMvvmSample.Views.Tools;
-public class Tool2View : UserControl
+public partial class Tool2View : UserControl
{
public Tool2View()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
diff --git a/samples/DockMvvmSample/Views/Tools/Tool3View.axaml.cs b/samples/DockMvvmSample/Views/Tools/Tool3View.axaml.cs
index 9a3589b17..7fa24fe76 100644
--- a/samples/DockMvvmSample/Views/Tools/Tool3View.axaml.cs
+++ b/samples/DockMvvmSample/Views/Tools/Tool3View.axaml.cs
@@ -3,15 +3,10 @@
namespace DockMvvmSample.Views.Tools;
-public class Tool3View : UserControl
+public partial class Tool3View : UserControl
{
public Tool3View()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
diff --git a/samples/DockMvvmSample/Views/Tools/Tool4View.axaml.cs b/samples/DockMvvmSample/Views/Tools/Tool4View.axaml.cs
index ab098499e..1858da5cf 100644
--- a/samples/DockMvvmSample/Views/Tools/Tool4View.axaml.cs
+++ b/samples/DockMvvmSample/Views/Tools/Tool4View.axaml.cs
@@ -3,15 +3,10 @@
namespace DockMvvmSample.Views.Tools;
-public class Tool4View : UserControl
+public partial class Tool4View : UserControl
{
public Tool4View()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
diff --git a/samples/DockMvvmSample/Views/Tools/Tool5View.axaml.cs b/samples/DockMvvmSample/Views/Tools/Tool5View.axaml.cs
index 4cb02e3e5..ad0f84a83 100644
--- a/samples/DockMvvmSample/Views/Tools/Tool5View.axaml.cs
+++ b/samples/DockMvvmSample/Views/Tools/Tool5View.axaml.cs
@@ -3,15 +3,10 @@
namespace DockMvvmSample.Views.Tools;
-public class Tool5View : UserControl
+public partial class Tool5View : UserControl
{
public Tool5View()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
diff --git a/samples/DockMvvmSample/Views/Tools/Tool6View.axaml.cs b/samples/DockMvvmSample/Views/Tools/Tool6View.axaml.cs
index b281412c3..5d7d45b03 100644
--- a/samples/DockMvvmSample/Views/Tools/Tool6View.axaml.cs
+++ b/samples/DockMvvmSample/Views/Tools/Tool6View.axaml.cs
@@ -3,15 +3,10 @@
namespace DockMvvmSample.Views.Tools;
-public class Tool6View : UserControl
+public partial class Tool6View : UserControl
{
public Tool6View()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
diff --git a/samples/DockMvvmSample/Views/Tools/Tool7View.axaml.cs b/samples/DockMvvmSample/Views/Tools/Tool7View.axaml.cs
index c6974bfcd..91ef10a83 100644
--- a/samples/DockMvvmSample/Views/Tools/Tool7View.axaml.cs
+++ b/samples/DockMvvmSample/Views/Tools/Tool7View.axaml.cs
@@ -3,15 +3,10 @@
namespace DockMvvmSample.Views.Tools;
-public class Tool7View : UserControl
+public partial class Tool7View : UserControl
{
public Tool7View()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
diff --git a/samples/DockMvvmSample/Views/Tools/Tool8View.axaml.cs b/samples/DockMvvmSample/Views/Tools/Tool8View.axaml.cs
index 934b61403..1e77489c1 100644
--- a/samples/DockMvvmSample/Views/Tools/Tool8View.axaml.cs
+++ b/samples/DockMvvmSample/Views/Tools/Tool8View.axaml.cs
@@ -3,15 +3,10 @@
namespace DockMvvmSample.Views.Tools;
-public class Tool8View : UserControl
+public partial class Tool8View : UserControl
{
public Tool8View()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
diff --git a/samples/DockMvvmSample/Views/Views/DashboardView.axaml.cs b/samples/DockMvvmSample/Views/Views/DashboardView.axaml.cs
index 15fcd7b51..cf523d0e9 100644
--- a/samples/DockMvvmSample/Views/Views/DashboardView.axaml.cs
+++ b/samples/DockMvvmSample/Views/Views/DashboardView.axaml.cs
@@ -3,15 +3,10 @@
namespace DockMvvmSample.Views.Views;
-public class DashboardView : UserControl
+public partial class DashboardView : UserControl
{
public DashboardView()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
diff --git a/samples/DockMvvmSample/Views/Views/HomeView.axaml.cs b/samples/DockMvvmSample/Views/Views/HomeView.axaml.cs
index bb4ab1456..d980ee0b3 100644
--- a/samples/DockMvvmSample/Views/Views/HomeView.axaml.cs
+++ b/samples/DockMvvmSample/Views/Views/HomeView.axaml.cs
@@ -3,15 +3,10 @@
namespace DockMvvmSample.Views.Views;
-public class HomeView : UserControl
+public partial class HomeView : UserControl
{
public HomeView()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
diff --git a/samples/DockXamlSample/MainView.axaml.cs b/samples/DockXamlSample/MainView.axaml.cs
index b8223a8de..1ce014af4 100644
--- a/samples/DockXamlSample/MainView.axaml.cs
+++ b/samples/DockXamlSample/MainView.axaml.cs
@@ -18,7 +18,7 @@
namespace DockXamlSample;
-public class MainView : UserControl
+public partial class MainView : UserControl
{
private readonly IDockSerializer _serializer;
private readonly IDockState _dockState;
@@ -32,10 +32,9 @@ public MainView()
_dockState = new DockState();
- var dock = this.FindControl("Dock");
- if (dock is { })
+ if (Dock is { })
{
- var layout = dock.Layout;
+ var layout = Dock.Layout;
if (layout is { })
{
_dockState.Save(layout);
@@ -43,11 +42,6 @@ public MainView()
}
}
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
-
private List GetOpenOpenLayoutFileTypes()
{
return new List
@@ -83,7 +77,7 @@ private async Task OpenLayout()
var file = result.FirstOrDefault();
- if (file is not null && file.CanOpenRead)
+ if (file is not null)
{
try
{
@@ -128,7 +122,7 @@ private async Task SaveLayout()
ShowOverwritePrompt = true
});
- if (file is not null && file.CanOpenWrite)
+ if (file is not null)
{
try
{
diff --git a/samples/DockXamlSample/MainWindow.axaml b/samples/DockXamlSample/MainWindow.axaml
index 2e8a16666..43e33d2f4 100644
--- a/samples/DockXamlSample/MainWindow.axaml
+++ b/samples/DockXamlSample/MainWindow.axaml
@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:DockXamlSample"
mc:Ignorable="d"
d:DesignWidth="800" d:DesignHeight="600"
- x:Name="MainWindow"
+ x:Name="MainWindowView"
UseLayoutRounding="True" RenderOptions.BitmapInterpolationMode="HighQuality"
WindowState="Normal" WindowStartupLocation="CenterScreen"
Background="{x:Null}"
@@ -26,8 +26,8 @@
MaterialOpacity="0.55" />
-
-
+
+
diff --git a/samples/DockXamlSample/MainWindow.axaml.cs b/samples/DockXamlSample/MainWindow.axaml.cs
index ee7770350..ea3dc7301 100644
--- a/samples/DockXamlSample/MainWindow.axaml.cs
+++ b/samples/DockXamlSample/MainWindow.axaml.cs
@@ -4,7 +4,7 @@
namespace DockXamlSample;
-public class MainWindow : Window
+public partial class MainWindow : Window
{
public MainWindow()
{
@@ -13,9 +13,4 @@ public MainWindow()
this.AttachDevTools();
#endif
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
diff --git a/samples/Notepad/Views/Documents/FileView.axaml.cs b/samples/Notepad/Views/Documents/FileView.axaml.cs
index c0b6d2e0b..2d967c2a1 100644
--- a/samples/Notepad/Views/Documents/FileView.axaml.cs
+++ b/samples/Notepad/Views/Documents/FileView.axaml.cs
@@ -3,15 +3,10 @@
namespace Notepad.Views.Documents;
-public class FileView : UserControl
+public partial class FileView : UserControl
{
public FileView()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
-}
\ No newline at end of file
+}
diff --git a/samples/Notepad/Views/MainView.axaml.cs b/samples/Notepad/Views/MainView.axaml.cs
index 0d9bda7ee..cda07d3a1 100644
--- a/samples/Notepad/Views/MainView.axaml.cs
+++ b/samples/Notepad/Views/MainView.axaml.cs
@@ -5,7 +5,7 @@
namespace Notepad.Views;
-public class MainView : UserControl
+public partial class MainView : UserControl
{
public MainView()
{
@@ -29,9 +29,4 @@ private void DropHandler(object? sender, DragEventArgs e)
dropTarget.Drop(sender, e);
}
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
-}
\ No newline at end of file
+}
diff --git a/samples/Notepad/Views/MainWindow.axaml b/samples/Notepad/Views/MainWindow.axaml
index 900f29e1a..6c2d36f1b 100644
--- a/samples/Notepad/Views/MainWindow.axaml
+++ b/samples/Notepad/Views/MainWindow.axaml
@@ -8,7 +8,7 @@
xmlns:views="using:Notepad.Views"
mc:Ignorable="d"
d:DesignWidth="900" d:DesignHeight="600"
- x:Name="MainWindow"
+ x:Name="MainWindowView"
UseLayoutRounding="True" RenderOptions.BitmapInterpolationMode="HighQuality"
WindowState="Normal" WindowStartupLocation="CenterScreen"
Foreground="{DynamicResource DockThemeForegroundBrush}"
@@ -21,7 +21,7 @@
-
+
-
+
diff --git a/samples/Notepad/Views/MainWindow.axaml.cs b/samples/Notepad/Views/MainWindow.axaml.cs
index b78178bad..8a23fd71f 100644
--- a/samples/Notepad/Views/MainWindow.axaml.cs
+++ b/samples/Notepad/Views/MainWindow.axaml.cs
@@ -4,7 +4,7 @@
namespace Notepad.Views;
-public class MainWindow : Window
+public partial class MainWindow : Window
{
public MainWindow()
{
@@ -13,9 +13,4 @@ public MainWindow()
this.AttachDevTools();
#endif
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}
diff --git a/samples/Notepad/Views/MenuView.axaml.cs b/samples/Notepad/Views/MenuView.axaml.cs
index c2a0039d9..84b09562d 100644
--- a/samples/Notepad/Views/MenuView.axaml.cs
+++ b/samples/Notepad/Views/MenuView.axaml.cs
@@ -3,15 +3,10 @@
namespace Notepad.Views;
-public class MenuView : UserControl
+public partial class MenuView : UserControl
{
public MenuView()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
-}
\ No newline at end of file
+}
diff --git a/samples/Notepad/Views/Tools/FindView.axaml.cs b/samples/Notepad/Views/Tools/FindView.axaml.cs
index d085ea2bf..f49e8ff99 100644
--- a/samples/Notepad/Views/Tools/FindView.axaml.cs
+++ b/samples/Notepad/Views/Tools/FindView.axaml.cs
@@ -3,15 +3,10 @@
namespace Notepad.Views.Tools;
-public class FindView : UserControl
+public partial class FindView : UserControl
{
public FindView()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
-}
\ No newline at end of file
+}
diff --git a/samples/Notepad/Views/Tools/ReplaceView.axaml.cs b/samples/Notepad/Views/Tools/ReplaceView.axaml.cs
index 16d9da6a9..f53c7677b 100644
--- a/samples/Notepad/Views/Tools/ReplaceView.axaml.cs
+++ b/samples/Notepad/Views/Tools/ReplaceView.axaml.cs
@@ -3,15 +3,10 @@
namespace Notepad.Views.Tools;
-public class ReplaceView : UserControl
+public partial class ReplaceView : UserControl
{
public ReplaceView()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
-}
\ No newline at end of file
+}
diff --git a/src/Dock.Avalonia/Controls/ProportionalStackPanelSplitter.axaml.cs b/src/Dock.Avalonia/Controls/ProportionalStackPanelSplitter.axaml.cs
index f26b31140..270e49473 100644
--- a/src/Dock.Avalonia/Controls/ProportionalStackPanelSplitter.axaml.cs
+++ b/src/Dock.Avalonia/Controls/ProportionalStackPanelSplitter.axaml.cs
@@ -273,7 +273,8 @@ private void UpdateHeightOrWidth()
return null;
}
- var index = panel.Children.IndexOf(Parent);
+ var parent = Parent as Control;
+ var index = parent is null ? -1 :panel.Children.IndexOf(parent);
if (index > 0 && panel.Children.Count > 0)
{
if (panel.Children[index - 1] is ContentPresenter contentPresenter)
diff --git a/src/Dock.Avalonia/Controls/RootDockDebug.axaml.cs b/src/Dock.Avalonia/Controls/RootDockDebug.axaml.cs
index 6e02555f9..1be7b3660 100644
--- a/src/Dock.Avalonia/Controls/RootDockDebug.axaml.cs
+++ b/src/Dock.Avalonia/Controls/RootDockDebug.axaml.cs
@@ -6,7 +6,7 @@ namespace Dock.Avalonia.Controls;
///
///
///
-public class RootDockDebug : UserControl
+public partial class RootDockDebug : UserControl
{
///
///
@@ -15,9 +15,4 @@ public RootDockDebug()
{
InitializeComponent();
}
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
}