Skip to content

Commit

Permalink
Add operational Color Selector, needs tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPulman committed Apr 22, 2024
1 parent be74cc2 commit 7108bf5
Show file tree
Hide file tree
Showing 131 changed files with 7,747 additions and 3,174 deletions.
6 changes: 6 additions & 0 deletions src/CrissCross.WPF.UI.Test/Views/Pages/DashboardPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ui:Button
Grid.Column="0"
Expand Down Expand Up @@ -65,5 +66,10 @@
Grid.Row="1"
Grid.Column="4"
Content="I Am A Standard CheckBox" />
<ui:StandardColorPicker
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="3"
Width="300" />
</Grid>
</Page>
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public static void Apply(
SystemTheme.HC1 => "HC1",
SystemTheme.HC2 => "HC2",
SystemTheme.HCBlack => "HCBlack",
SystemTheme.HCWhite => "HCWhite",
_ => "HCWhite",
};
break;
Expand Down
4 changes: 2 additions & 2 deletions src/CrissCross.WPF.UI/Appearance/SystemThemeWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace CrissCross.WPF.UI.Appearance;

/// <summary>
/// Automatically updates the application background if the system theme or color is changed.
/// <para><see cref="SystemThemeWatcher"/> settings work globally and cannot be changed for each <see cref="System.Windows.Window"/>.</para>
/// <para><see cref="SystemThemeWatcher"/> settings work globally and cannot be changed for each <see cref="Window"/>.</para>
/// </summary>
/// <example>
/// <code lang="csharp">
Expand Down Expand Up @@ -74,7 +74,7 @@ public static void Watch(
/// Unwatches the window and removes the hook to receive messages from the system.
/// </summary>
/// <param name="window">The window.</param>
/// <exception cref="System.InvalidOperationException">
/// <exception cref="InvalidOperationException">
/// You cannot unwatch a window that is not yet loaded.
/// or
/// Could not get window handle.
Expand Down
10 changes: 5 additions & 5 deletions src/CrissCross.WPF.UI/Appearance/WindowBackgroundManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static class WindowBackgroundManager
/// Tries to apply dark theme to <see cref="Window" />.
/// </summary>
/// <param name="window">The window.</param>
public static void ApplyDarkThemeToWindow(System.Windows.Window? window)
public static void ApplyDarkThemeToWindow(Window? window)
{
if (window is null)
{
Expand All @@ -43,14 +43,14 @@ public static void ApplyDarkThemeToWindow(System.Windows.Window? window)
_ = UnsafeNativeMethods.ApplyWindowDarkMode(window);
}

window.Loaded += (sender, _) => UnsafeNativeMethods.ApplyWindowDarkMode(sender as System.Windows.Window);
window.Loaded += (sender, _) => UnsafeNativeMethods.ApplyWindowDarkMode(sender as Window);
}

/// <summary>
/// Tries to remove dark theme from <see cref="System.Windows.Window" />.
/// Tries to remove dark theme from <see cref="Window" />.
/// </summary>
/// <param name="window">The window.</param>
public static void RemoveDarkThemeFromWindow(System.Windows.Window? window)
public static void RemoveDarkThemeFromWindow(Window? window)
{
if (window is null)
{
Expand Down Expand Up @@ -107,7 +107,7 @@ public static void UpdateBackground(

foreach (var subWindow in window.OwnedWindows)
{
if (subWindow is System.Windows.Window windowSubWindow)
if (subWindow is Window windowSubWindow)
{
_ = WindowBackdrop.ApplyBackdrop(windowSubWindow, backdrop);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace CrissCross.WPF.UI.Controls;
[TemplatePart(Name = ElementTextBox, Type = typeof(TextBox))]
[TemplatePart(Name = ElementSuggestionsPopup, Type = typeof(Popup))]
[TemplatePart(Name = ElementSuggestionsList, Type = typeof(ListView))]
public class AutoSuggestBox : System.Windows.Controls.ItemsControl, IIconControl
public class AutoSuggestBox : ItemsControl, IIconControl
{
/// <summary>
/// Property for <see cref="OriginalItemsSource"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace CrissCross.WPF.UI.Controls;
/// <summary>
/// BreadcrumbBarItemClickedEventArgs.
/// </summary>
/// <seealso cref="System.Windows.RoutedEventArgs" />
/// <seealso cref="RoutedEventArgs" />
/// <remarks>
/// Initializes a new instance of the <see cref="BreadcrumbBarItemClickedEventArgs"/> class.
/// </remarks>
Expand Down
Loading

0 comments on commit 7108bf5

Please sign in to comment.