Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BCCRRSST-1 #55

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/Component/BasicInput/Button.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Button

类型:System.Windows.Controls.Button

继承:System.Windows.Controls.Primitives.ButtonBase

## 参考

[Button Class (System.Windows.Controls) | Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.button?view=windowsdesktop-8.0)
8 changes: 6 additions & 2 deletions docs/Component/BasicInput/CheckBox.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CheckBox

类型:System.Windows.Controls.Primitives.CheckBox
类型:System.Windows.Controls.CheckBox

继承:System.Windows.Controls.Primitives.ButtonBase
继承:System.Windows.Controls.Primitives.ButtonBase

## 参考

[CheckBox Class (System.Windows.Controls) | Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.checkbox?view=windowsdesktop-8.0)
10 changes: 7 additions & 3 deletions docs/Component/BasicInput/ComboBox.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CheckBox
# ComboBox

类型:System.Windows.Controls.Primitives.ComboBox
类型:System.Windows.Controls.ComboBox

继承:System.Windows.Controls.Primitives.ButtonBase
继承:System.Windows.Controls.Primitives.ButtonBase

## 参考

[ComboBox Class (System.Windows.Controls) | Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.combobox?view=windowsdesktop-8.0)
6 changes: 5 additions & 1 deletion docs/Component/BasicInput/RadioButtons.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,8 @@
</ui:RadioButtons>
```

![](./../../images/RadioButtons/1.gif)
![](./../../images/RadioButtons/1.gif)

## 参考

[System.Windows.Controls.Button](Button.md)
77 changes: 77 additions & 0 deletions docs/Component/BasicInput/RatingControl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# RatingControl

类型:iNKORE.UI.WPF.Modern.Controls.RatingControl

继承:System.Windows.Controls.Control

## 属性

### Caption

- 类型:`string`
- 默认值:`null`
- 描述:控件的标题,显示在控件旁边

### InitialSetValue

- 类型:`double`
- 默认值:`1`
- 描述:控件的初始值

### IsClearEnabled

- 类型:`bool`
- 默认值:`false`
- 描述:控件是否支持清除评级

### IsReadOnly

- 类型:`bool`
- 默认值:`false`
- 描述:控件是否只读

### ItemInfo

- 类型:`RatingItemInfo`
- 默认值:`null`
- 描述:控件的评级项信息
- 注意事项:没啥给用户用的

### MaxRating

- 类型:`double`
- 默认值:`5`
- 描述:最大评分

### PlaceholderValue

- 类型:`double`
- 默认值:`-1`
- 描述:占位值

### Value

- 类型:`double`
- 默认值:`this.PlaceholderValue`
- 描述:控件的分值

## 样例

与 `slider` 双向绑定

```xaml
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<Grid Margin="5">
<ui:RatingControl PlaceholderValue="{Binding Value, ElementName=slider, Mode=TwoWay}"/>
</Grid>
<Grid Margin="5">
<Slider x:Name="slider" Width="150" VerticalAlignment="Center" Maximum="5"></Slider>
</Grid>
</StackPanel>
```

![](./../../images/RatingControl/1.gif)

## 参考

1. [Control Class (System.Windows.Controls) | Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.control?view=windowsdesktop-8.0)
15 changes: 15 additions & 0 deletions docs/Component/BasicInput/Slider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Slider

类型:System.Windows.Controls.Slider

## SliderAutoToolTipHelper 属性

### IsEnabled

- 类型:`bool`
- 默认值:`false`
- 描述:启用刻度吸附

## 参考

[Slider Class (System.Windows.Controls) | Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.slider?view=windowsdesktop-8.0)
58 changes: 58 additions & 0 deletions docs/Component/BasicInput/ToggleSwitch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# ToggleSwitch

类型:iNKORE.UI.WPF.Modern.Controls.ToggleSwitch

继承:System.Windows.Controls.Control

## 属性

### Header:

- 类型: `object`
- 默认值: `null`
- 描述: 设置开关按钮的标题或标签。可以是任何对象,如字符串、图像或自定义控件。

### HeaderTemplate:

- 类型: `DataTemplate`
- 默认值: `null`
- 描述: 用于定义`Header`内容的数据模板。通过这个属性,可以对`Header`进行更复杂的定制和布局。

### IsOn:
- 类型: `bool`
- 默认值: `false`
- 描述: 指示开关按钮当前的状态,`true` 表示开启,`false` 表示关闭。该属性支持双向数据绑定,当状态发生变化时会触发`Toggled`事件。
### OffContent:
- 类型: `object`
- 默认值: `"Off"`
- 描述: 设置开关按钮关闭状态时显示的内容。可以是任何对象,如字符串、图像或自定义控件。
### OffContentTemplate:
- 类型: `DataTemplate`
- 默认值: `null`
- 描述: 用于定义`OffContent`内容的数据模板。通过这个属性,可以对`OffContent`进行更复杂的定制和布局。
### OnContent:
- 类型: `object`
- 默认值: `"On"`
- 描述: 设置开关按钮打开状态时显示的内容。可以是任何对象,如字符串、图像或自定义控件。
### OnContentTemplate:
- 类型: `DataTemplate`
- 默认值: `null`
- 描述: 用于定义`OnContent`内容的数据模板。通过这个属性,可以对`OnContent`进行更复杂的定制和布局。
### UseSystemFocusVisuals:
- 类型: `bool`
- 默认值: `false`
- 描述: 指示是否使用系统提供的焦点可视化样式。如果为 `true`,开关按钮获得焦点时会显示系统默认的焦点可视化效果。
### FocusVisualMargin:
- 类型: `Thickness`
- 默认值: 自动计算的值
- 描述: 指定焦点可视化效果的边距。可以设置上、下、左、右边距的大小。
### CornerRadius:
- 类型: `CornerRadius`
- 默认值: `0`
- 描述: 设置开关按钮的圆角半径。可以分别设置四个角的半径大小,也可以统一设置所有角的半径大小。

## 事件

- Toggled;当开关状态发生改变时,会触发这个事件

## 样例
Binary file added docs/images/RatingControl/1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading