Skip to content

Commit

Permalink
[Core] Updated UI library to the latest version (Avalonia 0.10.7).
Browse files Browse the repository at this point in the history
If you encounter weird bug, please report it on github
  • Loading branch information
BAndysc committed Aug 23, 2021
1 parent 9d14a47 commit f7674bf
Show file tree
Hide file tree
Showing 21 changed files with 83 additions and 85 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "WoWPacketParser"]
path = WoWPacketParser
url = https://github.com/BAndysc/WoWPacketParser
[submodule "Prism.Avalonia"]
path = Prism.Avalonia
url = https://github.com/BAndysc/Prism.Avalonia
2 changes: 1 addition & 1 deletion Avalonia.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PackageReference Include="Avalonia.ReactiveUI" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="$(AvaloniaVersion)" />
<PackageReference Include="Prism.Avalonia" Version="7.2.0.1430" />
<ProjectReference Include="$(MSBuildThisFileDirectory)\Prism.Avalonia\src\Prism.Avalonia\Prism.Avalonia.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="**\*.xaml.cs">
Expand Down
2 changes: 1 addition & 1 deletion AvaloniaEdit
3 changes: 1 addition & 2 deletions AvaloniaStyles/Controls/ExtendedWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ private void UpdateChromeHints(ExtendedWindowChrome chrome)
}
else
{
ExtendClientAreaChromeHints &= ~ExtendClientAreaChromeHints.SystemChrome;
ExtendClientAreaChromeHints |= ExtendClientAreaChromeHints.NoChrome;
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.NoChrome;
}
}

Expand Down
4 changes: 2 additions & 2 deletions AvaloniaStyles/Controls/GroupingListBox.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ private void SelectIndex(ListBox listbox, int index)
(listbox.ItemContainerGenerator.ContainerFromIndex(listbox.SelectedIndex)).Focus();
}

