What panels and containers allow Overlapping of UI elements

147 Views Asked by At

What are the panels and containers that allow overlapping with varying z-index ? (escluding Canvas)

--Since I was asked for details this is part of the code:

 <DockPanel HorizontalAlignment="Left" Height="32" LastChildFill="False" Margin="10,0,0,10"
                               VerticalAlignment="Top">
                        <Rectangle Fill="{Binding (extensions:PaletteColor.FillBrush)}" Height="32" RadiusY="4"
                                   RadiusX="4"
                                   Stroke="#FF000000" Width="32" HorizontalAlignment="Left" VerticalAlignment="Top"
                                   MouseLeftButtonUp="TargetColorClick"
                                   ToolTip="{Binding (extensions:PaletteColor.Name)}" />
1

There are 1 best solutions below

4
Relok On

Ok I was able to do this with Clemens support:

<TextBlock TextWrapping="Wrap" Text="16"
                                   Margin="-32,0,0,0" Height="16"
                                   HorizontalAlignment="Center" />

--Answering to another question my XAML for whole control looks like this:

<ItemsControl ItemsSource="{Binding (local:MainWindow.CurrentPaletteSet)}" Width="400" Margin="665,67,14,-67">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <DockPanel HorizontalAlignment="Left" Height="32" LastChildFill="False" Margin="10,0,0,10"
                               VerticalAlignment="Top">
                        <Rectangle Fill="{Binding (extensions:PaletteColor.FillBrush)}" Height="32" RadiusY="4"
                                   RadiusX="4"
                                   Stroke="#FF000000" Width="32" HorizontalAlignment="Left" VerticalAlignment="Top"
                                   MouseLeftButtonUp="TargetColorClick"
                                   ToolTip="{Binding (extensions:PaletteColor.Name)}" />
                        <TextBlock TextWrapping="Wrap" Text="16"
                                   Margin="-32,0,0,0" Height="16"
                                   HorizontalAlignment="Center" />
                        <TextBlock TextWrapping="Wrap" Text="{Binding (extensions:PaletteColor.FullRgbString)}"
                                   Margin="5,0,0,0" Height="16"
                                   HorizontalAlignment="Left" DockPanel.Dock="Top" />
                        <TextBlock TextWrapping="Wrap" Text="{Binding (extensions:PaletteColor.FullHslString)}"
                                   Margin="5,0,0,0"
                                   Height="16" HorizontalAlignment="Left" DockPanel.Dock="Top" MinWidth="121" />
                    </DockPanel>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel></ItemsControl>