This commit is contained in:
2025-10-02 18:28:03 -04:00
parent cdf71c8fd7
commit 5c79965cc5
8 changed files with 167 additions and 90 deletions

View File

@@ -142,13 +142,13 @@
</Setter> </Setter>
</Style> </Style>
<Style x:Key="ScrollBarButton9x" TargetType="{x:Type RepeatButton}"> <Style x:Key="ScrollBarButton9x" TargetType="{x:Type ButtonBase}">
<Setter Property="SnapsToDevicePixels" Value="True"/> <Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="OverridesDefaultStyle" Value="true"/> <Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="Focusable" Value="false"/> <Setter Property="Focusable" Value="false"/>
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type RepeatButton}"> <ControlTemplate TargetType="{x:Type ButtonBase}">
<DockPanel LastChildFill="True"> <DockPanel LastChildFill="True">
<Border x:Name="OuterRightBorder" DockPanel.Dock="Right" Background="#000000" Width="1" /> <Border x:Name="OuterRightBorder" DockPanel.Dock="Right" Background="#000000" Width="1" />
<Border x:Name="OuterBottomBorder" DockPanel.Dock="Bottom" Background="#000000" Height="1" /> <Border x:Name="OuterBottomBorder" DockPanel.Dock="Bottom" Background="#000000" Height="1" />
@@ -628,56 +628,174 @@
</DockPanel> </DockPanel>
</ControlTemplate> </ControlTemplate>
<ControlTemplate x:Key="ComboBox9x" TargetType="{x:Type ComboBox}"> <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition /> <ColumnDefinition />
<ColumnDefinition Width="20" /> <ColumnDefinition Width="20" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ToggleButton x:Name="ToggleButton"
Grid.Column="1" <DockPanel LastChildFill="True" Grid.Column="1">
Focusable="false" <Border x:Name="OuterRightBorder" DockPanel.Dock="Right" Background="#000000" Width="1" />
ClickMode="Press" <Border x:Name="OuterBottomBorder" DockPanel.Dock="Bottom" Background="#000000" Height="1" />
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/> <Border x:Name="OuterLeftBorder" DockPanel.Dock="Left" Background="#FFFFFF" Width="1" />
<ContentPresenter x:Name="ContentSite" <Border x:Name="OuterTopBorder" DockPanel.Dock="Top" Background="#FFFFFF" Height="1" />
IsHitTestVisible="False" <!-- This child DockPanel needs to have Background set or the button is clickable on the text itself :shrug: -->
Content="{TemplateBinding SelectionBoxItem}" <DockPanel Background="{StaticResource Gray}" LastChildFill="True">
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" <Border x:Name="InnerRightBorder" DockPanel.Dock="Right" Background="{StaticResource MediumGray}" Width="1" />
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" <Border x:Name="InnerBottomBorder" DockPanel.Dock="Bottom" Background="{StaticResource MediumGray}" Height="1" />
Margin="3,3,23,3" <Border x:Name="InnerLeftBorder" DockPanel.Dock="Left" Background="{StaticResource Gray}" Width="1" />
VerticalAlignment="Stretch" <Border x:Name="InnerTopBorder" DockPanel.Dock="Top" Background="{StaticResource Gray}" Height="1" />
HorizontalAlignment="Left"> <Border Name="Border" Background="{StaticResource Gray}">
</ContentPresenter> <Path x:Name="Arrow" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 4 4 L 8 0 Z" Fill="#000000" />
<TextBox Template="{StaticResource TextBox9x}" x:Name="PART_EditableTextBox" />
<Popup x:Name="Popup"
Placement="Bottom"
IsOpen="{TemplateBinding IsDropDownOpen}"
AllowsTransparency="True"
Focusable="False"
PopupAnimation="Slide">
<Grid x:Name="DropDown"
SnapsToDevicePixels="True"
MinWidth="{TemplateBinding ActualWidth}"
MaxHeight="{TemplateBinding MaxDropDownHeight}">
<Border x:Name="DropDownBorder"
BorderThickness="1">
<Border.BorderBrush>
<SolidColorBrush Color="{DynamicResource BorderMediumColor}" />
</Border.BorderBrush>
<Border.Background>
<SolidColorBrush Color="{DynamicResource ControlLightColor}" />
</Border.Background>
</Border> </Border>
<ScrollViewer Margin="4,6,4,6" </DockPanel>
SnapsToDevicePixels="True"> </DockPanel>
<StackPanel IsItemsHost="True"
KeyboardNavigation.DirectionalNavigation="Contained" />
</ScrollViewer>
</Grid>
</Popup>
</Grid> </Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="OuterRightBorder" Property="Background" Value="{StaticResource MediumGray}" />
<Setter TargetName="OuterBottomBorder" Property="Background" Value="{StaticResource MediumGray}" />
<Setter TargetName="OuterLeftBorder" Property="Background" Value="{StaticResource MediumGray}" />
<Setter TargetName="OuterTopBorder" Property="Background" Value="{StaticResource MediumGray}" />
<Setter TargetName="InnerRightBorder" Property="Background" Value="{StaticResource Gray}" />
<Setter TargetName="InnerBottomBorder" Property="Background" Value="{StaticResource Gray}" />
<Setter TargetName="InnerLeftBorder" Property="Background" Value="{StaticResource Gray}" />
<Setter TargetName="InnerTopBorder" Property="Background" Value="{StaticResource Gray}" />
<Setter TargetName="Border" Property="Margin" Value="1,1,0,0" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
<ControlTemplate x:Key="ComboBox9x" TargetType="{x:Type ComboBox}">
<DockPanel Grid.Row="2" Grid.Column="2" Margin="0,2" LastChildFill="True">
<Border DockPanel.Dock="Right" Background="#FFFFFF" Width="1" />
<Border DockPanel.Dock="Bottom" Background="#FFFFFF" Height="1" />
<Border DockPanel.Dock="Left" Background="{StaticResource MediumGray}" Width="1" />
<Border DockPanel.Dock="Top" Background="{StaticResource MediumGray}" Height="1" />
<DockPanel LastChildFill="True" Background="#FFFFFF">
<Border DockPanel.Dock="Right" Background="{StaticResource LightGray}" Width="1" />
<Border DockPanel.Dock="Bottom" Background="{StaticResource LightGray}" Height="1" />
<Border DockPanel.Dock="Left" Background="#000000" Width="1" />
<Border DockPanel.Dock="Top" Background="#000000" Height="1" />
<Grid>
<ToggleButton x:Name="ToggleButton"
Template="{StaticResource ComboBoxToggleButton}"
Grid.Column="2"
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay,
RelativeSource={RelativeSource TemplatedParent}}">
</ToggleButton>
<ContentPresenter x:Name="ContentSite"
IsHitTestVisible="False"
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
Margin="0,0,20,0"
VerticalAlignment="Stretch"
HorizontalAlignment="Left">
</ContentPresenter>
<TextBox x:Name="PART_EditableTextBox" Margin="0,2,20,2" BorderThickness="0" IsReadOnly="{TemplateBinding IsReadOnly}" />
<Popup x:Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsDropDownOpen}" AllowsTransparency="True" Focusable="False">
<Grid x:Name="DropDown" SnapsToDevicePixels="True" MinWidth="{TemplateBinding ActualWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
<Border x:Name="DropDownBorder" BorderThickness="1">
<Border.BorderBrush>
<SolidColorBrush Color="{DynamicResource ColorBlue}" />
</Border.BorderBrush>
<Border.Background>
<SolidColorBrush Color="{DynamicResource ColorLightBlue}" />
</Border.Background>
</Border>
<ScrollViewer SnapsToDevicePixels="True">
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
</ScrollViewer>
</Grid>
</Popup>
</Grid>
</DockPanel>
</DockPanel>
<ControlTemplate.Triggers>
<Trigger Property="HasItems"
Value="false">
<Setter TargetName="DropDownBorder"
Property="MinHeight"
Value="95" />
</Trigger>
<Trigger Property="IsGrouping"
Value="true">
<Setter Property="ScrollViewer.CanContentScroll"
Value="false" />
</Trigger>
<Trigger SourceName="Popup"
Property="AllowsTransparency"
Value="true">
<Setter TargetName="DropDownBorder"
Property="CornerRadius"
Value="4" />
<Setter TargetName="DropDownBorder"
Property="Margin"
Value="0,2,0,0" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style x:Key="{x:Type ComboBoxItem}"
TargetType="{x:Type ComboBoxItem}">
<Setter Property="SnapsToDevicePixels"
Value="true" />
<Setter Property="OverridesDefaultStyle"
Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
<Border x:Name="Border"
Padding="2"
SnapsToDevicePixels="true"
Background="Transparent">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="SelectionStates">
<VisualState x:Name="Unselected" />
<VisualState x:Name="Selected">
<Storyboard>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
Storyboard.TargetProperty="(Panel.Background).
(SolidColorBrush.Color)">
<EasingColorKeyFrame KeyTime="0"
Value="{StaticResource ColorBlue}" />
</ColorAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="SelectedUnfocused">
<Storyboard>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
Storyboard.TargetProperty="(Panel.Background).
(SolidColorBrush.Color)">
<EasingColorKeyFrame KeyTime="0"
Value="{StaticResource ColorMediumGray}" />
</ColorAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<ContentPresenter />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="TabControl9x" TargetType="{x:Type TabControl}"> <ControlTemplate x:Key="TabControl9x" TargetType="{x:Type TabControl}">
<Grid KeyboardNavigation.TabNavigation="Local" Margin="8"> <Grid KeyboardNavigation.TabNavigation="Local" Margin="8">
<Grid.RowDefinitions> <Grid.RowDefinitions>

