wieslawsoltes / dock Goto Github PK
View Code? Open in Web Editor NEWA docking layout system.
Home Page: https://wieslawsoltes.github.io/Dock/
License: MIT License
A docking layout system.
Home Page: https://wieslawsoltes.github.io/Dock/
License: MIT License
How to add the interface of each area dynamically through the code?
Dock/src/Dock.Avalonia/Controls/DebugControl.xaml
Lines 22 to 88 in 665d124
Upgrade Avalonia version?
Dock/src/Dock.Avalonia/DragBehavior.cs
Lines 72 to 79 in 8fdc39b
Hello,
I really like your docking system and successfully integrated it in my program.
I noticed that it crashes when I try to split a tooltab when there is only one tool in the window.
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Arg_ParamName_Name
I have a use case where I may want to use this only for layout.
It would me nice to turn the Docking off, and maybe add a pseudo class so various ui elements like pin buttons are disabled.
Dock/src/Dock.Avalonia/Controls/DockPanelSplitter.cs
Lines 15 to 217 in 094ed31
<StyleInclude Source="avares://Avalonia.Themes.Fluent/Accents/FluentLight.xaml"/>
i tried to build the application by closing this repo
but got the following error:
Controls/DockToolChrome.cs(108,33): error CS0115: 'DockToolChrome.OnPropertyChanged(AvaloniaProperty, Optional, BindingValue, BindingPriority)': no suitable method found to override [/home/triophore/projects/tas/Dock/src/Dock.Avalonia/Dock.Avalonia.csproj]
4 Warning(s)
1 Error(s)
sdk version
.NET Core SDK (3.1.300)
Create one PowerShell for all supported CI servers and local builds.
Tasks:
Proposed API:
IView FindView(IDock dock, Func<IView, bool> predicate);
The .png image width and height should match Image width and height defined in xaml to avoid blurry image resizing.
Original asset image is 32x32, xaml image is 40x40
Original asset image is 13x13, xaml image is 12x12
Original asset image is 13x13, xaml image is 12x12
Original asset image is 13x13, xaml image is 12x12
Thanks for everything you did on github to improve Avalon Studio I will use it to create an IDE if I can help I will be very grateful since I am better at backend.
This is because it wants to binary serialize the data for another app to read in.
We need to either disable the option to drop outside the app (I don't know how or if its possible)
or support some kind of serialization, perhaps we can serialize the type name as utf8 encoded string?
Hi,
I'm working on a app to run cross database sql queries.
I noticed that when I have too many tabs open, the tabs that cannot fit the title bar are moved to the secend line, hidding other controls.
Is this a bug or I'm missing some settings ?
Thanks
Daniel
Hi, has the pin menu in the dock panel been implemented anywhere? I'm not seeing it in the demos. Or do we need to use our own control template to set that up?
(thanks for this project, BTW)
--Andy
Tracking Host window position and size to synve with IDockWindow properties:
didn't understand the example. Can you explain why mainview is needed? I feel that there is one more layer of mainview than vs's dock. What's the difference between main and root?
Update: #164 brings new model for pinned dock, the pinned docks are supported only in IToolDock.
Proposal for pinned views support in Dock control.
IToolDock
interface to controls to be used for pinned views in tool dock.IsExpanded
property to IToolDock
.AutoHide
property to IToolDock
.INPC
, ReactiveUI
and Avalonia
models.IDockable
is pinned, remove it from visibible dockable collection and add to pinned dockables collection.TabStrip
with PinnedDockables
and pinned dockables detail view to ToolControl
.IDockable
is clicked by user remove it from visibible dockable collection and add to pinned dockables collection..TabStrip
and AutoHide
is set to True
it reveals the tool overlaying the central UI and sets IsExpanded
to true
, if cursor is not over the view and AutoHide
is set to true
set IsExpanded
to false
.AutoHide
is set to true
set the AutoHide
to false
and IsExpanded
to true
so the dock no more auto-hides views.I.e. give the user the ID saved in the layout and let the user decide how to activate the instance of that class.
Hi! If I do not want to use MVVM, is there simpler code to use docking?
When using custom namespace like xmlns:ac="clr-namespace:Avalonia.Controls;assembly=Dock.Avalonia"
setting attached property in style setter result in exception.
Dock/src/Dock.Avalonia/Controls/DockControl.xaml
Lines 36 to 41 in ad337eb
<ItemsControl.Styles>
<Style Selector="ItemsControl > ContentPresenter">
<Setter Property="ac:ProportionalStackPanelSplitter.Proportion" Value="{Binding Proportion}"/>
</Style>
</ItemsControl.Styles>
/// <summary>
/// Defines the Proportion attached property.
/// </summary>
public static readonly AttachedProperty<double> ProportionProperty =
AvaloniaProperty.RegisterAttached<ProportionalStackPanelSplitter, IControl, double>("Proportion", double.NaN);
/// <summary>
/// Gets the value of the Proportion attached property on the specified control.
/// </summary>
/// <param name="control">The control.</param>
/// <returns>The Proportion attached property.</returns>
public static double GetProportion(IControl control)
{
return control.GetValue(ProportionProperty);
}
/// <summary>
/// Sets the value of the Proportion attached property on the specified control.
/// </summary>
/// <param name="control">The control.</param>
/// <param name="value">The value of the Dock property.</param>
public static void SetProportion(IControl control, double value)
{
control.SetValue(ProportionProperty, value);
}
Could not convert object 'ac:ProportionalStackPanelSplitter.Proportion' (of type System.String) to {clr-namespace:Avalonia;assembly=Avalonia.Base}AvaloniaProperty: Attached properties not supported.
at Portable.Xaml.XamlObjectWriterInternal.GetCorrectlyTypedValue(XamlMember xm, XamlType xt, Object value) in C:\projects\Avalonia\src\Markup\Avalonia.Markup.Xaml\PortableXaml\portable.xaml.github\src\Portable.Xaml\Portable.Xaml\XamlObjectWriter.cs:line 694
at Portable.Xaml.XamlObjectWriterInternal.StoreAppropriatelyTypedValue(ObjectState state, MemberAndValue ms, Object obj, Object keyObj) in C:\projects\Avalonia\src\Markup\Avalonia.Markup.Xaml\PortableXaml\portable.xaml.github\src\Portable.Xaml\Portable.Xaml\XamlObjectWriter.cs:line 620
at Portable.Xaml.XamlObjectWriterInternal.OnWriteValue(Object value) in C:\projects\Avalonia\src\Markup\Avalonia.Markup.Xaml\PortableXaml\portable.xaml.github\src\Portable.Xaml\Portable.Xaml\XamlObjectWriter.cs:line 573
at Portable.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter) in C:\projects\Avalonia\src\Markup\Avalonia.Markup.Xaml\PortableXaml\portable.xaml.github\src\Portable.Xaml\Portable.Xaml\XamlServices.cs:line 128
at Avalonia.Markup.Xaml.AvaloniaXamlLoader.LoadFromReader(XamlReader reader, AvaloniaXamlContext context, IAmbientProvider parentAmbientProvider) in C:\projects\Avalonia\src\Markup\Avalonia.Markup.Xaml\AvaloniaXamlLoader.cs:line 208
at Avalonia.Markup.Xaml.Templates.TemplateContent.Load() in C:\projects\Avalonia\src\Markup\Avalonia.Markup.Xaml\Templates\TemplateContent.cs:line 35
at Avalonia.Controls.Presenters.ContentPresenter.CreateChild() in C:\projects\Avalonia\src\Avalonia.Controls\Presenters\ContentPresenter.cs:line 305
at Avalonia.Controls.Presenters.ContentPresenter.UpdateChild() in C:\projects\Avalonia\src\Avalonia.Controls\Presenters\ContentPresenter.cs:line 222
at Avalonia.Controls.Presenters.ContentPresenter.ContentChanged(AvaloniaPropertyChangedEventArgs e) in C:\projects\Avalonia\src\Avalonia.Controls\Presenters\ContentPresenter.cs:line 414
at System.Reactive.Observer`1.OnNext(T value)
at Avalonia.AvaloniaObject.RaisePropertyChanged(AvaloniaProperty property, Object oldValue, Object newValue, BindingPriority priority) in C:\projects\Avalonia\src\Avalonia.Base\AvaloniaObject.cs:line 527
at Avalonia.AvaloniaObject.Avalonia.IPriorityValueOwner.Changed(AvaloniaProperty property, Int32 priority, Object oldValue, Object newValue) in C:\projects\Avalonia\src\Avalonia.Base\AvaloniaObject.cs:line 432
at Avalonia.PriorityValue.<>c__DisplayClass27_0.<UpdateCore>b__0() in C:\projects\Avalonia\src\Avalonia.Base\PriorityValue.cs:line 284
at Avalonia.Utilities.DeferredSetter`2.<>c__DisplayClass9_0`1.<SetAndNotify>b__0(Action notification) in C:\projects\Avalonia\src\Avalonia.Base\Utilities\DeferredSetter.cs:line 133
at Avalonia.PriorityValue.UpdateCore(ValueTuple`2 update, ValueTuple`2& backing, Action`1 notify) in C:\projects\Avalonia\src\Avalonia.Base\PriorityValue.cs:line 284
at Avalonia.Utilities.DeferredSetter`2.SetAndNotify[TValue](TProperty property, TValue& backing, SetterDelegate`1 setterCallback, TSetRecord value) in C:\projects\Avalonia\src\Avalonia.Base\Utilities\DeferredSetter.cs:line 129
at Avalonia.PriorityValue.UpdateValue(Object value, Int32 priority) in C:\projects\Avalonia\src\Avalonia.Base\PriorityValue.cs:line 250
at Avalonia.Data.TemplateBinding.Subscribed() in C:\projects\Avalonia\src\Markup\Avalonia.Markup\Data\TemplateBinding.cs:line 112
at Avalonia.Reactive.SingleSubscriberObservableBase`1.Subscribe(IObserver`1 observer) in C:\projects\Avalonia\src\Avalonia.Base\Reactive\SingleSubscriberObservableBase.cs:line 36
at Avalonia.PriorityBindingEntry.Start(IObservable`1 binding) in C:\projects\Avalonia\src\Avalonia.Base\PriorityBindingEntry.cs:line 83
at Avalonia.PriorityLevel.Add(IObservable`1 binding) in C:\projects\Avalonia\src\Avalonia.Base\PriorityLevel.cs:line 114
at Avalonia.ValueStore.AddBinding(AvaloniaProperty property, IObservable`1 source, BindingPriority priority) in C:\projects\Avalonia\src\Avalonia.Base\ValueStore.cs:line 42
at Avalonia.AvaloniaObjectExtensions.Bind(IAvaloniaObject target, AvaloniaProperty property, IBinding binding, Object anchor) in C:\projects\Avalonia\src\Avalonia.Base\AvaloniaObjectExtensions.cs:line 170
at Avalonia.Markup.Data.DelayedBinding.BindingEntry.Apply(IStyledElement control) in C:\projects\Avalonia\src\Markup\Avalonia.Markup\Markup\Data\DelayedBinding.cs:line 132
at Avalonia.Markup.Data.DelayedBinding.ApplyBindings(IStyledElement control) in C:\projects\Avalonia\src\Markup\Avalonia.Markup\Markup\Data\DelayedBinding.cs:line 97
at Avalonia.Markup.Data.DelayedBinding.ApplyBindings(Object sender, EventArgs e) in C:\projects\Avalonia\src\Markup\Avalonia.Markup\Markup\Data\DelayedBinding.cs:line 110
at Avalonia.Visual.SetVisualParent(Visual value) in C:\projects\Avalonia\src\Avalonia.Visuals\Visual.cs:line 531
at Avalonia.Visual.VisualChildrenChanged(Object sender, NotifyCollectionChangedEventArgs e) in C:\projects\Avalonia\src\Avalonia.Visuals\Visual.cs:line 544
at Avalonia.Collections.AvaloniaList`1.NotifyAdd(IList t, Int32 index) in C:\projects\Avalonia\src\Avalonia.Base\Collections\AvaloniaList.cs:line 506
at Avalonia.Controls.Primitives.TemplatedControl.ApplyTemplate() in C:\projects\Avalonia\src\Avalonia.Controls\Primitives\TemplatedControl.cs:line 268
at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in C:\projects\Avalonia\src\Avalonia.Layout\Layoutable.cs:line 470
at Avalonia.Layout.Layoutable.Measure(Size availableSize) in C:\projects\Avalonia\src\Avalonia.Layout\Layoutable.cs:line 318
at Avalonia.Controls.Grid.MeasureOverride(Size constraint) in C:\projects\Avalonia\src\Avalonia.Controls\Grid.cs:line 214
at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in C:\projects\Avalonia\src\Avalonia.Layout\Layoutable.cs:line 475
at Avalonia.Layout.Layoutable.Measure(Size availableSize) in C:\projects\Avalonia\src\Avalonia.Layout\Layoutable.cs:line 318
at Avalonia.Layout.LayoutHelper.MeasureChild(ILayoutable control, Size availableSize, Thickness padding) in C:\projects\Avalonia\src\Avalonia.Layout\LayoutHelper.cs:line 44
at Avalonia.Controls.Presenters.ContentPresenter.MeasureOverride(Size availableSize) in C:\projects\Avalonia\src\Avalonia.Controls\Presenters\ContentPresenter.cs:line 325
at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in C:\projects\Avalonia\src\Avalonia.Layout\Layoutable.cs:line 475
at Avalonia.Layout.Layoutable.Measure(Size availableSize) in C:\projects\Avalonia\src\Avalonia.Layout\Layoutable.cs:line 318
at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize) in C:\projects\Avalonia\src\Avalonia.Layout\Layoutable.cs:line 524
at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in C:\projects\Avalonia\src\Avalonia.Layout\Layoutable.cs:line 475
at Avalonia.Layout.Layoutable.Measure(Size availableSize) in C:\projects\Avalonia\src\Avalonia.Layout\Layoutable.cs:line 318
at Avalonia.Layout.LayoutManager.Measure(ILayoutable control) in C:\projects\Avalonia\src\Avalonia.Layout\LayoutManager.cs:line 173
at Avalonia.Layout.LayoutManager.ExecuteMeasurePass() in C:\projects\Avalonia\src\Avalonia.Layout\LayoutManager.cs:line 124
at Avalonia.Layout.LayoutManager.ExecuteLayoutPass() in C:\projects\Avalonia\src\Avalonia.Layout\LayoutManager.cs:line 89
at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority) in C:\projects\Avalonia\src\Avalonia.Base\Threading\JobRunner.cs:line 70
at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in C:\projects\Avalonia\src\Avalonia.Base\Threading\Dispatcher.cs:line 65
at Avalonia.Application.Run(Window mainWindow) in C:\projects\Avalonia\src\Avalonia.Controls\Application.cs:line 236
at AvaloniaDemo.Program.Main(String[] args) in C:\DOWNLOADS\GitHub\Dock\samples\AvaloniaDemo\Program.cs:line 46
I try to give a new hostwindow automatically the size the original had.
I tried overriding the HostWindow and manually change the bounds but with no luck.
As you can see in the gif my window is also not drawn correctly as its contents are bigger than the window itself (Only happens on windows so most likely avalonia issue).
I wonder if this is expected behavior. When someone creates multiple root dock in one tree (not side by side, like in perspectives demo). He will have 2 active dockables, one for outer dock, and one for inner dock.
Issue can be checked there (AvaloniaDemo.csproj):
https://github.com/ShadowDancer/Dock/tree/repro/multiple_root_docks
On the screenshoot you can see that there are 2 selected tool windows.
I updated to your newest version to try the new fix.
I also use the latest Avalonia nightly now, since you named it 0.9.0 .
The default theme does not load for me since updating avalonia.
I load it like this:
<StyleInclude Source="avares://Dock.Avalonia.Themes.Default/DefaultTheme.xaml"/>
and I get this error while loading:
System.TypeLoadException: Could not load type 'Portable.Xaml.IRootObjectProvider' from assembly 'Avalonia.Markup.Xaml, Version=0.8.999.0, Culture=neutral, PublicKeyToken=null'.
at Dock.Avalonia.Themes.Default.DefaultTheme.!XamlIlPopulate(IServiceProvider , DefaultTheme )
at CompiledAvaloniaXaml.!XamlLoader.TryLoad(String )
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Avalonia.Markup.Xaml.AvaloniaXamlLoader.Load(Uri uri, Uri baseUri) in D:\a\1\s\src\Markup\Avalonia.Markup.Xaml\AvaloniaXamlLoader.cs:line 58
at Avalonia.Markup.Xaml.Styling.StyleInclude.get_Loaded() in D:\a\1\s\src\Markup\Avalonia.Markup.Xaml\Styling\StyleInclude.cs:line 54
at Avalonia.Markup.Xaml.Styling.StyleInclude.Avalonia.Styling.ISetStyleParent.NotifyResourcesChanged(ResourcesChangedEventArgs e) in D:\a\1\s\src\Markup\Avalonia.Markup.Xaml\Styling\StyleInclude.cs:line 94
at Avalonia.Styling.Styles.<.ctor>b__4_0(IStyle x) in D:\a\1\s\src\Avalonia.Styling\Styling\Styles.cs:line 36
at Avalonia.Collections.AvaloniaListExtensions.<>c__DisplayClass1_0`1.<ForEachItem>g__Add|0(Int32 index, IList items) in D:\a\1\s\src\Avalonia.Base\Collections\AvaloniaListExtensions.cs:line 82
at Avalonia.Collections.AvaloniaList`1.NotifyAdd(IList t, Int32 index) in D:\a\1\s\src\Avalonia.Base\Collections\AvaloniaList.cs:line 505
at VHDPlus.App.!XamlIlPopulate(IServiceProvider , App ) in C:\Users\HendrikMennen\source\repos\VHDP\VHDPlus\App.xaml:line 54
at VHDPlus.App.!XamlIlPopulateTrampoline(App )
at VHDPlus.App.Initialize() in C:\Users\HendrikMennen\source\repos\VHDP\VHDPlus\App.xaml.cs:line 25
at Avalonia.Controls.AppBuilderBase`1.Setup() in D:\a\1\s\src\Avalonia.Controls\AppBuilderBase.cs:line 273
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in D:\a\1\s\src\Avalonia.Controls\ApplicationLifetimes\ClassicDesktopStyleApplicationLifetime.cs:line 129
at VHDPlus.Program.Main(String[] args) in C:\Users\HendrikMennen\source\repos\VHDP\VHDPlus\Program.cs:line 68
Do you know what could cause this? If I try without default theme it does not crash, but everything from the dock is invisible.
IDockFactory and IView don't exist when using the namespaces..
using Dock.Model;
using ReactiveUI;
public class ViewModelMainWindow : ViewModelBase
{
private Dock.Model.IDockFactory _factory;
private Dock.Model.IView _layout;
private string _currentView;
public IDockFactory Factory
{
get => _factory;
set => this.RaiseAndSetIfChanged(ref _factory, value);
}
public IView Layout
{
get => _layout;
set => this.RaiseAndSetIfChanged(ref _layout, value);
}
public string CurrentView
{
get => _currentView;
set => this.RaiseAndSetIfChanged(ref _currentView, value);
}
}```
<!-- Copyright (c) Wiesław Šoltés. All rights reserved. -->
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:id="clr-namespace:Dock.Avalonia;assembly=Dock.Avalonia"
xmlns:idc="clr-namespace:Dock.Avalonia.Controls;assembly=Dock.Avalonia"
xmlns:converters="clr-namespace:Dock.Avalonia.Converters;assembly=Dock.Avalonia"
xmlns:Dock="clr-namespace:Dock.Model;assembly=Dock.Model"
xmlns:Controls="clr-namespace:Dock.Model.Controls;assembly=Dock.Model">
<Style Selector="idc|DockControl">
<Style.Resources>
<converters:OrientationConverter x:Key="OrientationConverter"/>
<converters:AlignmentConverter x:Key="AlignmentConverter"/>
</Style.Resources>
<Setter Property="Template">
<ControlTemplate>
<ContentControl Content="{TemplateBinding Layout}">
<ContentControl.DataTemplates>
<DataTemplate DataType="Controls:ISplitterDock">
<idc:ProportionalStackPanelSplitter>
<idc:ProportionalStackPanelSplitter.Styles>
<Style Selector="idc|ProportionalStackPanelSplitter">
<Setter Property="Background" Value="Transparent"/>
</Style>
</idc:ProportionalStackPanelSplitter.Styles>
</idc:ProportionalStackPanelSplitter>
</DataTemplate>
<DataTemplate DataType="Controls:IDocumentDock">
<idc:DocumentControl>
<idc:DocumentControl.Styles>
<Style Selector="idc|DocumentControl">
<Setter Property="idc:ProportionalStackPanelSplitter.Proportion" Value="{Binding Proportion}"/>
</Style>
</idc:DocumentControl.Styles>
</idc:DocumentControl>
</DataTemplate>
<DataTemplate DataType="Controls:IToolDock">
<idc:DockToolChrome IsActive="{Binding IsActive}">
<idc:DockToolChrome.Styles>
<Style Selector="idc|DockToolChrome">
<Setter Property="idc:ProportionalStackPanelSplitter.Proportion" Value="{Binding Proportion}"/>
</Style>
</idc:DockToolChrome.Styles>
<idc:ToolControl/>
</idc:DockToolChrome>
</DataTemplate>
<DataTemplate DataType="Controls:IProportionalDock">
<ItemsControl Items="{Binding VisibleDockables}">
<ItemsControl.Styles>
<Style Selector="ItemsControl">
<Setter Property="idc:ProportionalStackPanelSplitter.Proportion" Value="{Binding Proportion}"/>
</Style>
</ItemsControl.Styles>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<idc:ProportionalStackPanel Name="DropProportional">
<idc:ProportionalStackPanel.Styles>
<Style Selector="idc|ProportionalStackPanel">
<Setter Property="id:DockProperties.IsDropArea" Value="True" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Orientation" Value="{Binding Orientation, Converter={StaticResource OrientationConverter}}" />
</Style>
</idc:ProportionalStackPanel.Styles>
</idc:ProportionalStackPanel>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</DataTemplate>
<DataTemplate DataType="Controls:IPinDock">
<DockPanel Name="DropPin">
<DockPanel.Styles>
<Style Selector="DockPanel">
<Setter Property="id:DockProperties.IsDropArea" Value="True"/>
<Setter Property="Background" Value="Transparent"/>
</Style>
</DockPanel.Styles>
<TabStrip Items="{Binding VisibleDockables}" SelectedItem="{Binding AvtiveDockable, Mode=TwoWay}">
<TabStrip.Styles>
<Style Selector="TabStrip">
<Setter Property="Focusable" Value="False" />
<Setter Property="ClipToBounds" Value="False" />
<Setter Property="DockPanel.Dock" Value="{Binding Alignment, Converter={StaticResource AlignmentConverter}}" />
</Style>
<Style Selector="TabStrip:empty">
<Setter Property="IsVisible" Value="False" />
</Style>
<Style Selector="TabStrip /template/ ItemsPresenter#PART_ItemsPresenter > WrapPanel">
<Setter Property="Orientation" Value="Vertical"/>
</Style>
</TabStrip.Styles>
<TabStrip.DataTemplates>
<DataTemplate DataType="Dock:IDockable">
<StackPanel Name="DragPin">
<StackPanel.Styles>
<Style Selector="StackPanel">
<Setter Property="id:DockProperties.IsDragArea" Value="True"/>
<Setter Property="id:DockProperties.IsDropArea" Value="True"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Orientation" Value="Horizontal"/>
<Setter Property="Spacing" Value="2"/>
</Style>
</StackPanel.Styles>
<TextBlock Text="{Binding Title}" Classes="drag" Margin="2" />
</StackPanel>
</DataTemplate>
</TabStrip.DataTemplates>
</TabStrip>
<ContentControl Content="{Binding AvtiveDockable}" IsVisible="{Binding IsExpanded}"/>
</DockPanel>
</DataTemplate>
<DataTemplate DataType="Controls:IRootDock">
<DockPanel Name="DropRoot">
<DockPanel.Styles>
<Style Selector="DockPanel">
<Setter Property="id:DockProperties.IsDropArea" Value="True"/>
<Setter Property="Background" Value="Transparent"/>
</Style>
</DockPanel.Styles>
<ContentControl Content="{Binding Top}" DockPanel.Dock="Top"/>
<ContentControl Content="{Binding Bottom}" DockPanel.Dock="Bottom"/>
<ContentControl Content="{Binding Left}" DockPanel.Dock="Left"/>
<ContentControl Content="{Binding Right}" DockPanel.Dock="Right"/>
<Carousel Items="{Binding VisibleDockables}" SelectedItem="{Binding AvtiveDockable, Mode=TwoWay}" IsVirtualized="False"/>
</DockPanel>
</DataTemplate>
</ContentControl.DataTemplates>
</ContentControl>
</ControlTemplate>
</Setter>
</Style>
</Styles>
When you drag a document or tool to a floating window, the item gets resized to its minimum or to fit inside new window.
It should hold its size, and the window be created big enough to contain it.
Hi,
we will use Avalonia on a .NetCore 3.1 application to get our software running on multiplatforms.
Does this framework also work on mutliplatforms, like MacOS or Linux ?
Br
Markus
Collapsing the splitters does not work if a tool is dropped into a new window.
The resulting splitter that is left can crash the application if you accidently use it.
I tried to fix it myself but I was not sucessfull without messing up the entire code structure.
However the problem currently is that the line:
RemoveDockable(dockable, true);
(Factorybase. line 723)
passes a tooldock that has children.
RemoveDockable calles Collapse() but that does not work if it has children.
if (dock.IsCollapsable && dock.VisibleDockables.Count == 0)
I think we can use this pattern:
https://github.com/AvaloniaUI/Avalonia/pull/2777/files#diff-fc612e8a5a5f1b90798b9431662b51e1R20
either that or some kind of DataTemplate?
Probably metro window shouldnt be part of this project, and user should be able to configure it or another one?
Visual studio has 2 scenarios:
I may need your help. I have integrated the ribbon sample and the dock sample, but the dock can't drag the layout. I haven't checked out the problem. Can you help me?
Done.
Done.
Done.
Dock/src/Dock.Avalonia.Themes.Default/NavigationControl.xaml
Lines 9 to 11 in 652d4c4
Dock/src/Dock.Avalonia.Themes.Default/NavigationControl.xaml
Lines 13 to 15 in 652d4c4
Done.
Done.
Preferably to use the MVVM template as starting point.
This should be in sync with yet to be finished wiki tutorial.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.