Skip to content

Commit ecc87d0

Browse files
Merge pull request #82 from atc-net/feature/maintenance
Feature/maintenance
2 parents 4bfb9bc + eeaff35 commit ecc87d0

File tree

65 files changed

+741
-240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+741
-240
lines changed

Atc.Wpf.sln

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{133AFD8A-A
3232
README.md = README.md
3333
EndProjectSection
3434
EndProject
35+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atc.Wpf.Theming.Tests", "test\Atc.Wpf.Theming.Tests\Atc.Wpf.Theming.Tests.csproj", "{4E2CF798-516C-4A4B-8240-04476E6A9F65}"
36+
EndProject
3537
Global
3638
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3739
Debug|Any CPU = Debug|Any CPU
@@ -70,6 +72,10 @@ Global
7072
{BB036D9C-2C70-40FD-B997-338A46EE91AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
7173
{BB036D9C-2C70-40FD-B997-338A46EE91AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
7274
{BB036D9C-2C70-40FD-B997-338A46EE91AC}.Release|Any CPU.Build.0 = Release|Any CPU
75+
{4E2CF798-516C-4A4B-8240-04476E6A9F65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
76+
{4E2CF798-516C-4A4B-8240-04476E6A9F65}.Debug|Any CPU.Build.0 = Debug|Any CPU
77+
{4E2CF798-516C-4A4B-8240-04476E6A9F65}.Release|Any CPU.ActiveCfg = Release|Any CPU
78+
{4E2CF798-516C-4A4B-8240-04476E6A9F65}.Release|Any CPU.Build.0 = Release|Any CPU
7379
EndGlobalSection
7480
GlobalSection(SolutionProperties) = preSolution
7581
HideSolutionNode = FALSE
@@ -83,9 +89,10 @@ Global
8389
{79029D19-6EB8-4E59-9CD1-72B08B301BF6} = {2C893B25-2401-44B7-9FDA-7DC496C00D2B}
8490
{A44E762D-9D36-462E-91DC-FDA18058556F} = {4E909F95-FAC5-4A3F-AEC6-DEAB535BEC64}
8591
{BB036D9C-2C70-40FD-B997-338A46EE91AC} = {0FA723AA-8BA7-42AD-9C08-6491F364A258}
92+
{4E2CF798-516C-4A4B-8240-04476E6A9F65} = {2C893B25-2401-44B7-9FDA-7DC496C00D2B}
8693
EndGlobalSection
8794
GlobalSection(ExtensibilityGlobals) = postSolution
88-
RESX_Rules = {"EnabledRules":["StringFormat","WhiteSpaceLead","WhiteSpaceTail","PunctuationTail"]}
8995
SolutionGuid = {7A92D7EC-F444-456B-A86C-D6683E016C35}
96+
RESX_Rules = {"EnabledRules":["StringFormat","WhiteSpaceLead","WhiteSpaceTail","PunctuationTail"]}
9097
EndGlobalSection
9198
EndGlobal

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@
4747
<ItemGroup Label="Code Analyzers">
4848
<PackageReference Include="AsyncFixer" Version="1.6.0" PrivateAssets="All" />
4949
<PackageReference Include="Asyncify" Version="0.9.7" PrivateAssets="All" />
50-
<PackageReference Include="Meziantou.Analyzer" Version="2.0.84" PrivateAssets="All" />
50+
<PackageReference Include="Meziantou.Analyzer" Version="2.0.98" PrivateAssets="All" />
5151
<PackageReference Include="SecurityCodeScan.VS2019" Version="5.6.7" PrivateAssets="All" />
5252
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507" PrivateAssets="All" />
53-
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.9.0.77355" PrivateAssets="All" />
53+
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.12.0.78982" PrivateAssets="All" />
5454
</ItemGroup>
5555

5656
</Project>

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ but just with a xaml-markup extension to lookup the value by key.
180180
| Null -> UnsetValue | NullToUnsetValueConverter | NULL -> DependencyProperty.UnsetValue | Object -> DependencyProperty.UnsetValue |
181181
| Object -> Bool | ObjectNotNullToBoolValueConverter | NotNULL -> True | Not supported |
182182
| Object -> Visibility | ObjectNotNullToVisibilityVisibleValueConverter | NotNULL -> Visible | Not supported |
183+
| Object -> Visibility | ObjectNullToVisibilityCollapsedValueConverter | NULL -> Collapsed | Not supported |
183184
| Object -> Bool | ObjectNullToBoolValueConverter | NULL => True | Not supported |
184185

185186
### ValueConverters - Markup to X
@@ -201,6 +202,7 @@ but just with a xaml-markup extension to lookup the value by key.
201202
| Int -> Visibility | IntegerGreaterThenZeroToVisibilityVisibleValueConverter | 0 -> Collapsed and 1 -> Visible | Not supported |
202203
| Int -> TimeSpan | IntegerToTimeSpanValueConverter | 100 -> TimeSpan.FromMilliseconds(100) | Not supported |
203204
| LogCategoryType -> Brush | LogCategoryTypeToBrushValueConverter | Information -> Green | Not supported |
205+
| LogCategoryType -> Color | LogCategoryTypeToColorValueConverter | Information -> Green | Not supported |
204206
| | ObservableDictionaryToDictionaryOfStringsValueConverter | | |
205207
| | ThicknessBindingValueConverter | | DependencyProperty.UnsetValue |
206208
| | ThicknessFilterValueConverter | | DependencyProperty.UnsetValue |

sample/Atc.Wpf.Sample/Atc.Wpf.Sample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</ItemGroup>
2525

2626
<ItemGroup>
27-
<PackageReference Include="Atc" Version="2.0.349" />
27+
<PackageReference Include="Atc" Version="2.0.380" />
2828
<PackageReference Include="ControlzEx" Version="6.0.0" />
2929
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0-preview.6.23329.7" />
3030
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0-preview.6.23329.7" />

sample/Atc.Wpf.Sample/SamplesWpfControls/DialogBoxes/StandardDialogBoxView.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
Orientation="Vertical"
3636
Spacing="10">
3737
<Button Command="{Binding Path=ShowInfoDialogBoxCommand}" Content="Info" />
38+
<Button Command="{Binding Path=ShowInfoWarningDialogBoxCommand}" Content="Warning" />
39+
<Button Command="{Binding Path=ShowInfoErrorDialogBoxCommand}" Content="Error" />
3840
<Button Command="{Binding Path=ShowQuestionDialogBoxCommand}" Content="Question" />
3941
<Button Command="{Binding Path=ShowInputDialogBoxCommand}" Content="Input" />
4042
<Button Command="{Binding Path=ShowInputForm1ColumnDialogBoxCommand}" Content="Input Form 1 columns" />

sample/Atc.Wpf.Sample/SamplesWpfControls/DialogBoxes/StandardDialogBoxViewModel.cs

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ public StandardDialogBoxViewModel()
1616

1717
public IRelayCommand ShowInfoDialogBoxCommand => new RelayCommand(ShowInfoDialogBoxCommandHandler);
1818

19+
public IRelayCommand ShowInfoWarningDialogBoxCommand => new RelayCommand(ShowInfoWarningDialogBoxCommandHandler);
20+
21+
public IRelayCommand ShowInfoErrorDialogBoxCommand => new RelayCommand(ShowInfoErrorDialogBoxCommandHandler);
22+
1923
public IRelayCommand ShowQuestionDialogBoxCommand => new RelayCommand(ShowQuestionDialogBoxCommandHandler);
2024

2125
public IRelayCommand ShowInputDialogBoxCommand => new RelayCommand(ShowInputDialogBoxCommandHandler);
@@ -68,7 +72,39 @@ private void ShowInfoDialogBoxCommandHandler()
6872
{
6973
TitleBarText = "This is a information",
7074
},
71-
"Hello world");
75+
"Hello information");
76+
77+
var dialogResult = dialogBox.ShowDialog();
78+
JsonResult = dialogResult.HasValue && dialogResult.Value
79+
? CreateJson(dialogBox.Settings.AffirmativeButtonText)
80+
: CreateJson(dialogBox.Settings.NegativeButtonText);
81+
}
82+
83+
private void ShowInfoWarningDialogBoxCommandHandler()
84+
{
85+
var dialogBox = new InfoDialogBox(
86+
Application.Current.MainWindow!,
87+
new DialogBoxSettings(DialogBoxType.Ok, LogCategoryType.Warning)
88+
{
89+
TitleBarText = "This is a warning",
90+
},
91+
"Hello warning");
92+
93+
var dialogResult = dialogBox.ShowDialog();
94+
JsonResult = dialogResult.HasValue && dialogResult.Value
95+
? CreateJson(dialogBox.Settings.AffirmativeButtonText)
96+
: CreateJson(dialogBox.Settings.NegativeButtonText);
97+
}
98+
99+
private void ShowInfoErrorDialogBoxCommandHandler()
100+
{
101+
var dialogBox = new InfoDialogBox(
102+
Application.Current.MainWindow!,
103+
new DialogBoxSettings(DialogBoxType.Ok, LogCategoryType.Error)
104+
{
105+
TitleBarText = "This is a error",
106+
},
107+
"Hello error");
72108

73109
var dialogResult = dialogBox.ShowDialog();
74110
JsonResult = dialogResult.HasValue && dialogResult.Value

sample/Atc.Wpf.Sample/SamplesWpfControls/LabelControls/LabelDateTimePickerView.xaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,22 @@
3535
<atc:LabelDateTimePicker
3636
LabelText="MyLabel3"
3737
Orientation="Horizontal"
38-
SelectedDate="8/25/2023" />
38+
TextDate="8/25/2023"
39+
TextTime="14:47" />
3940

4041
<atc:LabelDateTimePicker
4142
LabelText="MyLabel4"
4243
Orientation="Horizontal"
43-
SelectedDate="8/25/2023"
44+
TextDate="8/25/2023"
45+
TextTime="14:47"
4446
WatermarkText="Select a date" />
4547

4648
<atc:LabelDateTimePicker
4749
IsMandatory="True"
4850
LabelText="MyLabel5"
4951
Orientation="Horizontal"
50-
SelectedDate="8/25/2023"
52+
TextDate="8/25/2023"
53+
TextTime="14:47"
5154
WatermarkText="Select a date" />
5255

5356
</StackPanel>
@@ -62,8 +65,9 @@
6265
IsMandatory="True"
6366
LabelText="MyLabel7"
6467
Orientation="Vertical"
65-
SelectedDate="8/25/2023"
6668
SelectedDateFormat="Long"
69+
TextDate="Friday, August 25, 2023"
70+
TextTime="14:47"
6771
WatermarkText="Select a date" />
6872

6973
</StackPanel>

sample/Atc.Wpf.Sample/SamplesWpfControls/LabelControls/LabelTimePickerView.xaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@
3434
<atc:LabelTimePicker
3535
LabelText="MyLabel3"
3636
Orientation="Horizontal"
37-
SelectedTime="14:47" />
37+
Text="14:47" />
3838

3939
<atc:LabelTimePicker
4040
LabelText="MyLabel4"
4141
Orientation="Horizontal"
42-
SelectedTime="14:47"
42+
Text="14:47"
4343
WatermarkText="Select a time..." />
4444

4545
<atc:LabelTimePicker
4646
IsMandatory="True"
4747
LabelText="MyLabel5"
4848
Orientation="Horizontal"
49-
SelectedTime="14:47"
49+
Text="14:47"
5050
WatermarkText="Select a time..." />
5151

5252
</StackPanel>
@@ -58,7 +58,7 @@
5858
IsMandatory="True"
5959
LabelText="MyLabel7"
6060
Orientation="Vertical"
61-
SelectedTime="14:47"
61+
Text="14:47"
6262
WatermarkText="Select a time..." />
6363

6464
</StackPanel>

sample/Atc.Wpf.Sample/SamplesWpfControls/Layouts/DividerView.xaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,28 @@
2323
<atc:SvgImage
2424
Width="50"
2525
Height="50"
26-
Source="/Atc.Wpf.Controls;component/Resources/info_help.svg" />
26+
Source="/Atc.Wpf.Controls;component/Resources/Icons/info_help.svg" />
2727

2828
<atc:Divider Orientation="Vertical" />
2929

3030
<atc:SvgImage
3131
Width="50"
3232
Height="50"
33-
Source="/Atc.Wpf.Controls;component/Resources/info_help.svg" />
33+
Source="/Atc.Wpf.Controls;component/Resources/Icons/info_help.svg" />
3434

3535
<atc:Divider LineStroke="Orange" Orientation="Vertical" />
3636

3737
<atc:SvgImage
3838
Width="50"
3939
Height="50"
40-
Source="/Atc.Wpf.Controls;component/Resources/info_help.svg" />
40+
Source="/Atc.Wpf.Controls;component/Resources/Icons/info_help.svg" />
4141

4242
<atc:Divider LineStrokeDashArray="5" Orientation="Vertical" />
4343

4444
<atc:SvgImage
4545
Width="50"
4646
Height="50"
47-
Source="/Atc.Wpf.Controls;component/Resources/info_help.svg" />
47+
Source="/Atc.Wpf.Controls;component/Resources/Icons/info_help.svg" />
4848
</StackPanel>
4949

5050
<atc:Divider
@@ -57,7 +57,7 @@
5757
<atc:SvgImage
5858
Width="50"
5959
Height="50"
60-
Source="/Atc.Wpf.Controls;component/Resources/info_help.svg" />
60+
Source="/Atc.Wpf.Controls;component/Resources/Icons/info_help.svg" />
6161

6262
<atc:Divider
6363
LineStroke="Chocolate"

sample/Atc.Wpf.Sample/SamplesWpfFontIcons/FontIconViewerView.xaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,14 @@
108108

109109
<GroupBox Header="Usage">
110110

111-
<atc:BusyOverlay IsBusy="{Binding ElementName=UcFontIconViewerView, Path=IsBusy, Mode=OneWay}">
111+
<atc:BusyOverlay DisplayAfter="0" IsBusy="{Binding ElementName=UcFontIconViewerView, Path=IsBusy, Mode=OneWay}">
112112
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
113113
<WrapPanel
114114
x:Name="ListOfIcons"
115-
VirtualizingStackPanel.IsVirtualizing="True"
116-
VirtualizingStackPanel.VirtualizationMode="Recycling" />
115+
VirtualizingPanel.IsContainerVirtualizable="True"
116+
VirtualizingPanel.IsVirtualizing="True"
117+
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
118+
VirtualizingPanel.VirtualizationMode="Recycling" />
117119
</ScrollViewer>
118120
</atc:BusyOverlay>
119121

sample/Atc.Wpf.Sample/SamplesWpfFontIcons/FontIconViewerView.xaml.cs

Lines changed: 23 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -70,26 +70,20 @@ private void IconColorPickerOnSelectorChanged(
7070
return;
7171
}
7272

73-
using var worker = new BackgroundWorker();
74-
worker.DoWork += (_, _) =>
75-
{
76-
_ = Application.Current.Dispatcher.BeginInvoke(() =>
73+
IsBusy = true;
74+
75+
_ = Application.Current.Dispatcher.BeginInvoke(
76+
new Action(() =>
7777
{
7878
ListOfIcons.Children.Clear();
7979

8080
UiPopulateListOfIcons();
8181

8282
UiFilterListOfIcons(FilterText.Text);
83-
});
84-
};
85-
86-
worker.RunWorkerCompleted += (_, _) =>
87-
{
88-
_ = Application.Current.Dispatcher.BeginInvoke(() => IsBusy = false);
89-
};
9083

91-
IsBusy = true;
92-
worker.RunWorkerAsync();
84+
IsBusy = false;
85+
}),
86+
DispatcherPriority.Background);
9387
}
9488

