Skip to content

Commit

Permalink
Moving types from public to internal + bug fix for Window caption
Browse files Browse the repository at this point in the history
  • Loading branch information
pchaurasia14 committed Dec 19, 2023
1 parent 860903a commit dc3cccb
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 177 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'S
CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerSerializationVisibilityAttribute' on 'System.Windows.FrameworkTemplate.Resources' changed from '[DesignerSerializationVisibilityAttribute(2)]' in the contract to '[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Content)]' in the implementation.
MembersMustExist : Member 'internal void System.Windows.FrameworkTemplate.SetTargetTypeInternal(System.Type)' does not exist in the implementation but it does exist in the contract.
CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.HorizontalAlignment' changed from '[LocalizabilityAttribute(0, Readability=0)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable)]' in the implementation.
TypesMustExist : Type 'System.Windows.IThemeControl' does not exist in the implementation but it does exist in the contract.
CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerSerializationVisibilityAttribute' on 'System.Windows.MultiDataTrigger.Conditions' changed from '[DesignerSerializationVisibilityAttribute(2)]' in the contract to '[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Content)]' in the implementation.
CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerSerializationVisibilityAttribute' on 'System.Windows.MultiDataTrigger.Setters' changed from '[DesignerSerializationVisibilityAttribute(2)]' in the contract to '[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Content)]' in the implementation.
CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerSerializationVisibilityAttribute' on 'System.Windows.MultiTrigger.Conditions' changed from '[DesignerSerializationVisibilityAttribute(2)]' in the contract to '[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Content)]' in the implementation.
Expand Down Expand Up @@ -77,10 +76,7 @@ TypesMustExist : Type 'System.Windows.Appearance.ApplicationAccentColorManager'
TypesMustExist : Type 'System.Windows.Appearance.ApplicationTheme' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Windows.Appearance.ApplicationThemeManager' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Windows.Appearance.SystemTheme' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Windows.Appearance.SystemThemeManager' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Windows.Appearance.SystemThemeWatcher' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Windows.Appearance.ThemeChangedEvent' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Windows.Appearance.WindowBackgroundManager' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'internal System.Collections.Generic.List<System.Windows.Automation.Peers.AutomationPeer> System.Windows.Automation.Peers.ContentTextAutomationPeer.GetAutomationPeersFromRange(System.Windows.Documents.ITextPointer, System.Windows.Documents.ITextPointer)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'internal System.Collections.Generic.List<System.Windows.Automation.Peers.AutomationPeer> System.Windows.Automation.Peers.TextAutomationPeer.GetAutomationPeersFromRange(System.Windows.Documents.ITextPointer, System.Windows.Documents.ITextPointer)' does not exist in the implementation but it does exist in the contract.
CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.Controls.AccessText.FontFamily' changed from '[LocalizabilityAttribute(14, Modifiability=0)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.Font, Modifiability=Modifiability.Unmodifiable)]' in the implementation.
Expand Down Expand Up @@ -304,9 +300,7 @@ CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerSerializationVi
CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.Documents.TextElement.FontFamily' changed from '[LocalizabilityAttribute(14, Modifiability=0)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.Font, Modifiability=Modifiability.Unmodifiable)]' in the implementation.
CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.Documents.TextElement.FontSize' changed from '[LocalizabilityAttribute(0)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.None)]' in the implementation.
CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Windows.Documents.TextElementEditingBehaviorAttribute' changed from '[AttributeUsageAttribute(4)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Class)]' in the implementation.
TypesMustExist : Type 'System.Windows.Extensions.ColorExtensions' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Windows.Hardware.DisplayDpi' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Windows.Hardware.RenderingTier' does not exist in the implementation but it does exist in the contract.
CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.DependencyProperty System.Windows.Input.KeyboardNavigation.ControlTabNavigationProperty' changed from '[LocalizabilityAttribute(17)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.NeverLocalize)]' in the implementation.
CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.DependencyProperty System.Windows.Input.KeyboardNavigation.DirectionalNavigationProperty' changed from '[LocalizabilityAttribute(17)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.NeverLocalize)]' in the implementation.
CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.DependencyProperty System.Windows.Input.KeyboardNavigation.TabNavigationProperty' changed from '[LocalizabilityAttribute(17)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.NeverLocalize)]' in the implementation.
Expand All @@ -324,4 +318,4 @@ CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerSerializationVi
CannotChangeAttribute : Attribute 'System.Windows.Markup.DesignerSerializationOptionsAttribute' on 'System.Windows.Markup.XmlAttributeProperties.GetXmlSpace(System.Windows.DependencyObject)' changed from '[DesignerSerializationOptionsAttribute(1)]' in the contract to '[DesignerSerializationOptionsAttribute(DesignerSerializationOptions.SerializeAsAttribute)]' in the implementation.
CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerSerializationVisibilityAttribute' on 'System.Windows.Media.Animation.Storyboard.GetTarget(System.Windows.DependencyObject)' changed from '[DesignerSerializationVisibilityAttribute(0)]' in the contract to '[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]' in the implementation.
CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.Shapes.Shape' changed from '[LocalizabilityAttribute(0, Readability=0)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable)]' in the implementation.
Total Issues: 325
Total Issues: 319

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,7 @@
<Compile Include="System\Windows\Appearance\WindowBackdrop.cs" />
<Compile Include="System\Windows\Extensions\ColorExtensions.cs" />
<Compile Include="System\Windows\Hardware\DisplayDpi.cs" />
<!-- <Compile Include="System\Windows\Hardware\DpiHelper.cs" /> -->
<Compile Include="System\Windows\Hardware\RenderingTier.cs" />
<Compile Include="System\Windows\WindowBackdropType.cs" />
<Compile Include="System\Windows\IThemeControl.cs" />
<Compile Include="System\Windows\Interop\Dwapi.cs" />
<Compile Include="System\Windows\Interop\Libraries.cs" />
<Compile Include="System\Windows\Interop\WinDef\POINT.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ public static void Apply(

