modified doc

uniform doc structure
This commit is contained in:
NaBian committed 2020-01-05 21:45:50 +08:00
1 parent 4074d659cd
commit 56eba2fed9
3 files changed
+97 -103

No files matched your search

@@ -4,26 +4,25 @@ title: ListBox 列表框
# ListBoxBaseStyle
ListBox默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用,
ListBox默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
样式源码见[ListBoxBaseStyle.xaml](https://github.com/HandyOrg/HandyControl/blob/master/src/Shared/HandyControl_Shared/Themes/Styles/Base/ListBoxBaseStyle.xaml )。
案例:
```
<!--默认样式-->
{% note info no-icon %}
用例:
{% code %}
<Style BasedOn="{StaticResource ListBoxBaseStyle}" TargetType="ListBox"/>
```
{% endcode %}
![ListBox.BaseStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/ListBox.BaseStyle.png)
# ListBoxCustom
{% endnote %}
ListBox列表Custom样式,该样式保留了Listbox的基本属性样式,而数据显示样式由当前用户自定义,实现个性化定制
# ListBoxCustom : ListBoxBaseStyle
案例:
ListBox列表Custom样式,该样式保留了Listbox的基本属性样式,而数据显示样式由当前用户自定义,实现个性化定制。
```
{% note info no-icon %}
用例:
{% code %}
<ListBox Margin="10" ItemsSource="{Binding Datas}"
Style="{DynamicResource ListBoxCustom}">
<ListBox.ItemTemplate>
@@ -37,20 +36,20 @@ ListBox列表Custom样式,该样式保留了Listbox的基本属性样式,而
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
```
{% endcode %}
![ListBox.CustomStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/ListBox.CustomStyle.png)
# WrapPanelHorizontalListBox
{% endnote %}
ListBox列表显示布局容器为WrapPanel,水平方向显示样式
# WrapPanelHorizontalListBox : ListBoxCustom
案例:
布局容器为WrapPanel,水平方向显示样式。
```
<ListBox Margin="10" ItemsSource="{Binding Datas}"
{% note info no-icon %}
用例:
{% code %}
<ListBox Margin="10" ItemsSource="{Binding Datas}"
Style="{DynamicResource WrapPanelHorizontalListBox}">
<ListBox.ItemTemplate>
<DataTemplate>
@@ -63,17 +62,19 @@ ListBox列表显示布局容器为WrapPanel,水平方向显示样式
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
```
{% endcode %}
![ListBox.WrapPanelHorizontalStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/ListBox.WrapPanelHorizontalStyle.png)
# WrapPanelVerticalListBox
{% endnote %}
ListBox列表显示布局容器为WrapPanel,垂直方向显示样式
# WrapPanelVerticalListBox : ListBoxCustom
案例:
布局容器为WrapPanel,垂直方向显示样式。
```
{% note info no-icon %}
用例:
{% code %}
<ListBox Margin="10" ItemsSource="{Binding Datas}"
Style="{DynamicResource WrapPanelVerticalListBox}">
<ListBox.ItemTemplate>
@@ -87,17 +88,19 @@ ListBox列表显示布局容器为WrapPanel,垂直方向显示样式
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
```
{% endcode %}
![ListBox.WrapPanelVerticalStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/ListBox.WrapPanelVerticalStyle.png)
# StackPanelHorizontalListBox
{% endnote %}
ListBox列表显示布局容器为StackPanel,水平方向显示样式
# StackPanelHorizontalListBox : ListBoxCustom
案例:
布局容器为StackPanel,水平方向显示样式。
```
{% note info no-icon %}
用例:
{% code %}
<ListBox Margin="10" ItemsSource="{Binding Datas}"
Style="{DynamicResource StackPanelHorizontalListBox}">
<ListBox.ItemTemplate>
@@ -111,17 +114,19 @@ ListBox列表显示布局容器为StackPanel,水平方向显示样式
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
```
{% endcode %}
![ListBox.StackPanelHorizontalStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/ListBox.StackPanelHorizontalStyle.png)
# StackPanelVerticalListBox
{% endnote %}
ListBox列表显示布局容器为StackPanel,垂直方向显示样式
# StackPanelVerticalListBox : ListBoxCustom
案例:
布局容器为StackPanel,垂直方向显示样式。
```
{% note info no-icon %}
用例:
{% code %}
<ListBox Margin="10" ItemsSource="{Binding Datas}"
Style="{DynamicResource StackPanelVerticalListBox}">
<ListBox.ItemTemplate>
@@ -135,6 +140,8 @@ ListBox列表显示布局容器为StackPanel,垂直方向显示样式
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
```
{% endcode %}
![ListBox.StackPanelVerticalStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/ListBox.StackPanelVerticalStyle.png)
![ListBox.StackPanelVerticalStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/ListBox.StackPanelVerticalStyle.png)
{% endnote %}