Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
255
Whie floating, the contentPane cannot show it's header normally after I custom it?
posted

Hi, I need your help.

Whie floating, the contentPane cannot show it's header normally after I custom it.

My Xaml code:

the DataTemplate:

        <DataTemplate x:Key="paneHeader">
            <Grid>
                <DockPanel>
                    <TextBlock Text="{Binding PaneName}" VerticalAlignment="Center"/>
                </DockPanel>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,11,0">
                    <Image Source="Images/alarm01.png" Margin="5,0,0,0" Width="16" Height="16"/>
                    <TextBlock x:Name="txt1" Text="{Binding Alarm1Count}" Margin="3"/>
                    <Image Source="Images/alarm02.png" Margin="5,0,0,0" Width="16" Height="16"/>
                    <TextBlock Name="txt2" Text="{Binding Alarm2Count}" Margin="3"/>
                    <Image Source="Images/alarm03.png" Margin="5,0,0,0" Width="16" Height="16"/>
                    <TextBlock Name="txt3" Text="{Binding Alarm3Count}" Margin="3"/>
                    <Image Source="Images/alarm04.png" Margin="5,0,0,0" Width="16" Height="16"/>
                    <TextBlock Name="txt4" Text="{Binding Alarm4Count}" Margin="3"/>
                </StackPanel>
            </Grid>
        </DataTemplate>

and Using:

<igDock:ContentPane Name="importantAlarmPane"  HeaderTemplate="{StaticResource paneHeader}" >

and behind code:

importantAlarmPane.Header = new AlarmStatistics("New","1","2","3","4");

While floating, the header show:

WPF.Test.AlarmStatistics

What is wrong with me?

Wish your reply.

Thank you!

 

xu.jd

 

Parents
  • 138253
    Offline posted

    Hello jdxu1984,

    Thank you for your post. I have been looking through it and since there isn’t any built-in functionality I attached a sample project showing a custom approach. Basically there is a style for the PaneToolWindow, which is the element to which the ContentPane transforms after it becomes floating. This is why there should be a two separate styles for both elements using the same DataTemplate in order to look the same. Please note, we are making efforts to ensure all posts are addressed by an Infragistics expert. We believe that the other community members could benefit from this thread as well.

    Feel free to write me if you need further assistance.

    DockManagerHeader.zip
Reply Children
No Data