Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含 WebView 控件的用户控件。并且这个用户控件被放置在 MainPage.xaml[MyUserControl1] 中。如何通过 MyUserControl1 访问 WebView?
你能和我们分享你的代码吗?这个答案完全基于我对您如何创建用户控件的假设:)
public class MyUserControl1: UserControl { private WebView wb = new WebView(); public MyControl() { this.Controls.Add( wb); } public WebView GetWebView { get { return wb; } } }