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