Too much to name... but damn, it got where we are needed
This commit is contained in:
@@ -20,5 +20,6 @@
|
||||
Command="{Binding Click}"
|
||||
Content="{Binding Icon}"
|
||||
FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
FontSize="16" />
|
||||
FontSize="16"
|
||||
ToolTipService.ToolTip="{Binding Text}" />
|
||||
</UserControl>
|
||||
@@ -11,7 +11,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Rectangle
|
||||
Width="1"
|
||||
Margin="6,8,6,8"
|
||||
Margin="6,2,6,2"
|
||||
Fill="{ThemeResource DividerStrokeColorDefaultBrush}"
|
||||
Visibility="{Binding Alternate}" />
|
||||
<ItemsControl
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<UserControl
|
||||
x:Class="Hyperbar.Windows.WidgetSplitButtonView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<UserControl.Resources>
|
||||
<SolidColorBrush x:Key="SplitButtonBackground" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="SplitButtonBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="SplitButtonBorderBrushPointerOver" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="SplitButtonBorderBrushPressed" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="SplitButtonBorderBrushDisabled" Color="Transparent" />
|
||||
<Thickness x:Key="ButtonPadding">0</Thickness>
|
||||
<x:Double x:Key="ButtonWidth">40</x:Double>
|
||||
<x:Double x:Key="ButtonHeight">38</x:Double>
|
||||
</UserControl.Resources>
|
||||
<SplitButton
|
||||
Height="{StaticResource ButtonHeight}"
|
||||
Margin="0,1,0,0"
|
||||
Command="{Binding Click}"
|
||||
Content="{Binding Icon}"
|
||||
FontFamily="{StaticResource SymbolThemeFontFamily}"
|
||||
FontSize="16">
|
||||
<SplitButton.Flyout>
|
||||
<Flyout ShouldConstrainToRootBounds="False">
|
||||
<ItemsControl Margin="-16,-13,-16,-15" ItemsSource="{Binding}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<MenuFlyoutItem Text="{Binding Text}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Flyout>
|
||||
</SplitButton.Flyout>
|
||||
</SplitButton>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,9 @@
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Hyperbar.Windows;
|
||||
|
||||
public sealed partial class WidgetSplitButtonView :
|
||||
UserControl
|
||||
{
|
||||
public WidgetSplitButtonView() => InitializeComponent();
|
||||
}
|
||||
@@ -6,7 +6,6 @@
|
||||
xmlns:interactions="using:Microsoft.Xaml.Interactions.Core"
|
||||
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
|
||||
xmlns:ui="using:Hyperbar.Windows.UI">
|
||||
|
||||
<ItemsControl ItemTemplateSelector="{Binding Converter={ui:DataTemplateConverter}}" ItemsSource="{Binding}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
|
||||
Reference in New Issue
Block a user