Skip to content

Commit

Permalink
Add WPF SimpleMainWindow - bare minimum example
Browse files Browse the repository at this point in the history
  • Loading branch information
amaitland committed Feb 24, 2016
1 parent a891fac commit 2aa5603
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@
<Compile Include="Handlers\MenuHandler.cs" />
<Compile Include="Handlers\LifespanHandler.cs" />
<Compile Include="Handlers\PluginHandler.cs" />
<Compile Include="SimpleMainWindow.xaml.cs">
<DependentUpon>SimpleMainWindow.xaml</DependentUpon>
</Compile>
<Compile Include="SpawnBrowsersWindow.xaml.cs">
<DependentUpon>SpawnBrowsersWindow.xaml</DependentUpon>
</Compile>
Expand All @@ -123,6 +126,10 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="SimpleMainWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SpawnBrowsersWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down
25 changes: 25 additions & 0 deletions CefSharp.Wpf.Example/SimpleMainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Window x:Class="CefSharp.Wpf.Example.SimpleMainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wpf="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
Title="SimpleMainWindow" WindowState="Maximized">
<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>
15 changes: 15 additions & 0 deletions CefSharp.Wpf.Example/SimpleMainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System.Windows;

namespace CefSharp.Wpf.Example
{
/// <summary>
/// Interaction logic for SimpleMainWindow.xaml
/// </summary>
public partial class SimpleMainWindow : Window
{
public SimpleMainWindow()
{
InitializeComponent();
}
}
}

0 comments on commit 2aa5603

Please sign in to comment.