dockablepanel button wrong position when tabbed

dockablepanel button wrong position when tabbed

markjvlampad
Advocate Advocate
496 Views
3 Replies
Message 1 of 4

dockablepanel button wrong position when tabbed

markjvlampad
Advocate
Advocate

I am working with dockablepane and this looks odd.

 

when the panel is in floating position. it looks fine to me. but when it is dock or tabbed, the 2 button where positioned in the middle.

 

anybody can give me a hint how to make my buttons whether floating or dock or tabbed should always appear correctly.

 

kindly see screenshots.

0 Likes
497 Views
3 Replies
Replies (3)
Message 2 of 4

BobbyC.Jones
Advocate
Advocate

Can you post your xaml.

--
Bobby C. Jones
0 Likes
Message 3 of 4

markjvlampad
Advocate
Advocate

<Page x:Class="test.testviewer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:test"
mc:Ignorable="d"
Height="{Binding SystemParameters.PrimaryScreenHeight}"
Width="{Binding SystemParameters.PrimaryScreenWidth}"
MinWidth="300"

Title="testviewer" Loaded="Page_Loaded">
<StackPanel Background="LightGray">
<UniformGrid Rows="4" Height="596" Width="{Binding SystemParameters.PrimaryScreenWidth}">
<DataGrid x:Name="Element" Margin="0,0,0,-249.6" SelectionChanged="Element_SelectionChanged" />
<GroupBox x:Name="Status1" Margin="0,254.6,0,-164.2" Header="Construction" Height="60" VerticalAlignment="Bottom" >
<Grid Height="{Binding SystemParameters.PrimaryScreenHeight}" Width="{Binding SystemParameters.PrimaryScreenWidth}" VerticalAlignment="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="95*"/>
<ColumnDefinition Width="192*"/>
</Grid.ColumnDefinitions>
<CheckBox Content="Checkbox" HorizontalAlignment="Left" Margin="0,0,0,-0.4" Width="95" Height="38" VerticalContentAlignment="Center"/>
<TextBox Height="24" Margin="95,0,0,-0.4" TextWrapping="Wrap" Text="TextBox" Width="113" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Grid.ColumnSpan="2"/>

</Grid>
</GroupBox>
<GroupBox x:Name="Status" Margin="0,0,0,-139" Header="Status" Height="122" Width="{Binding SystemParameters.PrimaryScreenWidth}" VerticalAlignment="Bottom" />


</UniformGrid>
<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom">
<Button Content="Button2" HorizontalAlignment="Left" Width="113" Height="25" Margin="10,0,0,10" VerticalAlignment="Bottom"></Button>
<GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch" Background="LightGray"></GridSplitter>
<Button Content="button1" HorizontalAlignment="Left" Width="113" Height="25" Margin="0,10" VerticalAlignment="Bottom"/>

</StackPanel>
</StackPanel>

</Page>

 

for the container, I tried different types like grid, stackpanel, uniform grid all give me the same output.

0 Likes
Message 4 of 4

markjvlampad
Advocate
Advocate

already find my solution. I used grid as a container. and its a matter of defining rows and columns correctly.

0 Likes