This repository has been archived on 2026-03-14. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Eco/VideoBrowser/Controls/CefSharpBrowser/Views/WebBrowserTabHeaderView.xaml
2023-07-24 12:00:34 +02:00

42 lines
1.9 KiB
XML

<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>