Hello,
When I redefine Header of a igDock:ContentPane Like this :
<
igDock:ContentPane.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Foreground="White" Text="Elements"/>
<TextBlock Foreground="White" Text=" ("/>
<TextBlock Foreground="White" Text="{Binding Depots.Count}"/>
<TextBlock Foreground="White" Text=")"/>
</StackPanel>
</igDock:ContentPane.Header>
I have on error when I pinned the panel : {"The specified item is already the logical child of another element. Disconnect it first."}
An issue ? Thanks in advance !
I would recommend not putting elements into the Header. The Header is also used as the default value for the TabHeader (as well as being used in the pane navigator). Since elements can only be hosted in one visual you will end up hitting issues. If you want to change the elements used in the header then I would recommend either setting the HeaderTemplate to a DataTemplate that contains the elements that should be generated or retemplate the PaneHeaderPresenter.
Thanks Andrew !
That's Work with HeaderTemplate but when my Panel is Pinned I Want the Header isn't the same ! How can I have the same Header ?
Thanks !
I'm not sure exactly what you mean. Are you referring to what is displayed in the PaneTabItem (i.e. the tab item in the unpinned area) when the pane is unpinned? If so then you may want to set the TabHeaderTemplate. If you still have an issue then please post a small sample of the problem.
Hi Andrew !
I'have definie TabHeaderTemplate and HeaderTemplate but when my
ContentPane is Floating I want Title is the same of TabHeaderTemplate or HeaderTemplate,
So all my style (style Button for example with Image) are Lost when my ContentPane is in floating mode !
Thanks in advance !
Hi, I want to ask a question.
Here is the code:
<igDock:ContentPane.HeaderTemplate> <DataTemplate> <Grid> <DockPanel> <igWindows:AutoDisabledImage Source="{Binding Path=Tag, RelativeSource={RelativeSource AncestorType={x:Type igDock:ContentPane}}}" Margin="0,0,3,0" Width="20" Height="20"/> <TextBlock Text="{Binding}" VerticalAlignment="Center"/> </DockPanel> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,11,0"> <Image Source="count.png" Margin="5,0,0,0" Width="20" Height="20"/> <TextBlock x:Name="txtCount" Text="{Binding list1.Count}" Margin="3"/> </StackPanel> </Grid> </DataTemplate> </igDock:ContentPane.HeaderTemplate>
I want to Binding a data to the textblock, but it is failed.
How can I do this?
Thank you!
When the floating window only contains a single visible ContentPane (or when it has only a single TabGroupPane), then the hosting Window's Title is set to the header of that pane and the pane's header is hidden. This mimics the behavior displayed in VS. The WPF Window's Title cannot accept anything but a string (as it is just rendered by the OS in the non-client area). So based on that limitation what would you prefer to see in the title bar of the window?