ContentControl与ContentPresenter区别?

<TextBlock HorizontalAlignment="Left" Text="{Binding HwContent, Converter={StaticResource TextSerialize}}" VerticalAlignment="Top" Margin="76,26,160,0" TextTrimming="CharacterEllipsis" Grid.Column="0" Height="Auto" FontSize="14" LineHeight="24" Cursor="Hand" TextWrapping="NoWrap" Foreground="{DynamicResource Foreground_Gray_level2}">
                        <TextBlock.ToolTip >
                            <ContentControl   Content="{Binding HwContent}" >
                                <ContentControl.ContentTemplate>
                                    <DataTemplate>
                                        <Border MaxWidth="600" MinHeight="16" MaxHeight="320" Padding="5,5,5,5">
                                            <TextBlock TextWrapping="Wrap" TextTrimming="CharacterEllipsis" Text="{Binding Mode=OneTime}"/>
                                        </Border>
                                    </DataTemplate>
                                </ContentControl.ContentTemplate>
                            </ContentControl>
                        </TextBlock.ToolTip>
                    </TextBlock>

ContentPresenter显示不出来,但是ContentControl  能显示出来

上一篇:laravel Blade 模板引擎


下一篇:51单片机创建PDF文件