For simplicities sake strip out all the MVVM parts and simplify the example down to the bare minimum

(Code is declared in the MainWindow now)
This commit is contained in:
amaitland
2016-01-13 10:53:46 +10:00
parent 757b8edf1e
commit 09b92eac80
8 changed files with 45 additions and 144 deletions

View File

@@ -1,8 +1,26 @@
<Window x:Class="CefSharp.MinimalExample.Wpf.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:main="clr-namespace:CefSharp.MinimalExample.Wpf.Views"
Title="{Binding WebBrowser.Title}"
xmlns:wpf="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
Title="{Binding Path=Title, ElementName=Browser, Converter={StaticResource TitleConverter}}"
WindowState="Maximized">
<main:MainView/>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<wpf:ChromiumWebBrowser Grid.Row="0"
x:Name="Browser"
Address="http://www.google.com" />
<StatusBar Grid.Row="1">
<ProgressBar HorizontalAlignment="Right"
IsIndeterminate="{Binding WebBrowser.IsLoading}"
Width="100"
Height="16"
Margin="3" />
<Separator />
<!-- TODO: Could show hover link URL here -->
<TextBlock />
</StatusBar>
</Grid>
</Window>