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

Commit

Permalink
update some files
Browse files Browse the repository at this point in the history
  • Loading branch information
chancezheng committed Apr 17, 2023
1 parent c0b454d commit da06099
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,17 @@ public static void ForEach<TSource>(this IEnumerable<TSource> source, Action<TSo
}
}

public static async void ForEach<TSource>(this IEnumerable<TSource> source, Func<TSource, System.Threading.Tasks.Task> action)
{
Contract.Requires(source != null);
Contract.Requires(action != null);

foreach (TSource item in source)
{
await action(item);
}
}

/// <summary>
/// Removes the last element from <paramref name="source"/>.
/// </summary>
Expand Down
7 changes: 6 additions & 1 deletion CookPopularControl/Controls/Fields/TextBoxBaseAssistant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,12 @@ void OnTextBoxLoaded()

CheckShowToolTip();

textBoxBase.TextChanged += (s, e) => CheckShowToolTip();
textBoxBase.TextChanged += (s, e) =>
{
if (textBlock != null)
textBlock.Text = (e.Source as TextBox).Text;
CheckShowToolTip();
};
}

void CheckShowToolTip()
Expand Down
3 changes: 2 additions & 1 deletion CookPopularControl/Themes/ListViewStyle.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
</Setter>
<Style.Triggers>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="BorderThickness" Value="0,0,0,2" />
<Setter Property="BorderThickness" Value="0,0,0,1" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListView}, Path=(common:SelectorAttached.ItemMouseOverBackground)}" />
Expand Down Expand Up @@ -266,6 +266,7 @@
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="ItemContainerStyle" Value="{StaticResource ListViewGridViewItemStyle}" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="pc:ListViewAssistant.ColumnHeaderHeight" Value="30" />
<Setter Property="pc:ListViewAssistant.ListViewItemPadding" Value="0" />
<Setter Property="pc:ListViewAssistant.IsColumnHeaderFontWeight" Value="False" />
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<Product>$(MSBuildProjectName)</Product>
<Title>$(MSBuildProjectName)</Title>
<Description>兼容.NetFramework与.NetCore/.Net的WPF控件库</Description>
<Copyright>Copyright © $(MSBuildProjectName) 2019-2022</Copyright>
<Copyright>Copyright © $(MSBuildProjectName) 2019-2023</Copyright>
<PackageTags>xaml,wpf,ui,controls,windows,desktop,cookpopularcontrol,library</PackageTags>
<RepositoryUrl>https://gitee.com/cook-csharp/$(MSBuildProjectName)</RepositoryUrl>
<PackageProjectUrl>https://github.com/chancezheng/CookPopularControl</PackageProjectUrl>
Expand Down
42 changes: 22 additions & 20 deletions Settings.XamlStyler
Original file line number Diff line number Diff line change
@@ -1,49 +1,51 @@
{
{
/****************���Ը�ʽ��**************************/
"AttributesTolerance": 3, //���������������2��Ĭ�ϡ������Ԫ�������������ڴ����Ͳ��ỻ��
"AttributesTolerance": 3, //���������������2��Ĭ�ϡ������Ԫ�������������ڴ����Ͳ��ỻ��
"KeepFirstAttributeOnSameLine": true, //��һ�������Ƿ��뿪ʼ�����ͬһ�У�false��Ĭ�ϡ�
"MaxAttributeCharactersPerLine": 100, //������Դ��ڶ��ٸ��ַ��͸û��У�0��Ĭ�ϡ�
"MaxAttributesPerLine": 3, //���ڼ������Ծ͸û��У�1��Ĭ�ϡ�
"MaxAttributeCharactersPerLine": 100, //������Դ��ڶ��ٸ��ַ��͸û��У�0��Ĭ�ϡ�
"MaxAttributesPerLine": 3, //���ڼ������Ծ͸û��У�1��Ĭ�ϡ�
"NewlineExemptionElements": "RadialGradientBrush, GradientStop, LinearGradientBrush, ScaleTransform, SkewTransform, RotateTransform, TranslateTransform, Trigger, Condition, Setter, Geometry,",
"SeparateByGroups": true, //�Ƿ�Ӧ�ð������Եķ�����зָ���false��Ĭ�ϡ�
"AttributeIndentation": 0, //���������ո��ַ�����-1��������0��Ĭ�ϡ�����4���ո�����������ָ����
"AttributeIndentationStyle": 1, //�����������0��ϣ������ʹ���Ʊ����Ϳո�1��Ĭ�ϡ�ʹ�ÿո�
"RemoveDesignTimeReferences": false, //�Ƿ��Ƴ��Զ����ӵĿؼ������ʱ�ο����ݣ�false��Ĭ�ϡ�
"RemoveDesignTimeReferences": false, //�Ƿ��Ƴ��Զ����ӵĿؼ������ʱ�ο����ݣ�false��Ĭ�ϡ�
"EnableAttributeReordering": true, //�Ƿ��������Ե��Զ�����true��Ĭ�ϡ�
"AttributeOrderingRuleGroups": [ //��������ͷ������
"x:Class",
"x:ClassModifier",
"xmlns, xmlns:x",
"xmlns:*",
"x:Key, Key, x:Name, Name, x:Uid, Uid, TargetType, BasedOn, ",
"mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText",
"Title",
"mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText, d:*",
"Title",
"Grid.Row, Grid.RowSpan, Grid.Column, Grid.ColumnSpan, Columns, Rows, Canvas.Left, Canvas.Top, Canvas.Right, Canvas.Bottom, DockPanel.Dock",
"Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight",
"Text, Content, Header, Data, ContextMenu,",
"BorderBrush, BorderThickness",
"Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight",
"Text, Content, Header, Data, ContextMenu,",
"BorderBrush, BorderThickness",
"Foreground, Background, CornerRadius, Fill",
"Command, CommandParameter, IsChecked, IsEnabled",
"Source, Stretch, ImageSource",
"FontSize, FontFamliy, FontWeight",
"ContentTemplate,ContentStringFormat,ContentTemplateSelector",
"ResizeBehavior, ResizeDirection,RecognizesAccessKey",
"PageSource, PageIndex, Offset, Color, Binding, Property, Value, TargetName, StartPoint, EndPoint",
"PageSource, PageIndex, Offset, Color, Binding, Property, Value, TargetName, StartPoint, EndPoint",
"Minimum, Maximum",
"Margin, Padding, Opacity, SnapsToDevicePixels, Focusable, ToolTip",
"HorizontalAlignment, VerticalAlignment, HorizontalContentAlignment, VerticalContentAlignment, Panel.ZIndex",
"HorizontalAlignment, VerticalAlignment, HorizontalContentAlignment, VerticalContentAlignment, Panel.ZIndex",
"Storyboard.*,",
"From, To, Duration, RepeatBehavior",
"*:*, *",
"*",
"Visibility",
"Style"
"Style",
"*:*"
],
"FirstLineAttributes": "x:Name,Grid.Row,Grid.Column", //Ӧ���ڵ�һ�е����ԣ�����Name x:Name ��x:Uid�ȵ�,None��Ĭ�ϡ�
"FirstLineAttributes": "x:Name,Grid.Row,Grid.Column", //Ӧ���ڵ�һ�е����ԣ�����Name x:Name ��x:Uid�ȵ�,None��Ĭ�ϡ�
"OrderAttributesByName": true, //�Ƿ����������ƽ�������
/****************Ԫ�ظ�ʽ��**************************/
"PutEndingBracketOnNewLine": false, //���������Ƿ��ռһ�У�false��Ĭ�ϡ�
"RemoveEndingTagOfEmptyElement": true, //�Ƿ��Ƴ���Ԫ�صĽ�����ǩ��true��Ĭ�ϡ�
"SpaceBeforeClosingSlash": true, //�Ապ�Ԫ�ص�ĩβб��ǰ�Ƿ�Ҫ�пո�true��Ĭ�ϡ�
"RootElementLineBreakRule": 1, //�Ƿ񽫸�Ԫ�ص����Էֳɶ��У�0��Ĭ�ϡ���1ʼ�գ�2�Ӳ���
"RootElementLineBreakRule": 1, //�Ƿ񽫸�Ԫ�ص����Էֳɶ��У�0��Ĭ�ϡ���1ʼ�գ�2�Ӳ���
/****************Ԫ������**************************/
"ReorderVSM": 2, //�Ƿ���������visual state Manager��0δ���壻1��Ĭ�ϡ��Ƶ����2�Ƶ���ǰ��
"ReorderGridChildren": false, //�Ƿ���������Grid����Ԫ�أ�false��Ĭ�ϡ�
Expand All @@ -55,8 +57,8 @@
"ThicknessSeparator": 2, //Thickness���͵�����Ӧ�������ַָ���(0����ʽ����1�ո�2��Ĭ�ϡ����ţ�
"ThicknessAttributes": "Margin, Padding, BorderThickness, ThumbnailClipMargin", //���϶�ΪThickness��Ԫ��Ӧ������Щ
"FormatOnSave": false, //�Ƿ��ڱ���ʱ���и�ʽ����true��Ĭ�ϡ�
"CommentPadding": 2, //ע�͵ļ��Ӧ���Ǽ����ո�2��Ĭ�ϡ�
"CommentPadding": 2, //ע�͵ļ��Ӧ���Ǽ����ո�2��Ĭ�ϡ�
/****************����VS����**************************/
"IndentSize": 4, //�����ո�����4��Ĭ�ϡ�
"IndentWithTabs": false //�Ƿ�ʹ���Ʊ�������������false��Ĭ�ϡ�
}
"IndentSize": 4, //�����ո�����4��Ĭ�ϡ�
"IndentWithTabs": false //�Ƿ�ʹ���Ʊ�������������false��Ĭ�ϡ�
}

0 comments on commit da06099

Please sign in to comment.