View File

@@ -1,8 +1,5 @@
using System.Configuration; using System.Windows;
using System.Data;
using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Media;
namespace ServiceBus95; namespace ServiceBus95;

View File

@@ -1,6 +1,6 @@
using System.Windows; using System.Windows;
[assembly:ThemeInfo( [assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page, //(used if a resource is not found in the page,
// or application resource dictionaries) // or application resource dictionaries)

View File

@@ -1 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>

View File

@@ -1,5 +1,4 @@
using System.Windows; using System.Windows;
using Azure.Messaging.ServiceBus;
using Microsoft.Win32; using Microsoft.Win32;
namespace ServiceBus95; namespace ServiceBus95;
@@ -55,7 +54,7 @@ public partial class MainWindow : Window
private void CheckIfDirty(object sender, System.Windows.Input.ExecutedRoutedEventArgs e) private void CheckIfDirty(object sender, System.Windows.Input.ExecutedRoutedEventArgs e)
{ {
} }
private bool WarnOnSave() private bool WarnOnSave()

View File

@@ -1,17 +1,4 @@
using System; using System.Windows.Controls;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ServiceBus95 namespace ServiceBus95
{ {

View File

@@ -1,17 +1,4 @@
using System; using System.Windows.Controls;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ServiceBus95 namespace ServiceBus95
{ {

View File

@@ -1,17 +1,7 @@
using System; using System.Diagnostics;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows; using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents; using System.Windows.Documents;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace ServiceBus95 namespace ServiceBus95
{ {