9589
private void FilterCheckBoxOnIsCheckedChanged(
@@ -126,19 +120,16 @@ private void FilterOnTextChanged(
126120

127121
private void PopulateListOfIcons()
128122
{
129-
using var worker = new BackgroundWorker();
130-
worker.DoWork += (_, _) =>
131-
{
132-
_ = Application.Current.Dispatcher.BeginInvoke(UiPopulateListOfIcons);
133-
};
123+
IsBusy = true;
134124

135-
worker.RunWorkerCompleted += (_, _) =>
136-
{
137-
_ = Application.Current.Dispatcher.BeginInvoke(() => IsBusy = false);
138-
};
125+
_ = Application.Current.Dispatcher.BeginInvoke(
126+
new Action(() =>
127+
{
128+
UiPopulateListOfIcons();
139129

140-
IsBusy = true;
141-
worker.RunWorkerAsync();
130+
IsBusy = false;
131+
}),
132+
DispatcherPriority.Background);
142133
}
143134

144135
private void UiPopulateListOfIcons()
@@ -205,19 +196,16 @@ private void FilterListOfIcons(
205196
return;
206197
}
207198

208-
using var worker = new BackgroundWorker();
209-
worker.DoWork += (_, _) =>
210-
{
211-
_ = Application.Current.Dispatcher.BeginInvoke(() => UiFilterListOfIcons(filterText));
212-
};
199+
IsBusy = true;
213200

214-
worker.RunWorkerCompleted += (_, _) =>
215-
{
216-
_ = Application.Current.Dispatcher.BeginInvoke(() => IsBusy = false);
217-
};
201+
_ = Application.Current.Dispatcher.BeginInvoke(
202+
new Action(() =>
203+
{
204+
UiFilterListOfIcons(filterText);
218205

219-
IsBusy = true;
220-
worker.RunWorkerAsync();
206+
IsBusy = false;
207+
}),
208+
DispatcherPriority.Background);
221209
}
222210

223211
private void UiFilterListOfIcons(

src/Atc.Wpf.Controls/Atc.Wpf.Controls.csproj

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
<None Remove="Resources\collapse.svg" />
1414
<None Remove="Resources\expand.svg" />
1515
<None Remove="Resources\information.svg" />
16+
<None Remove="Resources\LogCategoryIcons\error.svg" />
17+
<None Remove="Resources\LogCategoryIcons\warning.svg" />
1618
<None Remove="Resources\question-mark.svg" />
1719
<None Remove="Resources\question.svg" />
1820
</ItemGroup>
1921

2022
<ItemGroup>
21-
<PackageReference Include="Atc" Version="2.0.349" />
23+
<PackageReference Include="Atc" Version="2.0.380" />
2224
</ItemGroup>
2325

2426
<ItemGroup>
@@ -27,11 +29,13 @@
2729
</ItemGroup>
2830

2931
<ItemGroup>
30-
<Resource Include="Resources\collapse.svg" />
31-
<Resource Include="Resources\expand.svg" />
32-
<Resource Include="Resources\information.svg" />
33-
<Resource Include="Resources\info_help.svg" />
34-
<Resource Include="Resources\question-mark.svg" />
32+
<Resource Include="Resources\Icons\collapse.svg" />
33+
<Resource Include="Resources\Icons\expand.svg" />
34+
<Resource Include="Resources\LogCategoryIcons\information.svg" />
35+
<Resource Include="Resources\Icons\info_help.svg" />
36+
<Resource Include="Resources\Icons\question-mark.svg" />
37+
<Resource Include="Resources\LogCategoryIcons\error.svg" />
38+
<Resource Include="Resources\LogCategoryIcons\warning.svg" />
3539
</ItemGroup>
3640

3741
<ItemGroup>

0 commit comments

Comments
 (0)