0

好吧,这个问题很容易解释,而且很难弄清楚,至少对我来说是这样,所以我有一个带有 3 个 tabitem 的 tabcontrol,在其中一个 tabitems 上我有一个 wpf reportviewer,当我更改标签时,它会加载一些数据的报告,当我回到带有水晶报告的选项卡时,每个人都没有关系,水晶报告查看器不再存在!我在顶部还有一个按钮来刷新报告,该按钮仍然存在,但水晶报告控件不再存在!

我的 xml 看起来像这样

<UserControl x:Class="uccvrFactuur"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:my="clr-namespace:SAPBusinessObjects.WPF.Viewer;assembly=SAPBusinessObjects.WPF.Viewer"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Button Content="Report" Height="50" HorizontalAlignment="Right" Margin="5" Name="Button1" VerticalAlignment="Top" Width="50" />
        <my:CrystalReportsViewer Name="crvFactuur" Margin="0,60,0,0" />
    </Grid>
</UserControl>

我必须说,当我第一次单击该选项卡时,控件在那里,但我更改选项卡并返回它,控件不再存在。

提前致谢

4

0 回答 0