update doc
No files matched your search
@@ -4,16 +4,40 @@ title: ComboBox 组合框
|
||||
|
||||
# ComboBoxBaseStyle
|
||||
|
||||
原生组合框默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
原生组合框默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。原生组合框如果未设置任何样式,则默认使用该样式:
|
||||
|
||||
- 默认样式
|
||||
`<ComboBox ItemsSource="{Binding DataList}" SelectedIndex="0"/>`
|
||||

|
||||
|
||||
# ComboBoxExtendBaseStyle : ComboBoxBaseStyle
|
||||
|
||||
原生组合框扩展默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
# ComboBoxPlusBaseStyle : ComboBoxExtendBaseStyle
|
||||
|
||||
扩展组合框默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
# ComboBoxExtend : ComboBoxExtendBaseStyle
|
||||
|
||||
相对于原生组合框默认样式,它借助于附加属性可以实现标题、水印的功能。
|
||||
相对于原生组合框默认样式,它借助于附加属性可以实现标题、水印的功能。
|
||||
|
||||
- 标题在上
|
||||
`<ComboBox ItemsSource="{Binding DataList}" SelectedIndex="0" hc:InfoElement.Title="这是标题" Style="{StaticResource ComboBoxExtend}" Text="正文1"/>`
|
||||

|
||||
|
||||
- 标题在左
|
||||
`<ComboBox ItemsSource="{Binding DataList}" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="标题在左侧" Style="{StaticResource ComboBoxExtend}" Text="正文1"/>`
|
||||

|
||||
|
||||
{% note warning %}
|
||||
标题在左时,为了多个输入框左侧对齐,需要设置标题宽度,标题宽度无需逐个设置,可在外部容器上统一设置。
|
||||
{% endnote %}
|
||||
|
||||
- 标题在上,带有水印
|
||||
`<ComboBox ItemsSource="{Binding DataList}" hc:InfoElement.Placeholder="请输入内容" hc:InfoElement.Title="此项必填" Style="{StaticResource ComboBoxExtend}"/>`
|
||||

|
||||
|
||||
- 标题在上,带有水印,且为必填
|
||||
`<ComboBox ItemsSource="{Binding DataList}" hc:InfoElement.Placeholder="请输入内容" hc:InfoElement.Title="此项必填" Style="{StaticResource ComboBoxExtend}" hc:InfoElement.Necessary="True"/>`
|
||||

|
||||
|
||||
- 标题在上,带有水印,且为必填,同时自定义必填提示符
|
||||
`<ComboBox ItemsSource="{Binding DataList}" hc:InfoElement.Placeholder="请输入内容" hc:InfoElement.Title="此项必填" Style="{StaticResource ComboBoxExtend}" hc:InfoElement.Necessary="True" hc:InfoElement.Symbol="*"/>`
|
||||

|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: ContentControl 内容控件
|
||||
---
|
||||
|
||||
建设中
|
||||
所有的`ContentControl`默认无法获得焦点
|
||||
@@ -1,5 +1,22 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: ContextMenu 上下文菜单
|
||||
---
|
||||
|
||||
建设中
|
||||
# ContextMenuBaseStyle
|
||||
|
||||
上下文菜单默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
|
||||
{% code %}
|
||||
<ContextMenu ItemsSource="{Binding DataList}">
|
||||
<ContextMenu.ItemTemplate>
|
||||
<HierarchicalDataTemplate ItemsSource="{Binding DataList}">
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</HierarchicalDataTemplate>
|
||||
</ContextMenu.ItemTemplate>
|
||||
</ContextMenu>
|
||||
{% endcode %}
|
||||

|
||||
{% endnote %}
|
||||
@@ -1,5 +1,32 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: DataGrid 数据表格
|
||||
---
|
||||
|
||||
建设中
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
|
||||
{% code %}
|
||||
<DataGrid HeadersVisibility="All" RowHeaderWidth="60" AutoGenerateColumns="False" ItemsSource="{Binding DataList}">
|
||||
<DataGrid.RowHeaderTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding IsSelected,RelativeSource={RelativeSource AncestorType=DataGridRow}}"/>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowHeaderTemplate>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn IsReadOnly="True" Width="80" CanUserResize="False" Binding="{Binding Index}" Header="{x:Static langs:Lang.Index}"/>
|
||||
<DataGridTemplateColumn Width="60" CanUserResize="False">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="{Binding ImgPath}" Width="32" Height="32" Stretch="Uniform"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Width="1*" Binding="{Binding Name}" Header="{x:Static langs:Lang.Name}"/>
|
||||
<DataGridCheckBoxColumn Width="100" CanUserResize="False" Binding="{Binding IsSelected}" Header="{x:Static langs:Lang.Selected}"/>
|
||||
<DataGridComboBoxColumn ItemsSource="{Binding Source={StaticResource DemoTypes}}" Width="100" CanUserResize="False" SelectedValueBinding="{Binding Type}" Header="{x:Static langs:Lang.Type}"/>
|
||||
<DataGridTextColumn Width="1*" Binding="{Binding Remark}" Header="{x:Static langs:Lang.Remark}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
{% endcode %}
|
||||

|
||||
{% endnote %}
|
||||
@@ -1,5 +1,38 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: DatePicker 日期选择器
|
||||
---
|
||||
|
||||
建设中
|
||||
# DatePickerBaseStyle
|
||||
|
||||
原生日期选择器默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。原生日期选择器如果未设置任何样式,则默认使用该样式:
|
||||
|
||||
- 默认样式
|
||||
`<DatePicker SelectedDate="{x:Static system:DateTime.Now}"/>`
|
||||

|
||||
|
||||
# DatePickerExtendBaseStyle : DatePickerBaseStyle
|
||||
|
||||
原生日期选择器扩展默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
# DatePickerExtend : DatePickerExtendBaseStyle
|
||||
|
||||
- 标题在上
|
||||
`<DatePicker SelectedDate="{x:Static system:DateTime.Now}" Style="{StaticResource DatePickerExtend}" hc:InfoElement.Title="这是标题"/>`
|
||||

|
||||
|
||||
- 标题在左
|
||||
`<DatePicker SelectedDate="{x:Static system:DateTime.Now}" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" Style="{StaticResource DatePickerExtend}" hc:InfoElement.Title="标题在左侧"/>`
|
||||

|
||||
|
||||
{% note warning %}
|
||||
标题在左时,为了多个输入框左侧对齐,需要设置标题宽度,标题宽度无需逐个设置,可在外部容器上统一设置。
|
||||
{% endnote %}
|
||||
|
||||
- 标题在上,带有水印
|
||||
[参见Combobox](../combobox)
|
||||
|
||||
- 标题在上,带有水印,且为必填
|
||||
[参见Combobox](../combobox)
|
||||
|
||||
- 标题在上,带有水印,且为必填,同时自定义必填提示符
|
||||
[参见Combobox](../combobox)
|
||||
|
After Width: | Height: | Size: 885 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.8 KiB |