0
我對C#和.NET一般都很陌生,所以這可能看起來像一個愚蠢的問題?我試圖按照這個建議here在自定義類中包裝的WebBrowser控件
我需要一些幫助,究竟是什麼意思的聲明「首先,我有我的WebBrowser控件包裝在自定義類中添加功能,在該類中我聲明這個常量.....」
目前我有WPF WebBrowser控件手動添加爲XAML下面
<Window x:Class="ProjectX.WebbrowserWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="WebbrowserWindow" Height="378" Width="632">
<Grid>
<WebBrowser HorizontalAlignment="Stretch" Margin="0,32,0,0" Name="webBrowser1" VerticalAlignment="Stretch" Navigated="webBrowser1_Navigated" />
<Button Content="Go!" Height="22" HorizontalAlignment="Left" Margin="507,3,0,0" Name="button1" VerticalAlignment="Top" Width="78" Click="button1_Click" />
<TextBox Height="23" HorizontalAlignment="Left" Margin="4,2,0,0" Name="textBox1" VerticalAlignment="Top" Width="497" />
</Grid>
</Window>
我假設我只需要創建一個新類(比如說WebBrowserCustom.cs )並添加這些事件?但我很努力去理解我如何將它添加到WPF窗口?
謝謝