开发者

WPF hosting ActiveX control location

开发者 https://www.devze.com 2023-03-13 16:48 出处:网络
I\'m hosting an ActiveX control in WPF form. It works well, no problem. But I can\'t find the property that sets the location of the ActiveX cont开发者_StackOverflow中文版rol on the WPF form (in the c

I'm hosting an ActiveX control in WPF form. It works well, no problem. But I can't find the property that sets the location of the ActiveX cont开发者_StackOverflow中文版rol on the WPF form (in the code). So it's stuck at the center of the screen for now.

the host is a System.Windows.Forms.Integration.WindowsFormsHost


Layout of controls in WPF is done through layout panels like Grid, StackPanel, DockPanel, etc. They all layout the controls they contain different, so it depends on what you want. The xaml code below uses a stackpanel which layouts the controls below each other.

<StackPanel> 
  <WindowsFormsHost ... />
</StackPanel>
0

精彩评论

暂无评论...
验证码 换一张
取 消