Home Forums WPF controls Xceed Toolkit Plus for WPF Avalondock MVVM select side panel dock

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #41809 |

    Hi,

    I am trying to master the AvalonDock the MVVM way.

    I am experimenting a bit with the example on codeplex

    ( source code -> Version 2 ->
    AvalonDock.MVVMTestApp )

     

    I manage to make my own document and anchorable. But
    in the example they all get docked in the RootPanel.

    What if I want to dock a anchorable in a Side Panel. I
    presume I have to add something to the LayoutItemTemplateSelector but I can not
    figure out what.

    Please some advice.

    Imported from legacy forums. Posted by Rob (had 52 views)

    Fawzi [Xceed]
    Member
    Post count: 722

    Hi Rob,

    To add a LayoutAchorable on a side panel, add a LayoutAnchorSide on the LayoutRoot.XXXSide. ex:

     <avalonDock:LayoutRoot.LeftSide>
                  <avalonDock:LayoutAnchorSide>
                      <avalonDock:LayoutAnchorGroup>
                        <avalonDock:LayoutAnchorable Title=”Agenda”
                                                ContentId=”agenda”>
                            <TextBlock Text=”Agenda Content”
                                      Margin=”10″
                                      FontSize=”18″
                                      FontWeight=”Black”
                                      TextWrapping=”Wrap” />
                        </avalonDock:LayoutAnchorable>
                        <avalonDock:LayoutAnchorable Title=”Contacts”
                                                ContentId=”contacts”>
                            <TextBlock Text=”Contacts Content”
                                      Margin=”10″
                                      FontSize=”18″
                                      FontWeight=”Black”
                                      TextWrapping=”Wrap” />
                        </avalonDock:LayoutAnchorable>
                      </avalonDock:LayoutAnchorGroup>
                  </avalonDock:LayoutAnchorSide>
    </avalonDock:LayoutRoot.LeftSide>

    You can see the complete sample in the Demo App, available here : http://xceed.com/WPF_Toolkit_Demo.html. Look for sample “Others/AvalonDock”.

    Imported from legacy forums. Posted by Fawzi [Xceed] (had 6 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi Fawzi,

    I am still struggling with this.

    I have merged your code in my MainWindow AXML file to add a Soldo window on the left side

    Added a new ViewModel named it SaldoViewModel.

    added a new contentId to my viewmodel and axml file named it Saldo. 

    Changed the code in my WorkSpace File to add the ViewModel to the collection of ToolViewModels. 

    But still my Saldo window shows in the same dock as the info window.

    the whole problem is that the Avalondock is somehow tying the viewmodels to the views and I do not understand how this works. 

    I did add the files with this post as txt files. is it possible you check what I do wrong?

    regards,

    Rob 

     

    Imported from legacy forums. Posted by Rob (had 11 views)

    Fawzi [Xceed]
    Member
    Post count: 722

    Hi Rob,

    We will need a working sample in order to test and view what is wrong. Also, can you tell me what do you mean by “my Saldo window shows in the same dock as the info window”. What is the info Window ? What exactly are you trying to do ?
    Can you send us screenshots showing what is wrong and what you would like with the sample ?

    Imported from legacy forums. Posted by Fawzi [Xceed] (had 17 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.