WPF 窗口 控件中嵌入winfrom用户控件不出来

z050301402 2012-09-21 11:40:12

<TabItem Header="1111111" Margin="25,0,-94,0" Style="{StaticResource ResourceKey=ItemStyle}" HorizontalAlignment="Left">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ToolBar Grid.Row="0" Style="{ DynamicResource ResourceKey=ToolBar}" Margin="-10,-2,-6,4" Width="auto" HorizontalAlignment="Stretch">
<Button Cursor="Hand" ToolTip="11111" Style="{DynamicResource ResourceKey=ToolImportButton}" Click="ImportQuotation_Click" ></Button>
<Button Cursor="Hand" ToolTip="1111" Style="{DynamicResource ResourceKey=ToolAddButton}" ></Button>
</ToolBar>

<Border Grid.Row="1" BorderBrush="Red" BorderThickness="1">
<Grid x:Name="gridName">

</Grid>
</Border>
</Grid>
</TabItem>

这是wpf xml页面


Bid.BqFile.XmlView xmlWindow = new Bid.BqFile.XmlView("");
xmlWindow.Dock = System.Windows.Forms.DockStyle.Fill;
xmlWindow.Location = new System.Drawing.Point(0, 0);
xmlWindow.Name = "xmlViewers1";
xmlWindow.Size = new System.Drawing.Size(284, 262);
xmlWindow.TabIndex = 0;
host.Child = xmlWindow;
this.gridName.Children.Add(host);

这是后台代码

始终显示 不出来 XmlView 这个winfrom 控件出来

如果去掉了 wpf xml页面的 TabItem 就能显示出去

各位大虾有木有解决办法呢 .
...全文
195 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
qldsrx 2012-09-21
  • 打赏
  • 举报
回复
直接xaml页面里面里添加看看,你这里好多资源性的东西,外加控件也不是标准控件,我没法帮你测试。
kaifa123 2012-09-21
  • 打赏
  • 举报
回复
不知道咋解决,给你顶上去吧
bingbing_liuyue 2012-09-21
  • 打赏
  • 举报
回复
没用过
z050301402 2012-09-21
  • 打赏
  • 举报
回复
???? 木人遇到这种问题?

109,896

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