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

FAQ reference; ComboBox; RadioButtons; #54

Merged
merged 1 commit into from
Apr 8, 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
5 changes: 5 additions & 0 deletions docs/Component/BasicInput/ComboBox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CheckBox

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

继承:System.Windows.Controls.Primitives.ButtonBase
79 changes: 79 additions & 0 deletions docs/Component/BasicInput/RadioButtons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# RadioButtons

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

继承:System.Windows.Controls.Control

## 属性

### ItemsSource

- 类型: `IEnumerable`
- 默认值: `null`
- 描述: 数据源,获取或设置用于生成控件内容的集合

### Items

- 类型: `IList`
- 默认值: `null`
- 描述: 生成空间内容的集合

### ItemTemplate

- 类型: `object`
- 默认值: `null`
- 描述: 获取或设置用于显示控件中每个项目的模板

### SelectedItem

- 类型: `int`
- 默认值: `-1`
- 描述: 选中的 Items 的索引值

### SelectedItem

- 类型: `object`
- 默认值: `null`
- 描述: 获取选中的 Items

### MaxColumns

- 类型: `int`
- 默认值: `1`
- 描述: 获取或设置用于布局的最大列数

### Header

- 类型: `object`
- 默认值: `null`
- 描述: 获取或设置控件标题的内容

### HeaderTemplate

- 类型: `DataTemplate`
- 默认值: `null`
- 描述: 获取或设置用于显示控件标题的模板

## 事件

- SelectionChanged当单选按钮的选择更改时发生

## 方法

- ContainerFromIndex(int index):检索集合中与指定索引对应的 UI 元素
- SetTestHooksEnabled(boolenabled):设置是否为控件启用测试挂钩
- GetRows() (return int):获取控件布局中的行数
- GetColumns() (return int):获取控件布局中的列数
- GetLargerColumns() (return int):获取控件布局中项目数最多的列数

## 样例

```xaml
<ui:RadioButtons Header="Options:">
<RadioButton Content="Option1"/>
<RadioButton Content="Option2"/>
<RadioButton Content="Option3"/>
</ui:RadioButtons>
```

![](./../../images/RadioButtons/1.gif)
3 changes: 3 additions & 0 deletions docs/Component/BasicInput/ToggleSplitButton.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,6 @@ private void BulletedList_Click(object sender, RoutedEventArgs e)
}
```

## 参考

[SplitButton](SplitButton.md)
17 changes: 11 additions & 6 deletions docs/FAQs.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@

# iNKORE.UI.WPF.Modern FAQs

>
>
> This file contains some frequently asked qustions.
>
> If you have a problem, please report an issue or contact us (yoojun@inkore.net)
>

## ❓Error CS0104: "Page" is an ambiguous reference between 'System.Windows.Controls.Page' and 'iNKORE.UI.WPF.Modern.Controls.'

```c#
using Page = System.Windows.Controls.Page;
```

## ❓ IconElement: Display as rectangle or question mark under Windows 7

Expand Down Expand Up @@ -42,7 +47,7 @@
<ui:FontIcon Glyph="{x:Static ui:SegoeIcons.Home}" FontSize="16"/>
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
```
```

## ❓ FontIcon: How to add icons from segoe icons library elegantly

Expand Down Expand Up @@ -100,7 +105,7 @@
</ui:MenuFlyout>
</ui:AppBarButton.Flyout>
</ui:AppBarButton>

```

## ❓ Application: Exception throws when used in a VSIX project
Expand All @@ -122,12 +127,12 @@

```csharp
AppDomain.CurrentDomain.AssemblyResolve += OnAssemblyResolve;

private Assembly OnAssemblyResolve(object sender, ResolveEventArgs args)
{
string path = Assembly.GetExecutingAssembly().Location;
path = Path.GetDirectoryName(path);

if (args.Name.ToLower().Contains("iNKORE.UI.WPF.Modern") && !args.Name.ToLower().Contains("iNKORE.UI.WPF.Modern.Controls"))
{
path = Path.Combine(path, "iNKORE.UI.WPF.Modern.dll");
Expand Down
Binary file added docs/images/RadioButtons/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