mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-05 19:54:53 +00:00
85 lines
3.8 KiB
XML
85 lines
3.8 KiB
XML
<UserControl x:Class="CefSharp.Wpf.Example.Views.Main.MainView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:cefSharp="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
|
|
xmlns:Example="clr-namespace:CefSharp.Example;assembly=CefSharp.Example"
|
|
mc:Ignorable="d"
|
|
d:DesignWidth="640"
|
|
d:DesignHeight="480">
|
|
<Grid>
|
|
<TextBlock Text="CefSharp WPF Rocks!"
|
|
FontSize="72"
|
|
FontWeight="Bold"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center" />
|
|
<DockPanel>
|
|
<DockPanel VerticalAlignment="Top"
|
|
DockPanel.Dock="Top">
|
|
<Button Height="23"
|
|
Name="backButton"
|
|
Width="75">Back</Button>
|
|
<Button Height="23"
|
|
Name="forwardButton"
|
|
Width="75">Forward</Button>
|
|
<Button Height="23"
|
|
Name="goStopButton"
|
|
Width="75"
|
|
DockPanel.Dock="Right"
|
|
Command="{Binding GoCommand}">Go</Button>
|
|
<TextBox Height="23"
|
|
Name="urlTextBox"
|
|
Text="{Binding Address, Mode=TwoWay}">
|
|
<TextBox.InputBindings>
|
|
<KeyBinding Key="Enter"
|
|
Command="{Binding GoCommand}" />
|
|
</TextBox.InputBindings>
|
|
</TextBox>
|
|
</DockPanel>
|
|
<GroupBox VerticalAlignment="Top"
|
|
DockPanel.Dock="Top">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Label Grid.Row="0"
|
|
Grid.Column="0"
|
|
Content="Angle:" />
|
|
<Slider Grid.Row="0"
|
|
Grid.Column="1"
|
|
Name="angleSlider"
|
|
Minimum="-180"
|
|
Maximum="180" />
|
|
<Label Grid.Row="1"
|
|
Grid.Column="0"
|
|
Content="Opacity:" />
|
|
<Slider Grid.Row="1"
|
|
Grid.Column="1"
|
|
Name="opacitySlider"
|
|
Minimum="0"
|
|
Maximum="1"
|
|
TickFrequency="0.01"
|
|
Value="0.90" />
|
|
</Grid>
|
|
</GroupBox>
|
|
<Label Name="outputLabel"
|
|
DockPanel.Dock="Bottom" />
|
|
<cefSharp:WebView x:Name="webView"
|
|
Opacity="{Binding ElementName=opacitySlider, Path=Value}"
|
|
Uri="{Binding Address, Mode=TwoWay, UpdateSourceTrigger=Explicit}">
|
|
<FrameworkElement.LayoutTransform>
|
|
<TransformGroup>
|
|
<RotateTransform Angle="{Binding Value, ElementName=angleSlider}" />
|
|
</TransformGroup>
|
|
</FrameworkElement.LayoutTransform>
|
|
</cefSharp:WebView>
|
|
</DockPanel>
|
|
</Grid>
|
|
</UserControl>
|