From 50776441ef460655aa9dadae2ce6a28fe17ee5c7 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Fri, 24 Jul 2020 00:10:06 +0800
Subject: [PATCH] update doc
---
README-cn.md | 1 -
.../extend_controls/animationPath/index.md | 2 +-
.../extend_controls/carousel/index.md | 53 +++++++++++++++-
.../extend_controls/chatBubble/index.md | 23 ++++++-
.../extend_controls/circlePanel/index.md | 60 ++++++++++++++++++-
doc/source/handycontrol/tnx/index.md | 4 +-
.../UserControl/Basic/ChatBox.xaml | 4 +-
.../UserControl/Basic/ChatBox.xaml.cs | 7 +--
.../Controls/Other/ChatBubble.cs | 6 --
9 files changed, 136 insertions(+), 24 deletions(-)
diff --git a/README-cn.md b/README-cn.md
index 2227976a..daa4db94 100644
--- a/README-cn.md
+++ b/README-cn.md
@@ -80,7 +80,6 @@
[](https://visualstudio.microsoft.com/free-developer-offers/)
[](https://www.jetbrains.com/?from=HandyControl)
[](https://cakebuild.net/)
-[](https://www.appveyor.com/)
[](https://gitter.im/)
## Usage
diff --git a/doc/source/handycontrol/extend_controls/animationPath/index.md b/doc/source/handycontrol/extend_controls/animationPath/index.md
index fec22308..9466b1cc 100644
--- a/doc/source/handycontrol/extend_controls/animationPath/index.md
+++ b/doc/source/handycontrol/extend_controls/animationPath/index.md
@@ -49,7 +49,7 @@ public class AnimationPath : Shape
设置动画重复行为,默认为`Forever`,可根据需要设置重复行为。
-## 继承至Shape常用属性
+## 继承自Shape常用属性
| 属性名称 | 用途 |
| --------------- | -------- |
diff --git a/doc/source/handycontrol/extend_controls/carousel/index.md b/doc/source/handycontrol/extend_controls/carousel/index.md
index ca12ad62..f9350738 100644
--- a/doc/source/handycontrol/extend_controls/carousel/index.md
+++ b/doc/source/handycontrol/extend_controls/carousel/index.md
@@ -1,5 +1,54 @@
---
-title: 建设中
+title: Carousel 轮播
---
-建设中
\ No newline at end of file
+可以在固定时间内循环切换项目。
+
+```c#
+public class Carousel : SimpleItemsControl, IDisposable
+```
+
+# 属性
+
+| 属性 | 用途 |
+| ---------------------- | ------------------------------|
+| AutoRun | 是否自动轮播 |
+| Interval | 轮播间隔时间 |
+| ExtendWidth | 项内容扩展宽度 |
+| IsCenter | 轮播项是否居中显示 |
+| PageButtonStyle | 页按钮样式 |
+
+# 案例
+
+## 显示填充轮播项
+
+```xml
+
+
+
+
+
+
+
+
+
+
+```
+
+
+
+## 使用绑定生成轮播项
+
+```xml
+
+
+
+
+
+
+
+```
+
+{% note info %}
+`ExtendWidth`会在最后一个轮播项后扩展一段距离,请注意,这不是偏移的概念,而是扩展的概念。
+{% endnote %}
\ No newline at end of file
diff --git a/doc/source/handycontrol/extend_controls/chatBubble/index.md b/doc/source/handycontrol/extend_controls/chatBubble/index.md
index ca12ad62..07005158 100644
--- a/doc/source/handycontrol/extend_controls/chatBubble/index.md
+++ b/doc/source/handycontrol/extend_controls/chatBubble/index.md
@@ -1,5 +1,24 @@
---
-title: 建设中
+title: ChatBubble 对话气泡
---
-建设中
\ No newline at end of file
+对话气泡常出现于通讯类软件中,相对于纯文本形式的上下文对话,使用对话气泡可以让聊天界面更加生动有趣。通过扩展,还可以做出气泡皮肤,可使软件个性化功能更加丰富。
+
+```c#
+public class ChatBubble : SelectableItem
+```
+
+# 属性
+
+| 属性 | 用途 |
+| ---------------------- | -------------------|
+| Role | 对话角色 |
+| Type | 消息类型 |
+| IsRead | 是否已读 |
+| ReadAction | 该气泡被选中时触发 |
+
+
+
+{% note warning %}
+效果代码详见源码demo
+{% endnote %}
\ No newline at end of file
diff --git a/doc/source/handycontrol/extend_controls/circlePanel/index.md b/doc/source/handycontrol/extend_controls/circlePanel/index.md
index ca12ad62..e3250b28 100644
--- a/doc/source/handycontrol/extend_controls/circlePanel/index.md
+++ b/doc/source/handycontrol/extend_controls/circlePanel/index.md
@@ -1,5 +1,61 @@
---
-title: 建设中
+title: CirclePanel 圆形布局
---
-建设中
\ No newline at end of file
+圆形布局常用作方向按钮、功能按钮的容器。
+
+```c#
+public class CirclePanel : Panel
+```
+
+# 属性
+
+| 属性 | 用途 |
+| ---------------------- | ------------------------------|
+| Diameter | 直径 |
+| KeepVertical | 元素是否保持垂直 |
+| OffsetAngle | 整体的角度偏移 |
+
+# 案例
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+
\ No newline at end of file
diff --git a/doc/source/handycontrol/tnx/index.md b/doc/source/handycontrol/tnx/index.md
index 8b5c9cc4..ac7fe717 100644
--- a/doc/source/handycontrol/tnx/index.md
+++ b/doc/source/handycontrol/tnx/index.md
@@ -4,7 +4,7 @@ title: 鸣谢
# 感谢以下Coder提供代码贡献
-














+



















# 感谢以下组织机构提供开源许可
@@ -12,4 +12,4 @@ title: 鸣谢
# 感谢以下捐赠者
-















\ No newline at end of file
+

















\ No newline at end of file
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/ChatBox.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/ChatBox.xaml
index 3f385e82..eb8d3cd1 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/ChatBox.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/ChatBox.xaml
@@ -17,7 +17,7 @@
-
+
@@ -25,7 +25,7 @@
-
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/ChatBox.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/ChatBox.xaml.cs
index 10a70ab1..86df6eef 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/ChatBox.xaml.cs
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/ChatBox.xaml.cs
@@ -10,17 +10,12 @@ namespace HandyControlDemo.UserControl
public ChatBox()
{
InitializeComponent();
-
ListBoxChat.ItemContainerGenerator.ItemsChanged += ItemContainerGenerator_ItemsChanged;
}
private void ItemContainerGenerator_ItemsChanged(object sender, System.Windows.Controls.Primitives.ItemsChangedEventArgs e)
{
- if (_scrollViewer == null)
- {
- _scrollViewer = VisualHelper.GetChild(ListBoxChat);
- }
-
+ _scrollViewer ??= VisualHelper.GetChild(ListBoxChat);
_scrollViewer?.ScrollToBottom();
}
}
diff --git a/src/Shared/HandyControl_Shared/Controls/Other/ChatBubble.cs b/src/Shared/HandyControl_Shared/Controls/Other/ChatBubble.cs
index a717ad30..d70635b0 100644
--- a/src/Shared/HandyControl_Shared/Controls/Other/ChatBubble.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Other/ChatBubble.cs
@@ -33,12 +33,6 @@ namespace HandyControl.Controls
set => SetValue(IsReadProperty, ValueBoxes.BooleanBox(value));
}
- public static void SetMaxWidth(DependencyObject element, double value)
- => element.SetValue(MaxWidthProperty, value);
-
- public static double GetMaxWidth(DependencyObject element)
- => (double) element.GetValue(MaxWidthProperty);
-
public Action