Projektdateien hinzufügen.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<Window
|
||||
x:Class="VideoBrowser.Controls.CefSharpBrowser.Views.DefaultTabHostWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:viewmodels="clr-namespace:VideoBrowser.Controls.CefSharpBrowser.ViewModels"
|
||||
xmlns:views="clr-namespace:VideoBrowser.Controls.CefSharpBrowser.Views"
|
||||
d:DataContext="{d:DesignInstance viewmodels:DefaultTabHostViewModel}"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<views:WebBrowserTabControlView x:Name="WebBrowserTabControlView" DataContext="{Binding WebBrowserTabControlViewModel}" />
|
||||
</Window>
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace VideoBrowser.Controls.CefSharpBrowser.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for DefaultTabHostWindow.xaml.
|
||||
/// </summary>
|
||||
public partial class DefaultTabHostWindow
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DefaultTabHostWindow"/> class.
|
||||
/// </summary>
|
||||
public DefaultTabHostWindow()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
#endregion Constructors
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<UserControl
|
||||
x:Class="VideoBrowser.Controls.CefSharpBrowser.Views.SettingsView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:viewmodels="clr-namespace:VideoBrowser.ViewModels"
|
||||
d:DataContext="{d:DesignInstance viewmodels:SettingsViewModel}"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
Background="WhiteSmoke"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../../Resources/IconsResource.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" TargetType="Button">
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Margin" Value="2" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Border
|
||||
Margin="32"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
Background="White">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect
|
||||
BlurRadius="10"
|
||||
Opacity="0.3"
|
||||
ShadowDepth="3" />
|
||||
</Border.Effect>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
Height="50"
|
||||
Padding="16,5,5,5"
|
||||
VerticalContentAlignment="Center"
|
||||
Background="RoyalBlue"
|
||||
Content="Settings"
|
||||
FontSize="16"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="White" />
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Width="500"
|
||||
Margin="24">
|
||||
<TextBlock Text="Output Path" />
|
||||
<StackPanel Margin="0,8,0,0" Orientation="Horizontal">
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding OutputFolder}" />
|
||||
<Button
|
||||
Margin="8,0,0,0"
|
||||
Command="{Binding GetFolderCommand}"
|
||||
CommandParameter="{Binding RelativeSource={RelativeSource Self}}">
|
||||
<Path Style="{StaticResource VideoFolder}" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace VideoBrowser.Controls.CefSharpBrowser.Views
|
||||
{
|
||||
using System.Windows.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for SettingsView.xaml
|
||||
/// </summary>
|
||||
public partial class SettingsView : UserControl
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SettingsView"/> class.
|
||||
/// </summary>
|
||||
public SettingsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
#endregion Constructors
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
<UserControl
|
||||
x:Class="VideoBrowser.Controls.CefSharpBrowser.Views.VideoBrowserView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:cefSharpViews="clr-namespace:VideoBrowser.Controls.CefSharpBrowser.Views"
|
||||
xmlns:cefsharpbrowser="clr-namespace:VideoBrowser.Controls.CefSharpBrowser"
|
||||
xmlns:converters="clr-namespace:VideoBrowser.Converters"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:viewmodels="clr-namespace:VideoBrowser.Controls.CefSharpBrowser.ViewModels"
|
||||
xmlns:views="clr-namespace:VideoBrowser.Views"
|
||||
d:DataContext="{d:DesignInstance viewmodels:VideoBrowserViewModel}"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../../Resources/IconsResource.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<converters:BoolToVisibilityConverter
|
||||
x:Key="InverseBoolToVisibilityConverter"
|
||||
FalseValue="Visible"
|
||||
TrueValue="Collapsed" />
|
||||
<converters:BoolToBoolConverter
|
||||
x:Key="InverseBoolToBoolConverter"
|
||||
FalseValue="True"
|
||||
TrueValue="False" />
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<!-- Browser Main Toolbar -->
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
Margin="0,0,0,4"
|
||||
Panel.ZIndex="999"
|
||||
Visibility="{Binding CefWindowData.IsFullScreen, Mode=OneWay, Converter={StaticResource InverseBoolToVisibilityConverter}}">
|
||||
<Grid.Resources>
|
||||
<Style BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" TargetType="Button">
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Width" Value="24" />
|
||||
<Setter Property="Height" Value="24" />
|
||||
<Setter Property="Margin" Value="2" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- Left side buttons -->
|
||||
<StackPanel
|
||||
Grid.Column="0"
|
||||
Height="32"
|
||||
Orientation="Horizontal">
|
||||
<Button Command="{Binding BackwardCommand}" ToolTip="Go back to previous visited site">
|
||||
<Path Style="{StaticResource Back}" />
|
||||
</Button>
|
||||
<Button Command="{Binding ForwardCommand}" ToolTip="Go forward to previous visited site">
|
||||
<Path Style="{StaticResource Forward}" />
|
||||
</Button>
|
||||
<Button Command="{Binding ReloadCommand}" ToolTip="Refresh this site">
|
||||
<Path Style="{StaticResource Reload}" />
|
||||
</Button>
|
||||
<Button Command="{Binding HomeCommand}" ToolTip="Go home site for newest information">
|
||||
<Path Style="{StaticResource Home}" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<!-- URL TextBox -->
|
||||
<Grid x:Name="UrlEditorGrid" Grid.Column="1">
|
||||
<Canvas>
|
||||
<views:UrlEditorView
|
||||
x:Name="UrlEditorView"
|
||||
Width="{Binding RelativeSource={RelativeSource AncestorType=Grid}, Path=ActualWidth, Mode=OneWay}"
|
||||
Background="White"
|
||||
DataContext="{Binding UrlEditor}" />
|
||||
</Canvas>
|
||||
</Grid>
|
||||
<!-- Right side buttons -->
|
||||
<StackPanel
|
||||
Grid.Column="2"
|
||||
Height="32"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Command="{Binding DownloadCommand}"
|
||||
IsEnabled="{Binding UrlEditor.IsDownloadable}"
|
||||
ToolTip="Download the current video">
|
||||
<Path Style="{StaticResource Download}" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<!-- Add in buttons -->
|
||||
<ItemsControl
|
||||
Grid.Column="3"
|
||||
Height="32"
|
||||
ItemsSource="{Binding AddInButtons}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button
|
||||
Command="{Binding Command}"
|
||||
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=cefSharpViews:WebBrowserTabControlView}, Path=DataContext}"
|
||||
IsEnabled="{Binding IsEnabled}"
|
||||
ToolTip="{Binding ToolTip}">
|
||||
<Path Data="{Binding Icon}" Style="{StaticResource IconPathButtonBaseStyle}" />
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
<cefsharpbrowser:CefSharpBrowser
|
||||
x:Name="CefSharpBrowserControl"
|
||||
Title="{Binding Header}"
|
||||
Grid.Row="1"
|
||||
BackwardCommand="{Binding BackwardCommand, Mode=OneWayToSource}"
|
||||
ForwardCommand="{Binding ForwardCommand, Mode=OneWayToSource}"
|
||||
IsAirspaceVisible="{Binding CefWindowData.IsAirspaceVisible}"
|
||||
IsFullScreenCommand="{Binding CefWindowData.IsFullScreenCommand, Mode=OneWay}"
|
||||
ReloadCommand="{Binding ReloadCommand, Mode=OneWayToSource}"
|
||||
Url="{Binding NavigateUrl}"
|
||||
WebBrowser="{Binding WebBrowser, Mode=OneWayToSource}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace VideoBrowser.Controls.CefSharpBrowser.Views
|
||||
{
|
||||
using System.Windows.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for VideoBrowserView.xaml
|
||||
/// </summary>
|
||||
public partial class VideoBrowserView : UserControl
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="VideoBrowserView"/> class.
|
||||
/// </summary>
|
||||
public VideoBrowserView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
#endregion Constructors
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
<UserControl
|
||||
x:Class="VideoBrowser.Controls.CefSharpBrowser.Views.WebBrowserTabControlView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dockablz="http://dragablz.net/winfx/xaml/dockablz"
|
||||
xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz"
|
||||
xmlns:extension="clr-namespace:VideoBrowser.Extensions"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:viewmodels="clr-namespace:VideoBrowser.Controls.CefSharpBrowser.ViewModels"
|
||||
d:DataContext="{d:DesignInstance viewmodels:WebBrowserTabControlViewModel}"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
Loaded="{extension:EventBinding Command={Binding LoadedCommand}}"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<DataTemplate DataType="{x:Type dragablz:HeaderedItemViewModel}">
|
||||
<ContentControl
|
||||
Margin="4"
|
||||
Content="{Binding Content}"
|
||||
FontSize="14" />
|
||||
</DataTemplate>
|
||||
<dragablz:InterTabController
|
||||
x:Key="InterTabController"
|
||||
x:Shared="False"
|
||||
InterTabClient="{Binding InterTabClient}"
|
||||
Partition="2AE89D18-F236-4D20-9605-6C03319038E6" />
|
||||
<Style x:Key="TabablzControlStyle" TargetType="{x:Type dragablz:TabablzControl}">
|
||||
<Setter Property="ItemsSource" Value="{Binding TabItems}" />
|
||||
<Setter Property="ClosingItemCallback" Value="{Binding ClosingTabItemHandler}" />
|
||||
<Setter Property="ShowDefaultAddButton" Value="True" />
|
||||
<Setter Property="ShowDefaultCloseButton" Value="True" />
|
||||
<Setter Property="AdjacentHeaderItemOffset" Value="-10" />
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TrapezoidDragableTabItemStyle}" />
|
||||
<Setter Property="HeaderMemberPath" Value="Header" />
|
||||
<Setter Property="InterTabController" Value="{StaticResource InterTabController}" />
|
||||
<Setter Property="Margin" Value="0,8,0,0" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=(dockablz:Layout.IsTopLeftItem)}" Value="True">
|
||||
<Setter Property="HeaderPrefixContent" Value="{StaticResource WindowIcon}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<dockablz:Layout
|
||||
Name="RootLayout"
|
||||
ClosingFloatingItemCallback="{Binding ClosingFloatingItemHandler}"
|
||||
FloatingItemHeaderMemberPath="Header"
|
||||
FloatingItemsContainerMargin="0 2 0 0"
|
||||
FloatingItemsSource="{Binding ToolItems}"
|
||||
IsFloatDropZoneEnabled="True"
|
||||
Partition="2AE89D18-F236-4D20-9605-6C03319038E6">
|
||||
<!-- branch template lets dragablz create a new tab control after a window is split via docking -->
|
||||
<dockablz:Layout.BranchTemplate>
|
||||
<DataTemplate>
|
||||
<dragablz:TabablzControl Style="{StaticResource TabablzControlStyle}">
|
||||
<dragablz:TabablzControl.InterTabController>
|
||||
<dragablz:InterTabController InterTabClient="{Binding InterTabClient}" Partition="2AE89D18-F236-4D20-9605-6C03319038E6" />
|
||||
</dragablz:TabablzControl.InterTabController>
|
||||
</dragablz:TabablzControl>
|
||||
</DataTemplate>
|
||||
</dockablz:Layout.BranchTemplate>
|
||||
<dragablz:TabablzControl
|
||||
x:Name="InitialTabablzControl"
|
||||
AddLocationHint="After"
|
||||
FixedHeaderCount="1"
|
||||
NewItemFactory="{Binding CreateBrowserFunc}"
|
||||
SelectedIndex="{Binding SelectedTabIndex}"
|
||||
Style="{StaticResource TabablzControlStyle}">
|
||||
<dragablz:TabablzControl.InterTabController>
|
||||
<dragablz:InterTabController InterTabClient="{Binding InterTabClient}" Partition="2AE89D18-F236-4D20-9605-6C03319038E6" />
|
||||
</dragablz:TabablzControl.InterTabController>
|
||||
</dragablz:TabablzControl>
|
||||
</dockablz:Layout>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace VideoBrowser.Controls.CefSharpBrowser.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for WebBrowserTabControlView.xaml.
|
||||
/// </summary>
|
||||
public partial class WebBrowserTabControlView
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="WebBrowserTabControlView"/> class.
|
||||
/// </summary>
|
||||
public WebBrowserTabControlView()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
#endregion Constructors
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<UserControl
|
||||
x:Class="VideoBrowser.Controls.CefSharpBrowser.Views.WebBrowserTabHeaderView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz"
|
||||
xmlns:extension="clr-namespace:VideoBrowser.Extensions"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:viewmodels="clr-namespace:VideoBrowser.Controls.CefSharpBrowser.ViewModels"
|
||||
d:DataContext="{d:DesignInstance viewmodels:WebBrowserTabHeaderViewModel}"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<Style x:Key="InvisibleThumbStyle" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Grid Background="{TemplateBinding Background}" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image
|
||||
Margin="2,0,2,0"
|
||||
Source="{Binding Image}"
|
||||
Stretch="Uniform" />
|
||||
<Grid>
|
||||
<TextBlock Width="100" Text="{Binding Header}" />
|
||||
<!-- you should provide your own Thumb, which will be used to monitor dragging -->
|
||||
<Thumb
|
||||
dragablz:DragablzItem.IsCustomThumb="True"
|
||||
MouseUp="{extension:EventBinding Command={Binding MouseUpCommand},
|
||||
CommandParameter={Binding RelativeSource={RelativeSource Self}}}"
|
||||
Style="{DynamicResource InvisibleThumbStyle}"
|
||||
ToolTip="{Binding Header}" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace VideoBrowser.Controls.CefSharpBrowser.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for WebBrowserTabHeaderView.xaml.
|
||||
/// </summary>
|
||||
public partial class WebBrowserTabHeaderView
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="WebBrowserTabHeaderView"/> class.
|
||||
/// </summary>
|
||||
public WebBrowserTabHeaderView()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
#endregion Constructors
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user