toolwindow size

Docking/MDI for WPF Forum

Posted 10 years ago by Willie
Version: 4.5.0486
Avatar
Hi,
I want to display a toolwindow besides an tabbed mdi area. The toolwindow has a fixed size.
If i start the application i see a toolwindow and besides that a larger empty area before the mdi area starts???
Do I need to set a different width to tell the splitcontainer to move?

<docking:DockSite Name="MainDockSite" >
 <docking:SplitContainer >

  <docking:ToolWindowContainer Width="60" HorizontalAlignment="Left">
    <docking:ToolWindow>
    </docking:ToolWindow>
  </docking:ToolWindowContainer>

  <docking:Workspace  Margin="10,0,0,0">
    <docking:TabbedMdiHost x:Name="MDIPresentationsWindow" >
     <docking:TabbedMdiContainer Name="MDITabContainer">
     </docking:TabbedMdiContainer>
    </docking:TabbedMdiHost>
  </docking:Workspace>
 <docking:SplitContainer >

Comments (14)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Willie,

You can't set Width/Height specifically on those controls since they need to be dynamic and change based on splits, etc.

Instead, please read the documentation topic "Docking & MDI Docking Window Features / Lifecycle and Docking Management / Setting Docking Window Initial Sizes" to accomplish what you wanted.


Actipro Software Support

Posted 10 years ago by Willie
Avatar
It does not work (i use release build 486) .

Designtime i see how it should look, but
the area between my left fixed toolwindow and the right tabbed mdi is at runtime a larger area. When i resize the complete application to the left and back to the right the tabbed mdi stays at the right position besides the toolwindow.

Have a look at this picture. This is how it shows up.
http://downloads.nds.eu/downloads/pictures/actiproscreen.jpg


Why isn't it possible to set the splitter to a certain location just like in the microsoft splitter? When a user puts the splitter at a certain location, i want to store this position and reload this the next time he starts the application. This would be the most logical way to deal with this.

[Modified at 04/02/2009 02:31 AM]

[Modified at 04/02/2009 03:53 AM]
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Willie,

My guess is that you're doing something wrong here, since that should not be happening. Please email us a simple sample project that shows the problem happening and in your email explains how to reproduce it and what you'd expect to see. We'll take a look and figure out what the problem is.

You can save tool window layouts to persist and restore layout data between application sessions.


Actipro Software Support

Posted 10 years ago by Willie
Avatar
I stripped my application to the basic.
At designtime it stands beside the toolbox and when you run it, it shows the space.