Changed?.Invoke(applicationTheme, ApplicationAccentColorManager.SystemAccent);

// TODO - Why this check for MW only and not for all windows?

if (Application.Current.MainWindow is Window mainWindow)
{
WindowBackgroundManager.UpdateBackground(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace System.Windows.Appearance;
/// var currentWindowTheme = SystemThemeManager.GetCachedSystemTheme();
/// </code>
/// </example>
public static class SystemThemeManager
internal static class SystemThemeManager
{
private static SystemTheme _cachedTheme = SystemTheme.Unknown;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace System.Windows.Appearance;
/// );
/// </code>
/// </example>
public static class SystemThemeWatcher
internal static class SystemThemeWatcher
{
private static readonly ICollection<ObservedWindow> _observedWindows = new List<ObservedWindow>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ public static bool ApplyBackdrop(IntPtr hWnd, WindowBackdropType backdropType)
_ = UnsafeNativeMethodsWindow.RemoveWindowDarkMode(hWnd);
}

_ = UnsafeNativeMethodsWindow.RemoveWindowCaption(hWnd);
// BUG - This is causing TitleBar caption to be removed for normal windows
//_ = UnsafeNativeMethodsWindow.RemoveWindowCaption(hWnd);

// 22H1
if (!Utility.IsOSWindows11Insider1OrNewer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace System.Windows.Appearance;
/// );
/// </code>
/// </example>
public static class WindowBackgroundManager
internal static class WindowBackgroundManager
{
/// <summary>
/// Tries to apply dark theme to <see cref="Window"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace System.Windows.Extensions;
/// <summary>
/// Adds an extension for <see cref="System.Windows.Media.Color"/> that allows manipulation with HSL and HSV color spaces.
/// </summary>
public static class ColorExtensions
internal static class ColorExtensions
{
/// <summary>
/// Maximum <see cref="Byte"/> size with the current <see cref="Single"/> precision.
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace PresentationFramework.Win11.Controls
/// &lt;/Style&gt;
/// </code>
/// </example>
public class ClientAreaBorder : System.Windows.Controls.Border, IThemeControl
public class ClientAreaBorder : System.Windows.Controls.Border
{
private bool _borderBrushApplied = false;

Expand All @@ -63,7 +63,7 @@ public class ClientAreaBorder : System.Windows.Controls.Border, IThemeControl

private static Thickness? _windowChromeNonClientFrameThickness;

public ApplicationTheme ApplicationTheme { get; set; } = ApplicationTheme.Unknown;
private ApplicationTheme ApplicationTheme { get; set; } = ApplicationTheme.Unknown;

/// <summary>
/// Get the system <see cref="SM_CXPADDEDBORDER"/> value in WPF units.
Expand Down

0 comments on commit dc3cccb

Please sign in to comment.