You must Sign In to post a response.
  • Category: WPF

    How can we develop Dockable/Expander menu and screen Layout?


    Are you looking for a way to develop Dockable/Expander menu and screen Layout? then read this thread to know more about it



    i want to create a Form with MDI interface, wherein I want my parent form should be divided in two frames.

    1)should contain a dockable vertical menu on the left of the screen,

    2)Container that will hold child window on the right of Menu.

    Container in part-2 should be such that it autofit screen when Menu is toggled.

    Please guide me through the layout I should use and if possible redirect me to the sample application.
  • #757618
    With the help of 'WM_NCMOUSEMOVE' and 'WM_NCLBUTTONDOWN' you can be able to make a dockable controls, see below snippet for more detail
    http://www.codeproject.com/Articles/18812/WPF-Docking-Library

    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #757625
    You can use a DockPanel instead of StackPanel. StackPanel explicitly doesn't care about visible space, whereas DockPanel does all of it's size calculation based on available space.The dock side of an element is defined by the attached property DockPanel.Dock. To dock an element to the center of the panel, it must be the last child of the panel and the LastChildFill property must be set to true.

    <DockPanel LastChildFill="True">
    <Button Content="Dock=Top" DockPanel.Dock="Top"/>
    <Button Content="Dock=Bottom" DockPanel.Dock="Bottom"/>
    <Button Content="Dock=Left"/>
    <Button Content="Dock=Right" DockPanel.Dock="Right"/>
    <Button Content="LastChildFill=True"/>
    </DockPanel>

    If you have Multiple elements on one side--

    <DockPanel LastChildFill="True">
    <Button Content="Dock=Left"/>
    <Button Content="Dock=Left"/>
    <Button Content="Dock=Top" DockPanel.Dock="Top"/>
    <Button Content="Dock=Bottom" DockPanel.Dock="Bottom"/>
    <Button Content="Dock=Right" DockPanel.Dock="Right"/>
    <Button Content="LastChildFill=True"/>
    </DockPanel>

    Refer this link-
    http://www.codeguru.com/csharp/.net/net_asp/article.php/c19435/Working-with-Frames-in-NET.htm


  • Sign In to post your comments