C# WPF WebView2 ブラウザ MainWindow.xaml2022年08月24日 09:22



<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfWeb"
        xmlns:Wpf="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf" x:Class="WpfWeb.MainWindow"
        mc:Ignorable="d"
        Title="MainWindow" Height="600" Width="800">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="514*"/>
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>
        <Button x:Name="btnYahoo" Content="Yahoo" HorizontalAlignment="Left" Height="24" VerticalAlignment="Center" Width="45" Click="btnYahoo_Click" Margin="2,0,0,0"/>
        <Wpf:WebView2 x:Name="WViewMain" Grid.Row="1" Margin="0,0,0,2" NavigationCompleted="WViewMain_NavigationCompleted"/>
        <Button x:Name="btnGoogle" Content="Google" HorizontalAlignment="Left" Margin="52,0,0,0" VerticalAlignment="Center" Height="24" Width="50" Click="btnGoogle_Click"/>
        <Button x:Name="btnStop" Content="Stop" HorizontalAlignment="Left" Margin="106,0,0,0" VerticalAlignment="Center" Height="24" Width="34" Click="btnStop_Click"/>
        <Button x:Name="btnReload" Content="Reload" HorizontalAlignment="Left" Margin="144,0,0,0" VerticalAlignment="Center" Width="47" Height="24" Click="btnReload_Click"/>
        <TextBox x:Name="tbxURI" Margin="30,0,0,0" Grid.Row="2" TextWrapping="Wrap" Text="URI" VerticalAlignment="Center" Height="24"/>
        <Button x:Name="btnPrev" Content="Prev" HorizontalAlignment="Left" Height="24" Margin="195,0,0,0" VerticalAlignment="Center" Width="35" Click="btnPrev_Click"/>
        <Button x:Name="btnNext" Content="Next" HorizontalAlignment="Left" Height="24" Margin="235,0,0,0" VerticalAlignment="Center" Width="35" Click="btnNext_Click"/>
        <Button x:Name="btnGoURI" Content="Go" HorizontalAlignment="Left" Height="24" Margin="2,0,0,0" Grid.Row="2" VerticalAlignment="Center" Width="25" Click="btnGoURI_Click"/>
    </Grid>
</Window>



コメント

トラックバック

このエントリのトラックバックURL: http://tukasa.asablo.jp/blog/2022/08/24/9520292/tb

<< 2022/08
01 02 03 04 05 06
07 08 09 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

このブログについて

ネットで見つけたいろいろ雑記

バックナンバー

RSS