71 lines
3.2 KiB
XML
71 lines
3.2 KiB
XML
<Border
|
|
x:Class="VideoBrowser.Controls.CefSharpBrowser.UrlTextBox"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:converters="clr-namespace:VideoBrowser.Converters"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
x:Name="UrlTextBoxRoot"
|
|
Height="26"
|
|
d:DesignWidth="800"
|
|
Background="WhiteSmoke"
|
|
BorderBrush="LightGray"
|
|
BorderThickness="1"
|
|
mc:Ignorable="d">
|
|
<Border.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="../../Resources/IconsResource.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
<converters:BoolToVisibilityConverter
|
|
x:Key="BoolToVisibilityConverter"
|
|
FalseValue="Collapsed"
|
|
TrueValue="Visible" />
|
|
<Style x:Key="AddInItemsControl" TargetType="ItemsControl">
|
|
<Setter Property="ItemsPanel">
|
|
<Setter.Value>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Horizontal" />
|
|
</ItemsPanelTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="ItemTemplate">
|
|
<Setter.Value>
|
|
<DataTemplate>
|
|
<Path
|
|
Data="{Binding Icon}"
|
|
IsEnabled="{Binding IsEnabled}"
|
|
Stroke="DimGray"
|
|
Style="{StaticResource IconPathButtonBaseStyle}"
|
|
ToolTip="{Binding ToolTip}"
|
|
Visibility="{Binding IsVisible, Converter={StaticResource BoolToVisibilityConverter}}" />
|
|
</DataTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Height" Value="{Binding ElementName=UrlTextBoxGrid, Path=ActualHeight}" />
|
|
<Setter Property="Margin" Value="4,0,4,0" />
|
|
</Style>
|
|
</ResourceDictionary>
|
|
</Border.Resources>
|
|
<Grid x:Name="UrlTextBoxGrid">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<ItemsControl ItemsSource="{Binding ElementName=UrlTextBoxRoot, Path=LeftAddInButtons}" Style="{StaticResource AddInItemsControl}" />
|
|
</StackPanel>
|
|
<TextBox
|
|
x:Name="TextBox"
|
|
Grid.Column="1"
|
|
Height="{Binding ElementName=UrlTextBoxGrid, Path=ActualHeight}"
|
|
Margin="0"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
Text="{Binding ElementName=UrlTextBoxRoot, Path=Url, UpdateSourceTrigger=PropertyChanged}" />
|
|
<StackPanel Grid.Column="2">
|
|
<ItemsControl ItemsSource="{Binding ElementName=UrlTextBoxRoot, Path=RightAddInButtons}" Style="{StaticResource AddInItemsControl}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border> |