public static T? FindParent<T>(IVisual obj) where T : Control
public static T? FindParent<T>(IVisual? obj) where T : Control
{
obj = obj.VisualParent;
obj = obj?.VisualParent;
while (obj != null)
{
if (obj is T parent)
Expand Down
5 changes: 4 additions & 1 deletion AvaloniaStyles/Styles/BigSur/Button.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
<Setter Property="Background" Value="{DynamicResource RaisedContentBackground}" />
</Style>

<Style Selector=":is(Button) /template/ ContentPresenter#PART_ContentPresenter">
<Style Selector=":is(Button)">
<Setter Property="CornerRadius" Value="6" />
</Style>

<Style Selector=":is(Button) /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="BoxShadow" Value="{DynamicResource RaisedContent.Shadow}" />
</Style>

Expand Down
7 changes: 2 additions & 5 deletions AvaloniaStyles/Styles/BigSur/TextBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
xmlns:controls1="clr-namespace:AvaloniaStyles.Controls"
xmlns:avaloniaEdit="https://github.com/avaloniaui/avaloniaedit">
<Style Selector="TextBox">
<Setter Property="CornerRadius" Value="0"></Setter>
<Setter Property="Padding" Value="4"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" />
Expand All @@ -24,11 +25,7 @@
<Setter Property="BoxShadow" Value="0 0 0 3 #993B89CD"></Setter>
</Style>

<Style Selector="TextBox /template/ Border#border">
<Setter Property="CornerRadius" Value="0"></Setter>
</Style>

<Style Selector="controls1|ToolBar TextBox /template/ Border">
<Style Selector="controls1|ToolBar TextBox">
<Setter Property="CornerRadius" Value="5"></Setter>
</Style>

Expand Down
34 changes: 18 additions & 16 deletions AvaloniaStyles/Styles/BigSur/Window.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,22 +153,24 @@
<Setter Property="WindowStartupLocation" Value="CenterOwner" />
<Setter Property="Template">
<ControlTemplate>
<Panel>
<Border BorderThickness="0.5"
BorderBrush="#80FFFFFF"
CornerRadius="10"
IsHitTestVisible="False"
Background="{TemplateBinding Background}" />
<StackPanel Name="Main" Orientation="Vertical" Spacing="13" Margin="15" VerticalAlignment="Center" HorizontalAlignment="Stretch">
<ContentPresenter IsHitTestVisible="False"
Content="{TemplateBinding Image}"
Width="54" Height="54"
Margin="0,12,0,12" />
<TextBlock IsHitTestVisible="False" FontWeight="Black" Text="{TemplateBinding Header}" TextWrapping="WrapWithOverflow" HorizontalAlignment="Center"/>
<TextBlock IsHitTestVisible="False" Text="{TemplateBinding Message}" TextWrapping="WrapWithOverflow" HorizontalAlignment="Stretch"/>
<ContentPresenter Content="{TemplateBinding Content}" Name="Buttons" />
</StackPanel>
</Panel>
<VisualLayerManager>
<Panel>
<Border BorderThickness="0.5"
BorderBrush="#80FFFFFF"
CornerRadius="10"
IsHitTestVisible="False"
Background="{TemplateBinding Background}" />
<StackPanel Name="Main" Orientation="Vertical" Spacing="13" Margin="15" VerticalAlignment="Center" HorizontalAlignment="Stretch">
<ContentPresenter IsHitTestVisible="False"
Content="{TemplateBinding Image}"
Width="54" Height="54"
Margin="0,12,0,12" />
<TextBlock IsHitTestVisible="False" FontWeight="Black" Text="{TemplateBinding Header}" TextWrapping="WrapWithOverflow" HorizontalAlignment="Center"/>
<TextBlock IsHitTestVisible="False" Text="{TemplateBinding Message}" TextWrapping="WrapWithOverflow" HorizontalAlignment="Stretch"/>
<ContentPresenter Content="{TemplateBinding Content}" Name="Buttons" />
</StackPanel>
</Panel>
</VisualLayerManager>
</ControlTemplate>
</Setter>
</Style>
Expand Down
2 changes: 1 addition & 1 deletion AvaloniaStyles/Styles/Catalina/Button.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Setter Property="Background" Value="{DynamicResource RaisedContentBackground}" />
</Style>

<Style Selector=":is(Button) /template/ ContentPresenter#PART_ContentPresenter">
<Style Selector=":is(Button)">
<Setter Property="CornerRadius" Value="4" />
</Style>

Expand Down
5 changes: 1 addition & 4 deletions AvaloniaStyles/Styles/Catalina/TextBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
xmlns:controls1="clr-namespace:AvaloniaStyles.Controls"
xmlns:avaloniaEdit="https://github.com/avaloniaui/avaloniaedit">
<Style Selector="TextBox">
<Setter Property="CornerRadius" Value="4" />
<Setter Property="FontSize" Value="13"/>
<Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="BorderThickness" Value="0.5" />
Expand All @@ -22,10 +23,6 @@
<Setter Property="ClipToBounds" Value="False" />
<Setter Property="BoxShadow" Value="0 0 0 3 #83A5E5"></Setter>
</Style>

<Style Selector="TextBox /template/ Border#border">
<Setter Property="CornerRadius" Value="4"></Setter>
</Style>

<Style Selector="TextBox /template/ TextBlock#watermark">
<Setter Property="Foreground" Value="{DynamicResource TextBoxWatermarkForeground}"/>
Expand Down
24 changes: 13 additions & 11 deletions AvaloniaStyles/Styles/Catalina/Window.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,19 @@
<Setter Property="WindowStartupLocation" Value="CenterOwner" />
<Setter Property="Template">
<ControlTemplate>
<Border Background="{TemplateBinding Background}" Padding="15">
<DockPanel LastChildFill="True">
<ContentPresenter Content="{TemplateBinding Image}"
VerticalContentAlignment="Center"
Width="54" Height="54"
Margin="0,0,15,0" />
<ContentPresenter DockPanel.Dock="Bottom" Content="{TemplateBinding Content}" Name="Buttons" HorizontalContentAlignment="Right"/>
<TextBlock Text="{TemplateBinding Header}" TextWrapping="WrapWithOverflow" FontSize="16" DockPanel.Dock="Top" />
<TextBlock Text="{TemplateBinding Message}" TextWrapping="WrapWithOverflow" FontSize="13" />
</DockPanel>
</Border>
<VisualLayerManager>
<Border Background="{TemplateBinding Background}" Padding="15">
<DockPanel LastChildFill="True">
<ContentPresenter Content="{TemplateBinding Image}"
VerticalContentAlignment="Center"
Width="54" Height="54"
Margin="0,0,15,0" />
<ContentPresenter DockPanel.Dock="Bottom" Content="{TemplateBinding Content}" Name="Buttons" HorizontalContentAlignment="Right"/>
<TextBlock Text="{TemplateBinding Header}" TextWrapping="WrapWithOverflow" FontSize="16" DockPanel.Dock="Top" />
<TextBlock Text="{TemplateBinding Message}" TextWrapping="WrapWithOverflow" FontSize="13" />
</DockPanel>
</Border>
</VisualLayerManager>
</ControlTemplate>
</Setter>
</Style>
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<Project>
<PropertyGroup>
<NoWarn>CS0067,CS3021,CS1998,CA1416</NoWarn>
<AvaloniaVersion>0.10.0</AvaloniaVersion>
<AvaloniaVersion>0.10.7</AvaloniaVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion Dock
Submodule Dock updated 80 files
+3 −2 .editorconfig
+1 −0 Dock.sln
+2 −2 README.md
+1 −1 build/Avalonia.Desktop.props
+1 −1 build/Avalonia.Diagnostics.props
+1 −1 build/Avalonia.ReactiveUI.props
+1 −1 build/Avalonia.props
+1 −4 build/Base.props
+21 −0 build/SourceLink.props
+28 −27 samples/AvaloniaDemo/App.axaml
+6 −6 samples/AvaloniaDemo/Themes/DefaultDark.axaml
+6 −6 samples/AvaloniaDemo/Themes/DefaultLight.axaml
+16 −16 samples/AvaloniaDemo/Themes/FluentDark.axaml
+16 −16 samples/AvaloniaDemo/Themes/FluentLight.axaml
+49 −11 samples/AvaloniaDemo/ViewModels/MainWindowViewModel.cs
+7 −7 samples/AvaloniaDemo/Views/Documents/DocumentView.axaml
+83 −82 samples/AvaloniaDemo/Views/MainView.axaml
+18 −18 samples/AvaloniaDemo/Views/MainWindow.axaml
+65 −65 samples/AvaloniaDemo/Views/ProportionalStackPanelView.axaml
+7 −7 samples/AvaloniaDemo/Views/Tools/Tool1View.axaml
+7 −7 samples/AvaloniaDemo/Views/Tools/Tool2View.axaml
+7 −7 samples/AvaloniaDemo/Views/Tools/Tool3View.axaml
+7 −7 samples/AvaloniaDemo/Views/Tools/Tool4View.axaml
+7 −7 samples/AvaloniaDemo/Views/Tools/Tool5View.axaml
+7 −7 samples/AvaloniaDemo/Views/Tools/Tool6View.axaml
+7 −7 samples/AvaloniaDemo/Views/Tools/Tool7View.axaml
+7 −7 samples/AvaloniaDemo/Views/Tools/Tool8View.axaml
+14 −14 samples/AvaloniaDemo/Views/Views/DashboardView.axaml
+4 −4 samples/AvaloniaDemo/Views/Views/HomeView.axaml
+7 −7 samples/Notepad/App.axaml
+25 −25 samples/Notepad/Views/Documents/FileView.axaml
+7 −7 samples/Notepad/Views/MainView.axaml
+15 −15 samples/Notepad/Views/MainWindow.axaml
+37 −37 samples/Notepad/Views/MenuView.axaml
+9 −9 samples/Notepad/Views/Tools/FindView.axaml
+10 −10 samples/Notepad/Views/Tools/ReplaceView.axaml
+103 −118 src/Dock.Avalonia/Controls/DockControl.axaml
+9 −9 src/Dock.Avalonia/Controls/DockPanelSplitter.axaml
+2 −2 src/Dock.Avalonia/Controls/DockPanelSplitter.axaml.cs
+94 −94 src/Dock.Avalonia/Controls/DockTarget.axaml
+12 −3 src/Dock.Avalonia/Controls/DockableControl.cs
+219 −239 src/Dock.Avalonia/Controls/DocumentControl.axaml
+95 −82 src/Dock.Avalonia/Controls/HostWindow.axaml
+108 −81 src/Dock.Avalonia/Controls/HostWindow.axaml.cs
+49 −0 src/Dock.Avalonia/Controls/HostWindowTitleBar.axaml
+26 −0 src/Dock.Avalonia/Controls/HostWindowTitleBar.axaml.cs
+49 −44 src/Dock.Avalonia/Controls/ProportionalStackPanel.cs
+9 −9 src/Dock.Avalonia/Controls/ProportionalStackPanelSplitter.axaml
+3 −3 src/Dock.Avalonia/Controls/ProportionalStackPanelSplitter.axaml.cs
+173 −168 src/Dock.Avalonia/Controls/ToolChromeControl.axaml
+155 −170 src/Dock.Avalonia/Controls/ToolControl.axaml
+67 −0 src/Dock.Avalonia/Controls/ToolPinnedControl.axaml
+11 −0 src/Dock.Avalonia/Controls/ToolPinnedControl.axaml.cs
+70 −0 src/Dock.Avalonia/Converters/DockModeConverter.cs
+1 −0 src/Dock.Avalonia/Dock.Avalonia.csproj
+1 −1 src/Dock.Avalonia/Internal/DockControlState.cs
+29 −27 src/Dock.Avalonia/Themes/DefaultTheme.axaml
+29 −27 src/Dock.Avalonia/Themes/FluentTheme.axaml
+24 −0 src/Dock.Model.ReactiveUI/Controls/DockDock.cs
+9 −0 src/Dock.Model.ReactiveUI/Core/DockBase.cs
+22 −0 src/Dock.Model.ReactiveUI/Core/DockWindow.cs
+1 −0 src/Dock.Model.ReactiveUI/Dock.Model.ReactiveUI.csproj
+3 −0 src/Dock.Model.ReactiveUI/Factory.cs
+16 −0 src/Dock.Model/Controls/IDockDock.cs
+29 −0 src/Dock.Model/Core/DockMode.cs
+24 −0 src/Dock.Model/Core/Events/WindowClosedEventArgs.cs
+29 −0 src/Dock.Model/Core/Events/WindowClosingEventArgs.cs
+29 −0 src/Dock.Model/Core/Events/WindowMoveDragBeginEventArgs.cs
+24 −0 src/Dock.Model/Core/Events/WindowMoveDragEndEventArgs.cs
+24 −0 src/Dock.Model/Core/Events/WindowMoveDragEventArgs.cs
+24 −0 src/Dock.Model/Core/Events/WindowOpenedEventArgs.cs
+5 −0 src/Dock.Model/Core/IDock.cs
+22 −0 src/Dock.Model/Core/IDockWindow.cs
+68 −0 src/Dock.Model/Core/IFactory.Events.cs
+6 −0 src/Dock.Model/Core/IFactory.cs
+1 −0 src/Dock.Model/Dock.Model.csproj
+12 −4 src/Dock.Model/DockManager.cs
+75 −2 src/Dock.Model/FactoryBase.Events.cs
+9 −0 src/Dock.Model/FactoryBase.cs
+10 −0 tests/Dock.Model.ReactiveUI.UnitTests/FactoryTests.cs
1 change: 1 addition & 0 deletions Prism.Avalonia
Submodule Prism.Avalonia added at 37cdcb
6 changes: 3 additions & 3 deletions WDE.Common.Avalonia/DnD/DragAndDrop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ private static void OnTreeViewDrop(object? sender, DragEventArgs e)
if (child == null)
return default;

IVisual parentObject = child.VisualParent;
IVisual? parentObject = child.VisualParent;
if (parentObject == null)
return default;

Expand All @@ -551,7 +551,7 @@ private static void OnTreeViewDrop(object? sender, DragEventArgs e)
if (child == null)
return default;

IVisual parentObject = child.VisualParent;
IVisual? parentObject = child.VisualParent;
if (parentObject == null)
return default;

Expand Down Expand Up @@ -630,7 +630,7 @@ public void Update(TreeView treeView, ITreeItemContainerGenerator itemContainerG
else
{
double y = 0;
IVisual parent = container.VisualParent;
IVisual? parent = container.VisualParent;
while (parent != null && parent != treeView)
{
y += parent.Bounds.Y;
Expand Down
42 changes: 11 additions & 31 deletions WDE.Common.Avalonia/Utils/ViewBind.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using WDE.Common.Windows;

namespace WDE.Common.Avalonia.Utils
Expand Down Expand Up @@ -43,52 +44,31 @@ private static void SetContentProperty(IAvaloniaObject targetLocation, object? v
}
}
}
public class ToolBarBind

public class ToolbarDataTemplate : IDataTemplate
{
public static readonly AvaloniaProperty ModelProperty = AvaloniaProperty.RegisterAttached<Control, object>("Model",
typeof(ToolBarBind),coerce: OnModelChanged);

public static object GetModel(Control control) => control.GetValue(ModelProperty);
public static void SetModel(Control control, object value) => control.SetValue(ModelProperty, value);

public static bool TryResolveToolBar(object viewModel, out object? toolbar)
public static IDataTemplate Template { get; } = new ToolbarDataTemplate();
public IControl Build(object param)
{
toolbar = null;
if (ViewBind.AppViewLocator != null &&
ViewBind.AppViewLocator.TryResolveToolBar(viewModel.GetType(), out var toolbarType))
ViewBind.AppViewLocator.TryResolveToolBar(param.GetType(), out var toolbarType))
{
try
{
toolbar = Activator.CreateInstance(toolbarType);
return (IControl)Activator.CreateInstance(toolbarType)!;
}
catch (Exception e)
{
Console.WriteLine(e);
toolbar = new TextBlock() { Text = e.ToString() };
return new TextBlock() { Text = e.ToString() };
}
}

return toolbar != null;
}

private static object OnModelChanged(IAvaloniaObject targetLocation, object viewModel)
{
if (TryResolveToolBar(viewModel, out var view))
SetContentProperty(targetLocation, view);
else
SetContentProperty(targetLocation, new Panel());

return viewModel;
return new Control();
}

private static void SetContentProperty(IAvaloniaObject targetLocation, object? view)
public bool Match(object data)
{
if (view != null && targetLocation != null)
{
Type? type = targetLocation.GetType();
type.GetProperty("Content")?.SetValue(targetLocation, view);
}
return data is not IControl && data is not string;
}
}
}
12 changes: 12 additions & 0 deletions WoWDatabaseEditor.sln
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WDE.SkyFireMySqlDatabase",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WDE.ProjectSkyFire", "WDE.ProjectSkyFire\WDE.ProjectSkyFire.csproj", "{2B3DFEB9-808F-4EC4-B848-3C2533B40B39}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Prism.Avalonia", "Prism.Avalonia\src\Prism.Avalonia\Prism.Avalonia.csproj", "{B9498EA0-8186-4770-883A-B3CD9B1705BD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Prism.Unity.Avalonia", "Prism.Avalonia\src\Prism.Unity.Avalonia\Prism.Unity.Avalonia.csproj", "{10ACA1B2-02DE-4B04-A151-9087989B6ADE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WDE.SourceCodeIntegrationEditor", "WDE.SourceCodeIntegrationEditor\WDE.SourceCodeIntegrationEditor.csproj", "{B0F1E33D-8CD2-4839-8F87-E8835F5F8D0B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WDE.PacketViewer", "WDE.PacketViewer\WDE.PacketViewer.csproj", "{B421A454-BCA5-4B10-B0BD-BBEB5AAD3294}"
Expand Down Expand Up @@ -477,6 +481,14 @@ Global
{8B25EEAE-2DDD-4D62-A426-619FE21D2711}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8B25EEAE-2DDD-4D62-A426-619FE21D2711}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8B25EEAE-2DDD-4D62-A426-619FE21D2711}.Release|Any CPU.Build.0 = Release|Any CPU
{B9498EA0-8186-4770-883A-B3CD9B1705BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B9498EA0-8186-4770-883A-B3CD9B1705BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B9498EA0-8186-4770-883A-B3CD9B1705BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B9498EA0-8186-4770-883A-B3CD9B1705BD}.Release|Any CPU.Build.0 = Release|Any CPU
{10ACA1B2-02DE-4B04-A151-9087989B6ADE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10ACA1B2-02DE-4B04-A151-9087989B6ADE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10ACA1B2-02DE-4B04-A151-9087989B6ADE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10ACA1B2-02DE-4B04-A151-9087989B6ADE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
6 changes: 4 additions & 2 deletions WoWDatabaseEditorCore.Avalonia/Docking/DockFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ namespace WoWDatabaseEditorCore.Avalonia.Docking
{
public class DockFactory : Factory
{
public override IDocumentDock CreateDocumentDock() => new FocusAwareDocumentDock();
public override IToolDock CreateToolDock() => new FocusAwareToolDock();
public override IDocumentDock CreateDocumentDock() => new FocusAwareDocumentDock() {CanFloat = false};
public override IToolDock CreateToolDock() => new FocusAwareToolDock() {CanFloat = false};

public void AddDocument(IDock layout, AvaloniaDocumentDockWrapper document)
{
Expand All @@ -36,6 +36,7 @@ public void AddTool(IDock layout, AvaloniaToolDockWrapper toolWrapper)
Id = "tool",
Title = "Tools",
Proportion = 0.2f,
CanFloat = false
};
AddDockable(layout, CreateSplitterDockable());
AddDockable(layout, toolDock);
Expand All @@ -55,6 +56,7 @@ public override IRootDock CreateLayout()
Title = "MainLayout",
Proportion = 1,
IsCollapsable = false,
CanFloat = false,
Orientation = Orientation.Horizontal,
ActiveDockable = null,
VisibleDockables = CreateList<IDockable>
Expand Down
2 changes: 1 addition & 1 deletion WoWDatabaseEditorCore.Avalonia/Views/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</controls:ToolbarPanel>
</controls:ToolBar.LeftContent>
<controls:ToolBar.MiddleContent>
<ContentPresenter DataContext="{Binding DocumentManager.ActiveDocument}" utils:ToolBarBind.Model="{Binding}" />
<ContentPresenter DataContext="{Binding DocumentManager.ActiveDocument}" Content="{Binding}" ContentTemplate="{x:Static utils:ToolbarDataTemplate.Template}" />
</controls:ToolBar.MiddleContent>
<controls:ToolBar.RightContent>
<controls:ToolbarPanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</controls:ToolbarPanel>
</controls:ToolBar.LeftContent>
<controls:ToolBar.MiddleContent>
<ContentPresenter DataContext="{Binding DocumentManager.ActiveDocument}" utils:ToolBarBind.Model="{Binding}" />
<ContentPresenter DataContext="{Binding DocumentManager.ActiveDocument}" Content="{Binding}" ContentTemplate="{x:Static utils:ToolbarDataTemplate.Template}" />
</controls:ToolBar.MiddleContent>
</controls:ToolBar>
</controls:ExtendedWindow.ToolBar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
<PackageReference Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersion)" />
<PackageReference Include="Prism.Core" Version="7.2.0.1422" />
<PackageReference Include="Prism.Unity.Avalonia" Version="7.2.0.1430" />
<PackageReference Include="SmartFormat.NET" Version="2.5.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AvaloniaStyles\AvaloniaStyles.csproj" />
<ProjectReference Include="..\Prism.Avalonia\src\Prism.Unity.Avalonia\Prism.Unity.Avalonia.csproj" />
<ProjectReference Include="..\WDE.Common.Avalonia\WDE.Common.Avalonia.csproj" />
<ProjectReference Include="..\WoWDatabaseEditor.Common\WDE.Common\WDE.Common.csproj" />
<ProjectReference Include="..\WoWDatabaseEditor\WoWDatabaseEditorCore.csproj" />
Expand Down

0 comments on commit f7674bf

Please sign in to comment.