This project has moved. For the latest updates, please go here.

Integration with AvalonDock May be a nice featrue.

Mar 30, 2012 at 12:03 PM
Edited Mar 30, 2012 at 12:23 PM

Hi,

AvalonDock is a nice open source docking toolkit, integration it  WAF will be a nice feature for making modern applications.

Thanks for your framework.

Coordinator
Apr 2, 2012 at 4:07 PM

Thanks a lot for your feedback. At the moment I have not planned to integrate AvalonDock or any other 3rd party component into WAF.

Oct 23, 2012 at 7:49 PM
Edited Oct 24, 2012 at 9:33 AM

Hello!

I have managed to make the BookLibrary controls (views) dockable, using AvalonDock; the only problem I am facing is that when a document (control) is undcoked it looses it's data and displays a blank document but when it is re-docked again it gains back the data and displays them correctly.  I have not been able to figure it out; not sure if it is an issue with WAF or AvalonDock.  I have used AvalonDock on other applications I have written with no problems.  I am happy to send upload/send my code but I don't know how or where to.  Thanks.

Oct 23, 2012 at 8:50 PM

Hi Sabba,

I you can send your code to me(a dot samarian at gmail dot com ). I will look at it.

Asad,

Oct 24, 2012 at 8:03 PM
Edited Oct 24, 2012 at 8:04 PM

Hi Asad,

I will shortly send you my code.

Basically, what I have done is that I added AvalonDock.dll (version 1.3.3600) and AvalonDock.Themes ( version 1.0.0) - downloaded from http://avalondock.codeplex.com/SourceControl/changeset/view/96566 - to the BookLibrary's Presentation project and modified ShellWindow.xaml as follows:

 


 

 

<Window x:Class="Waf.BookLibrary.Library.Presentation.Views.ShellWindow"
...
 xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock"
>
...
 <DockPanel>
...
<ad:DockingManager x:Name="xDockManager" Grid.Row="1">
            <ad:ResizingPanel Orientation="Vertical" ad:ResizingPanel.ResizeHeight="700">
                <ad:ResizingPanel Orientation="Horizontal">
                    <ad:ResizingPanel ad:ResizingPanel.ResizeWidth="700" Orientation="Vertical">
                        <ad:DockablePane SelectedIndex="1" ad:ResizingPanel.ResizeWidth="600">
                        </ad:DockablePane>
                        <ad:DocumentPane>
                            <ad:DocumentContent Name ="AddressBook" Title="{x:Static p:Resources.AddressBook}">
                                <ad:DockableContent x:Name="xPersonListView" Title="{x:Static p:Resources.BookLibrary}" 
                                                        Content="{Binding ShellService.PersonListView}" />
                            </ad:DocumentContent>
                            <ad:DocumentContent Name ="BookLibrary" Title="{x:Static p:Resources.BookLibrary}">
                                <ad:DockableContent x:Name="xBookListView" Title="{x:Static p:Resources.BookLibrary}" 
                                                        Content="{Binding ShellService.BookListView}" />
                            </ad:DocumentContent>
                        </ad:DocumentPane>
                    </ad:ResizingPanel>
                    <ad:ResizingPanel Orientation="Vertical" ad:ResizingPanel.ResizeWidth="300">
                        <ad:DockablePane>
                            <ad:DockableContent x:Name="personViewPresenter" Title="Person View Presenter" 
                                                Content="{Binding ShellService.PersonView}" />
                            <ad:DockableContent x:Name="bookViewPresenter" Title="Book View Presenter" 
                                                Content="{Binding ShellService.BookView}" />
                        </ad:DockablePane>
                    </ad:ResizingPanel>
                    <ad:DocumentPane />
                </ad:ResizingPanel>
            </ad:ResizingPanel>
        </ad:DockingManager>
    </DockPanel>
    
</Window>

 

 


 

Obviously, it needs some tweaking to make it more presentable; but I will try and do that after the problem of un-docking issue, explained above, is resolved.

Any assistance is highly appreciated.

Oct 24, 2012 at 8:11 PM
Edited Oct 24, 2012 at 8:19 PM

 

Oct 24, 2012 at 9:09 PM
Edited Oct 24, 2012 at 9:14 PM

Hi,

It is better you create a public property like this in your view model:

 

 public ObservableCollection<object> DuckViews
        {
            get
            {
                return this.documentViews;
            }
        }

 

and in your view set this property as DocumentsSource .

 

 
 <avalonDock:DockingManager x:Name="dockManager" FontFamily="Tahoma" DocumentsSource="{Binding DocumentViews}" 
.....




in your view model initiate your dock views and add those to the DuckViews property.

Hope this Helps
Asad,

Oct 26, 2012 at 1:45 PM

He Asad,

Many thanks for your reply.

I am not using any extra view models or coding over and above what already exists in the original BookLibrary. I merely changed the ShellWindow.xaml.

I found this http://avalondock.codeplex.com/workitem/15506 which has resolved my problem.

Anyhow, thanks for your time and help; I will try your suggestion in my other applications.

Sabba