refactor: extract HealthBanner + promote converters to theme — Phase 2, Commit 13
HealthBanner.xaml takes the Row 1 YouTube-health banner (report-by-exception). Converters: promoted the 7 value<->visibility converters (BoolToVis, Inverse, NotNull, Null, Hidden, EnumToBool, AllTrueToVis) from MainWindow.Window.Resources into Themes/Controls.xaml so extracted UserControls can resolve them. AGENTS rule: controls cannot reach into a window's own named resources; they resolve from the app-level merged theme instead. Promoted all of them (not just NotNullToVis) so every pending extraction keeps working without window-level references. Zero behavior change; build 0 warnings; 246 pass, only the 2 known failures. Docs: ViewModels/index.md Phase 2 tracker updated in the same commit.
This commit is contained in:
+13
-1
@@ -1,5 +1,6 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Helpers="clr-namespace:ytLive.Helpers">
|
||||
|
||||
<!-- Base button style -->
|
||||
<Style x:Key="YtButton" TargetType="Button">
|
||||
@@ -631,4 +632,15 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- Value-to-visibility converters, promoted from MainWindow.Window.Resources
|
||||
so extracted UserControls can resolve them (AGENTS: controls must not
|
||||
reach into a window's own resources; they share the app-level theme). -->
|
||||
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
|
||||
<Helpers:InverseBoolToVisibilityConverter x:Key="InverseBoolToVis"/>
|
||||
<Helpers:NotNullToVisibilityConverter x:Key="NotNullToVis"/>
|
||||
<Helpers:NullToVisibilityConverter x:Key="NullToVis"/>
|
||||
<Helpers:HiddenBoolToVisibilityConverter x:Key="HiddenBoolToVis"/>
|
||||
<Helpers:EnumToBoolConverter x:Key="EnumToBool"/>
|
||||
<Helpers:AllTrueToVisibilityConverter x:Key="AllTrueToVis"/>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
Reference in New Issue
Block a user