Repository navigation
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
41 lines (41 loc) · 1.88 KB
/
Copy pathMainWindow.xaml
File metadata and controls
41 lines (41 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<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>