mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
42 lines
1.9 KiB
XML
42 lines
1.9 KiB
XML
<Window x:Class="CefSharp.Wpf.Example.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:controls="clr-namespace:CefSharp.Wpf.Example.Controls"
|
|
Title="CefSharp.Wpf.Example"
|
|
WindowState="Maximized">
|
|
<Window.InputBindings>
|
|
<KeyBinding Key="T" Modifiers="Control" Command="New"/>
|
|
<KeyBinding Key="W" Modifiers="Control" Command="Close"/>
|
|
</Window.InputBindings>
|
|
<Grid>
|
|
<controls:NonReloadingTabControl x:Name="TabControl"
|
|
Margin="0,5,0,0"
|
|
ItemsSource="{Binding BrowserTabs, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
|
|
SelectedIndex="0">
|
|
<TabControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{Binding Title}"/>
|
|
<Button Content="X"
|
|
Height="20"
|
|
Width="20"
|
|
FontFamily="Courier"
|
|
FontWeight="Bold"
|
|
Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
|
|
Command="Close"
|
|
FontSize="10"
|
|
Padding="0"
|
|
Margin="10,0,0,0"
|
|
ToolTip="Close"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</TabControl.ItemTemplate>
|
|
<TabControl.ContentTemplate>
|
|
<DataTemplate>
|
|
<ContentControl Content="{Binding}" />
|
|
</DataTemplate>
|
|
</TabControl.ContentTemplate>
|
|
</controls:NonReloadingTabControl>
|
|
</Grid>
|
|
</Window>
|