Skip to content
This repository was archived by the owner on Dec 18, 2023. It is now read-only.

Commit da06099

Browse files
committed
update some files
1 parent c0b454d commit da06099

File tree

5 files changed

+42
-23
lines changed

5 files changed

+42
-23
lines changed

CookPopularCSharpToolkit/Communal/Extensions/IEnumerableExtension.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,17 @@ public static void ForEach<TSource>(this IEnumerable<TSource> source, Action<TSo
251251
}
252252
}
253253

254+
public static async void ForEach<TSource>(this IEnumerable<TSource> source, Func<TSource, System.Threading.Tasks.Task> action)
255+
{
256+
Contract.Requires(source != null);
257+
Contract.Requires(action != null);
258+
259+
foreach (TSource item in source)
260+
{
261+
await action(item);
262+
}
263+
}
264+
254265
/// <summary>
255266
/// Removes the last element from <paramref name="source"/>.
256267
/// </summary>

CookPopularControl/Controls/Fields/TextBoxBaseAssistant.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,12 @@ void OnTextBoxLoaded()
285285

286286
CheckShowToolTip();
287287

288-
textBoxBase.TextChanged += (s, e) => CheckShowToolTip();
288+
textBoxBase.TextChanged += (s, e) =>
289+
{
290+
if (textBlock != null)
291+
textBlock.Text = (e.Source as TextBox).Text;
292+
CheckShowToolTip();
293+
};
289294
}
290295

291296
void CheckShowToolTip()

CookPopularControl/Themes/ListViewStyle.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@
228228
</Setter>
229229
<Style.Triggers>
230230
<Trigger Property="IsKeyboardFocusWithin" Value="True">
231-
<Setter Property="BorderThickness" Value="0,0,0,2" />
231+
<Setter Property="BorderThickness" Value="0,0,0,1" />
232232
</Trigger>
233233
<Trigger Property="IsMouseOver" Value="True">
234234
<Setter Property="Background" Value="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListView}, Path=(common:SelectorAttached.ItemMouseOverBackground)}" />
@@ -266,6 +266,7 @@
266266
<Setter Property="HorizontalContentAlignment" Value="Left" />
267267
<Setter Property="VerticalContentAlignment" Value="Center" />
268268
<Setter Property="ItemContainerStyle" Value="{StaticResource ListViewGridViewItemStyle}" />
269+
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
269270
<Setter Property="pc:ListViewAssistant.ColumnHeaderHeight" Value="30" />
270271
<Setter Property="pc:ListViewAssistant.ListViewItemPadding" Value="0" />
271272
<Setter Property="pc:ListViewAssistant.IsColumnHeaderFontWeight" Value="False" />

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<Product>$(MSBuildProjectName)</Product>
3030
<Title>$(MSBuildProjectName)</Title>
3131
<Description>兼容.NetFramework与.NetCore/.Net的WPF控件库</Description>
32-
<Copyright>Copyright © $(MSBuildProjectName) 2019-2022</Copyright>
32+
<Copyright>Copyright © $(MSBuildProjectName) 2019-2023</Copyright>
3333
<PackageTags>xaml,wpf,ui,controls,windows,desktop,cookpopularcontrol,library</PackageTags>
3434
<RepositoryUrl>https://gitee.com/cook-csharp/$(MSBuildProjectName)</RepositoryUrl>
3535
<PackageProjectUrl>https://github.com/chancezheng/CookPopularControl</PackageProjectUrl>

