一款基于cefsharp的极简浏览器源码
1、多标签
2、支持无痕模式
3、自定义搜索引擎
4、支持书签收录
5、支持历史记录与COOKIE清除
6、代码全开源,基于wpf
<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:WebExpress" xmlns:bookmarks="clr-namespace:WebExpress.Bookmarks" xmlns:CBfwBfwOntrols="clr-namespace:WebExpress.Controls" x:Name="MainGrid" x:Class="WebExpress.MainWindow" mc:Ignorable="d" Title="WebExpress" Height="640" Width="1024" StateChanged="MainGrid_StateChanged" Activated="MainGrid_PreviewMouseDown" Icon="/WebExpress;component/WE-LOGO.ico"> <Window.Resources> <Style x:Shared="True" x:Key="ButtonStyle" TargetType="Button"> <Setter Property="OverridesDefaultStyle" Value="True"/> <Setter Property="Margin" Value="5"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Border Name="border" BorderThickness="1" Padding="4,2" BorderBrush="Transparent" CornerRadius="3" Background="Transparent"> <ContentPresenter HorizBfwBfwOntalAlignment="Center" VerticalAlignment="Center" /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter TargetName="border" Property="BorderBrush" Value="Transparent" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </Window.Resources> <Grid x:Name="Grid" Background="White" Opacity="0.995"> <Grid.ColumnDefinitions> <ColumnDefinition Width="32*"/> <ColumnDefinition Width="64*"/> <ColumnDefinition Width="921*"/> </Grid.ColumnDefinitions> <Grid Height="26" Background="#FFF0F0F0" HorizBfwBfwOntalAlignment="Stretch" VerticalAlignment="Top" MouseDown="Grid_MouseDown" Grid.ColumnSpan="3" Margin="0,0,-0.4,0"> <local:TabBar x:Name="TabBar" Height="26" VerticalAlignment="Top" Margin="0,0,113,0"/> <Button Style="{StaticResource ButtonStyle}" x:Name="Close" Width="30" Background="{x:Null}" BorderBrush="{x:Null}" VerticalAlignment="Stretch" HorizBfwBfwOntalAlignment="Right" Click="Close_Click" Margin="0,0,10,0" MouseEnter="Close_MouseEnter" MouseLeave="Close_MouseLeave"> <StackPanel Orientation="Horizontal"> <Image x:Name="CloseImage" Source="pack://application:,,,/Resources/close_button.png" HorizBfwBfwOntalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3,3,3,3"/> </StackPanel> </Button> <Button Style="{StaticResource ButtonStyle}" x:Name="Maximize" Width="30" Background="{x:Null}" BorderBrush="{x:Null}" VerticalAlignment="Stretch" HorizBfwBfwOntalAlignment="Right" Click="Maximize_Click" Margin="0,0,46,0" MouseEnter="Maximize_MouseEnter" MouseLeave="Maximize_MouseLeave"> <StackPanel Orientation="Horizontal"> <Image x:Name="MaximizeImage" Source="pack://application:,,,/Resources/maximize_button.png" HorizBfwBfwOntalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3,3,3,3"/> </StackPanel> </Button> <Button Style="{StaticResource ButtonStyle}" x:Name="Minimize" Width="30" Background="{x:Null}" BorderBrush="{x:Null}" VerticalAlignment="Stretch" HorizBfwBfwOntalAlignment="Right" Margin="0,0,78,0" MouseEnter="Minimize_MouseEnter" MouseLeave="Minimize_MouseLeave" Click="Minimize_Click"> <StackPanel Orientation="Horizontal"> <Image x:Name="MinimizeImage" Source="pack://application:,,,/Resources/minimize_button.png" HorizBfwBfwOntalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3,3,3,3"/> </StackPanel> </Button> </Grid> <Grid x:Name="container" HorizBfwBfwOntalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,26,-0.4,0.4" PreviewMouseDown="container_PreviewMouseDown" Grid.ColumnSpan="3" /> <Controls:Menu x:Name="Menu" Width="217" Height="380" VerticalAlignment="Top" HorizBfwBfwOntalAlignment="Right" Margin="0,7,-10.4,0" Grid.Column="2" Loaded="Menu_Loaded" /> <local:Downloads x:Name="Downloads1" VerticalAlignment="Top" HorizBfwBfwOntalAlignment="Right" Width="250" Height="95" Margin="0,-2,-15.4,0" Grid.Column="2"></local:Downloads> </Grid> </Window>
网友评论0