Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color picker wpf #37149

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix style
  • Loading branch information
mantaionut committed Jan 27, 2025
commit 7afe2f6c8dbf5836b401b5f972e0e965c5fd70ac
1 change: 0 additions & 1 deletion src/modules/colorPicker/ColorPickerUI/App.xaml
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
x:Class="ColorPickerUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
ThemeMode="System"
StartupUri="MainWindow.xaml">
<Application.Resources>
3 changes: 1 addition & 2 deletions src/modules/colorPicker/ColorPickerUI/ColorEditorWindow.xaml
Original file line number Diff line number Diff line change
@@ -7,10 +7,9 @@
xmlns:e="http://schemas.microsoft.com/xaml/behaviors"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:p="clr-namespace:ColorPicker.Properties"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
Width="440"
Height="380"

AutomationProperties.Name="{x:Static p:Resources.cp_editor}"
ResizeMode="NoResize"
Topmost="True"
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@
xmlns:local="clr-namespace:ColorPicker"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:p="clr-namespace:ColorPicker.Properties"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
mc:Ignorable="d">
<UserControl.Resources>
<Style x:Key="ReadonlyTextBoxStyle" TargetType="{x:Type TextBox}">
@@ -128,7 +127,10 @@
Height="48"
Margin="0,0,0,8"
HorizontalAlignment="Stretch"
BorderThickness="1">
Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="{DynamicResource ControlCornerRadius}">
<Grid Margin="12,0,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="48" />
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@
xmlns:helpers="clr-namespace:ColorPicker.Helpers"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:p="clr-namespace:ColorPicker.Properties"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
AutomationProperties.Name="{x:Static p:Resources.Color_Palette}"
FocusManager.IsFocusScope="True"
KeyboardNavigation.TabNavigation="Once"
@@ -218,19 +217,20 @@
Margin="24,0,0,0"
Closed="DetailsFlyout_Closed"
Opened="DetailsFlyout_Opened"
AllowsTransparency="True"
StaysOpen="False"
Placement="Top">
<Border
CornerRadius="10"
Padding="15">
<Border.Background>
<SolidColorBrush Color="{StaticResource ApplicationBackgroundColor}" />
<SolidColorBrush Color="{DynamicResource ApplicationBackgroundColor}" />
</Border.Background>
<Grid x:Name="detailsGrid" KeyboardNavigation.TabNavigation="Contained">
<Grid.Background>
<SolidColorBrush Color="{StaticResource ApplicationBackgroundColor}" />
</Grid.Background>
<Grid.ColumnDefinitions>
<Grid.Background>
<SolidColorBrush Color="{DynamicResource ApplicationBackgroundColor}" />
</Grid.Background>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="44" />
<ColumnDefinition Width="86" />
<ColumnDefinition Width="86" />
@@ -375,7 +375,7 @@
Grid.ColumnSpan="4"
Margin="0,32,0,0"
HorizontalAlignment="Stretch"
Background="{DynamicResource {x:Static SystemColors.AccentColorBrushKey}}"
Background="{DynamicResource PrimaryBrush}"
AutomationProperties.Name="{x:Static p:Resources.Select}"
Click="OKButton_Click"
Content="{x:Static p:Resources.Select}" />
4 changes: 3 additions & 1 deletion src/modules/colorPicker/ColorPickerUI/Resources/Styles.xaml
Original file line number Diff line number Diff line change
@@ -10,7 +10,9 @@
<converters:ColorToStringConverter x:Key="colorToStringConverter" />
<converters:NumberToVisibilityConverter x:Key="numberToVisibilityConverter" />
<converters:NumberToInvertedVisibilityConverter x:Key="numberToInvertedVisibilityConverter" />


<SolidColorBrush x:Key="PrimaryBrush" Color="#FF00CC6A" />

<Style x:Key="SubtleButtonStyle" TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{DynamicResource DefaultControlFocusVisualStyle}" />
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:p="clr-namespace:ColorPicker.Properties"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
x:Name="colorEditorControl"
mc:Ignorable="d">
<Grid>
@@ -30,7 +29,6 @@
ToolTipService.ToolTip="{x:Static p:Resources.Pick_color}">

<StackPanel Orientation="Horizontal">
<!-- Replace WpfUI's SymbolIcon with a TextBlock using Segoe MDL2 Assets: -->
<TextBlock
FontFamily="Segoe Fluent Icons, Segoe MDL2 Assets"
Text="&#xef3c;"/>
1 change: 0 additions & 1 deletion src/modules/colorPicker/ColorPickerUI/Views/ZoomView.xaml
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@
xmlns:e="http://schemas.microsoft.com/xaml/behaviors"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:shaders="clr-namespace:ColorPicker.Shaders"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
Background="Transparent"
Focusable="False"
mc:Ignorable="d">