Settings.XamlStyler

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,51 @@
1-
{
1+
{
22
/****************���Ը�ʽ��**************************/
3-
"AttributesTolerance": 3, //���������������2��Ĭ�ϡ������Ԫ�������������ڴ����Ͳ��ỻ��
3+
"AttributesTolerance": 3, //���������������2��Ĭ�ϡ������Ԫ�������������ڴ����Ͳ��ỻ��
44
"KeepFirstAttributeOnSameLine": true, //��һ�������Ƿ��뿪ʼ�����ͬһ�У�false��Ĭ�ϡ�
5-
"MaxAttributeCharactersPerLine": 100, //������Դ��ڶ��ٸ��ַ��͸û��У�0��Ĭ�ϡ�
6-
"MaxAttributesPerLine": 3, //���ڼ������Ծ͸û��У�1��Ĭ�ϡ�
5+
"MaxAttributeCharactersPerLine": 100, //������Դ��ڶ��ٸ��ַ��͸û��У�0��Ĭ�ϡ�
6+
"MaxAttributesPerLine": 3, //���ڼ������Ծ͸û��У�1��Ĭ�ϡ�
77
"NewlineExemptionElements": "RadialGradientBrush, GradientStop, LinearGradientBrush, ScaleTransform, SkewTransform, RotateTransform, TranslateTransform, Trigger, Condition, Setter, Geometry,",
88
"SeparateByGroups": true, //�Ƿ�Ӧ�ð������Եķ�����зָ���false��Ĭ�ϡ�
99
"AttributeIndentation": 0, //���������ո��ַ�����-1��������0��Ĭ�ϡ�����4���ո�����������ָ����
1010
"AttributeIndentationStyle": 1, //�����������0��ϣ������ʹ���Ʊ����Ϳո�1��Ĭ�ϡ�ʹ�ÿո�
11-
"RemoveDesignTimeReferences": false, //�Ƿ��Ƴ��Զ����ӵĿؼ������ʱ�ο����ݣ�false��Ĭ�ϡ�
11+
"RemoveDesignTimeReferences": false, //�Ƿ��Ƴ��Զ����ӵĿؼ������ʱ�ο����ݣ�false��Ĭ�ϡ�
1212
"EnableAttributeReordering": true, //�Ƿ��������Ե��Զ�����true��Ĭ�ϡ�
1313
"AttributeOrderingRuleGroups": [ //��������ͷ������
1414
"x:Class",
15+
"x:ClassModifier",
1516
"xmlns, xmlns:x",
1617
"xmlns:*",
1718
"x:Key, Key, x:Name, Name, x:Uid, Uid, TargetType, BasedOn, ",
18-
"mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText",
19-
"Title",
19+
"mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText, d:*",
20+
"Title",
2021
"Grid.Row, Grid.RowSpan, Grid.Column, Grid.ColumnSpan, Columns, Rows, Canvas.Left, Canvas.Top, Canvas.Right, Canvas.Bottom, DockPanel.Dock",
21-
"Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight",
22-
"Text, Content, Header, Data, ContextMenu,",
23-
"BorderBrush, BorderThickness",
22+
"Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight",
23+
"Text, Content, Header, Data, ContextMenu,",
24+
"BorderBrush, BorderThickness",
2425
"Foreground, Background, CornerRadius, Fill",
2526
"Command, CommandParameter, IsChecked, IsEnabled",
2627
"Source, Stretch, ImageSource",
2728
"FontSize, FontFamliy, FontWeight",
2829
"ContentTemplate,ContentStringFormat,ContentTemplateSelector",
2930
"ResizeBehavior, ResizeDirection,RecognizesAccessKey",
30-
"PageSource, PageIndex, Offset, Color, Binding, Property, Value, TargetName, StartPoint, EndPoint",
31+
"PageSource, PageIndex, Offset, Color, Binding, Property, Value, TargetName, StartPoint, EndPoint",
3132
"Minimum, Maximum",
3233
"Margin, Padding, Opacity, SnapsToDevicePixels, Focusable, ToolTip",
33-
"HorizontalAlignment, VerticalAlignment, HorizontalContentAlignment, VerticalContentAlignment, Panel.ZIndex",
34+
"HorizontalAlignment, VerticalAlignment, HorizontalContentAlignment, VerticalContentAlignment, Panel.ZIndex",
3435
"Storyboard.*,",
3536
"From, To, Duration, RepeatBehavior",
36-
"*:*, *",
37+
"*",
3738
"Visibility",
38-
"Style"
39+
"Style",
40+
"*:*"
3941
],
40-
"FirstLineAttributes": "x:Name,Grid.Row,Grid.Column", //Ӧ���ڵ�һ�е����ԣ�����Name x:Name ��x:Uid�ȵ�,None��Ĭ�ϡ�
42+
"FirstLineAttributes": "x:Name,Grid.Row,Grid.Column", //Ӧ���ڵ�һ�е����ԣ�����Name x:Name ��x:Uid�ȵ�,None��Ĭ�ϡ�
4143
"OrderAttributesByName": true, //�Ƿ����������ƽ�������
4244
/****************Ԫ�ظ�ʽ��**************************/
4345
"PutEndingBracketOnNewLine": false, //���������Ƿ��ռһ�У�false��Ĭ�ϡ�
4446
"RemoveEndingTagOfEmptyElement": true, //�Ƿ��Ƴ���Ԫ�صĽ�����ǩ��true��Ĭ�ϡ�
4547
"SpaceBeforeClosingSlash": true, //�Ապ�Ԫ�ص�ĩβб��ǰ�Ƿ�Ҫ�пո�true��Ĭ�ϡ�
46-
"RootElementLineBreakRule": 1, //�Ƿ񽫸�Ԫ�ص����Էֳɶ��У�0��Ĭ�ϡ���1ʼ�գ�2�Ӳ���
48+
"RootElementLineBreakRule": 1, //�Ƿ񽫸�Ԫ�ص����Էֳɶ��У�0��Ĭ�ϡ���1ʼ�գ�2�Ӳ���
4749
/****************Ԫ������**************************/
4850
"ReorderVSM": 2, //�Ƿ���������visual state Manager��0δ���壻1��Ĭ�ϡ��Ƶ����2�Ƶ���ǰ��
4951
"ReorderGridChildren": false, //�Ƿ���������Grid����Ԫ�أ�false��Ĭ�ϡ�
@@ -55,8 +57,8 @@
5557
"ThicknessSeparator": 2, //Thickness���͵�����Ӧ�������ַָ���(0����ʽ����1�ո�2��Ĭ�ϡ����ţ�
5658
"ThicknessAttributes": "Margin, Padding, BorderThickness, ThumbnailClipMargin", //���϶�ΪThickness��Ԫ��Ӧ������Щ
5759
"FormatOnSave": false, //�Ƿ��ڱ���ʱ���и�ʽ����true��Ĭ�ϡ�
58-
"CommentPadding": 2, //ע�͵ļ��Ӧ���Ǽ����ո�2��Ĭ�ϡ�
60+
"CommentPadding": 2, //ע�͵ļ��Ӧ���Ǽ����ո�2��Ĭ�ϡ�
5961
/****************����VS����**************************/
60-
"IndentSize": 4, //�����ո�����4��Ĭ�ϡ�
61-
"IndentWithTabs": false //�Ƿ�ʹ���Ʊ�������������false��Ĭ�ϡ�
62-
}
62+
"IndentSize": 4, //�����ո�����4��Ĭ�ϡ�
63+
"IndentWithTabs": false //�Ƿ�ʹ���Ʊ�������������false��Ĭ�ϡ�
64+
}

0 commit comments

Comments
 (0)