<ribbon:RibbonWindow x:Class="MainDesignerWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:docking="http://schemas.actiprosoftware.com/winfx/xaml/docking"
    xmlns:ribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon"
    xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
    xmlns:ndsbase="http://schemas.nds.eu/BaseControls" 
    Height="600" Width="800" ResizeMode="CanResizeWithGrip">

    <DockPanel >
        <ribbon:Ribbon Name="MainRibbon" DockPanel.Dock="Top"  FontSize="11" FontFamily="Segoe UI" SnapsToDevicePixels="True">
            <!-- Tab Panel Items (Appear next to the tabs) -->
            <ribbon:Ribbon.TabPanelItems>
                <ribbon:Button Label="Help" KeyTipAccessText="Z" />
            </ribbon:Ribbon.TabPanelItems>

            <ribbon:Ribbon.ApplicationMenu >
                <ribbon:ApplicationMenu >
                    <ribbon:SplitButton Name="MnuFileNew" />
                    <ribbon:SplitButton Name="MnuFileOpen" />
                    <ribbon:SplitButton Name="MnuFileClose" />
                </ribbon:ApplicationMenu>
            </ribbon:Ribbon.ApplicationMenu>
            <ribbon:Ribbon.QuickAccessToolBarItems>
                <ribbon:Button Label="Save" />
                <ribbon:Button Label="Undo" />
            </ribbon:Ribbon.QuickAccessToolBarItems>

            <!-- Tabs -->
            <ribbon:Ribbon.Tabs>
                <ribbon:Tab Name="Home" Label="Home" KeyTipAccessText="H"></ribbon:Tab>
                <ribbon:Tab Name="Presentation" Label="Presentation">
                    <ribbon:Group Label="General">
                        <ribbon:StackPanel ItemVariantBehavior="MediumThenSmallWhenSmall">
                            <ribbon:TextBox MinWidth="40" MaxWidth="140" Label="Name"></ribbon:TextBox>
                            <ribbon:ComboBox Width="40">
                                <ribbon:Menu>
                                    <ribbon:Button Label="5"></ribbon:Button>
                                    <ribbon:Button Label="10"></ribbon:Button>
                                    <ribbon:Button Label="12"></ribbon:Button>
                                    <ribbon:Button Label="15"></ribbon:Button>
                                    <ribbon:Button Label="20"></ribbon:Button>
                                    <ribbon:Button Label="25"></ribbon:Button>
                                </ribbon:Menu>
                            </ribbon:ComboBox>
                        </ribbon:StackPanel>
                    </ribbon:Group>
                    <ribbon:Group Label="Size">
                        <ribbon:StackPanel ItemVariantBehavior="MediumThenSmallWhenSmall">
                            <ribbon:SplitButton Label="Predefined" >
                                <ribbon:Menu>
                                    <ribbon:PopupButton Label="16:9 Screen Resolution">
                                        <ribbon:Menu>
                                            <ribbon:Button Label="1280x720" />
                                            <ribbon:Button Label="1920x1080" />
                                            <ribbon:Button Label="2560x1440" />
                                        </ribbon:Menu>
                                    </ribbon:PopupButton>
                                    <ribbon:PopupButton Label="16:10 Screen Resolution">
                                        <ribbon:Menu>
                                            <ribbon:Button Label="1680x1050" />
                                            <ribbon:Button Label="1920x1200" />
                                            <ribbon:Button Label="2560x1600" />
                                        </ribbon:Menu>
                                    </ribbon:PopupButton>
                                    <ribbon:PopupButton Label="4:3 Screen Resolution">
                                        <ribbon:Menu>
                                            <ribbon:Button Label="640x480" />
                                            <ribbon:Button Label="640x480" />
                                            <ribbon:Button Label="800x600" />
                                        </ribbon:Menu>
                                    </ribbon:PopupButton>
                                </ribbon:Menu>
                            </ribbon:SplitButton>
                            <ribbon:ComboBox Width="44" Label="Width" HorizontalContentAlignment="Right"></ribbon:ComboBox>
                            <ribbon:ComboBox Width="44" Label="Height" HorizontalContentAlignment="Right"></ribbon:ComboBox>
                        </ribbon:StackPanel>
                    </ribbon:Group>
                </ribbon:Tab>
            </ribbon:Ribbon.Tabs>
        </ribbon:Ribbon>

        <!-- DockSite -->
        <docking:DockSite Name="MainDockSite" >
            <docking:SplitContainer >
                <docking:ToolWindowContainer  HorizontalAlignment="Left" docking:DockSite.ControlSize="60, 150" MinWidth="60" MaxWidth="60" Width="60">
                    <docking:ToolWindow Title="Toolbox" CanAutoHide="False" CanBecomeDocument="False" CanClose="False" >
                        <Grid Width="55" DockPanel.Dock="Left" Background="Transparent"  >
                            <ToolBarTray Name="MainToolBarTray" Orientation="Vertical" AllowDrop="False" IsLocked="True" >
                                <ToolBar Name="MainToolBar" SnapsToDevicePixels="True" ClipToBounds="True"   >
                                    <ToggleButton Name="ToolbarSelection" >
                                        <Image HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="False" Name="Image1" />
                                    </ToggleButton>
                                    <ToggleButton Name="ToolbarText">
                                        <Image HorizontalAlignment="Center" VerticalAlignment="Center"  />
                                    </ToggleButton>
                                    <ToggleButton Name="ToolbarPicture">
                                        <Image HorizontalAlignment="Center" VerticalAlignment="Center" />
                                    </ToggleButton>
                                    <ToggleButton Name="ToolbarLine">
                                        <Image HorizontalAlignment="Center" VerticalAlignment="Center" />
                                    </ToggleButton>
                                </ToolBar>
                            </ToolBarTray>
                            <ToolBarTray Name="MainAddonBarTray" Orientation="Vertical" AllowDrop="False" IsLocked="True" Margin="27,0,0,0"  >
                                <ToolBar Name="MainAddonBar" SnapsToDevicePixels="True" ClipToBounds="True"   >
                                    <ToggleButton>
                                        <Image HorizontalAlignment="Center" VerticalAlignment="Center" />
                                    </ToggleButton>
                                </ToolBar>
                            </ToolBarTray>
                        </Grid>
                    </docking:ToolWindow>
                </docking:ToolWindowContainer>

                <docking:Workspace  Margin="10,0,2,2" >
                    <docking:TabbedMdiHost x:Name="MDIPresentationsWindow">
                        <docking:TabbedMdiContainer Name="MDITabContainer"  >
                        </docking:TabbedMdiContainer>
                    </docking:TabbedMdiHost>
                </docking:Workspace>
            </docking:SplitContainer>

        </docking:DockSite>
    </DockPanel>

</ribbon:RibbonWindow>

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Willie,

You'd need to take out all the width, align, and margin properties that you have set. The tool windows don't currently support fixed-size windows.
<docking:ToolWindowContainer docking:DockSite.ControlSize="60, 150">
    <docking:ToolWindow Title="Toolbox" CanAutoHide="False" CanBecomeDocument="False" CanClose="False" >
        <Grid Background="Transparent"  >
            <ToolBarTray Name="MainToolBarTray" Orientation="Vertical" AllowDrop="False" IsLocked="True" >
                <ToolBar Name="MainToolBar" SnapsToDevicePixels="True" ClipToBounds="True"   >
                    <ToggleButton Name="ToolbarSelection" >
                        <Image HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="False" Name="Image1" />
                    </ToggleButton>
                    <ToggleButton Name="ToolbarText">
                        <Image HorizontalAlignment="Center" VerticalAlignment="Center"  />
                    </ToggleButton>
                    <ToggleButton Name="ToolbarPicture">
                        <Image HorizontalAlignment="Center" VerticalAlignment="Center" />
                    </ToggleButton>
                    <ToggleButton Name="ToolbarLine">
                        <Image HorizontalAlignment="Center" VerticalAlignment="Center" />
                    </ToggleButton>
                </ToolBar>
            </ToolBarTray>
            <ToolBarTray Name="MainAddonBarTray" Orientation="Vertical" AllowDrop="False" IsLocked="True">
                <ToolBar Name="MainAddonBar" SnapsToDevicePixels="True" ClipToBounds="True"   >
                    <ToggleButton>
                        <Image HorizontalAlignment="Center" VerticalAlignment="Center" />
                    </ToggleButton>
                </ToolBar>
            </ToolBarTray>
        </Grid>
    </docking:ToolWindow>
</docking:ToolWindowContainer>


Actipro Software Support

Posted 10 years ago by Willie
Avatar
How can i tell the toolbox than, that it must have a fixed size which never changes???

Now the width of the toolbox is calculated automatically, and much to big!
Posted 10 years ago by Willie
Avatar
How can i tell the toolbox than, that it must have a fixed size which never changes???

Now the width of the toolbox is calculated automatically, and much to big!
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Willie,

Well the tool windows themselves cannot be fixed size at this time. Perhaps you can tell the toolbox control to stretch to its container's width though.


Actipro Software Support

Posted 10 years ago by Willie
Avatar
That is not an option.

If i start the application the toolbox is shown in a larger empty region. besides that is the mdi area.

If i now resize the application width to a small value and resize back to the original location the toolbox is located besides the mdi region as aspected.

So this means the algorithme at the back has a BUG. Otherwise i would have expected that the outcome after the resize back would result in the same visual content as a fresh restart!
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Correct, that is something we discovered as well and have on the TODO list. It should be resizing back to what it was at application start, or the last time a splitter was moved.


Actipro Software Support

Posted 10 years ago by Willie
Avatar
I still think it's a design bug if my toolbox with a fixed size and split shows more than needed.

The point now is how can I accomplish that at the left the toolbox is shown with besides that the mdi area and that the user is capable of docking/floating it.
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Willie,

Adding features for supporting fixed tool window sizes is something that is on our TODO list but is not yet implemented.

For now you can set the initial size via the attached docking:DockSite.ControlSize property on the ToolWindowContainer. However at runtime it can still be resized with splitters.

If you need a fixed with toolbar in the MDI area now, you could probably retemplate docking:Workspace and include it there. However it wouldn't be dockable or floatable.


Actipro Software Support

Posted 10 years ago by Willie
Avatar
At what timespan can I expect this functionality?
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Willie,

Sorry we don't have a timeframe right now. It has to be prioritized with the hundreds of requests we get from other customers too.

If this is something you require immediately, then you can always contract us to build the feature for you. More info on that here:
http://www.actiprosoftware.com/Purchase/ConsultingServices.aspx


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 19 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.