Skip to content

Commit

Permalink
Add initial Dropdown documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
enisn committed Jul 13, 2024
1 parent acc22aa commit d1f583a
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/en/docs-nav.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
"text": "Auto Form View",
"path": "infrastructure/AutoFormView.md"
},
{
"text": "Auto Form View",
"path": "infrastructure/Dropdown.md"
},
{
"text": "ExpanderView",
"path": "infrastructure/ExpanderView.md"
Expand Down
4 changes: 3 additions & 1 deletion docs/en/infrastructure/AutoFormView.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ The `AutoFormView` is a view that automatically generates a form based on the pr

## Usage

`AutoFormView` is defined in `UraniumUI.Controls` namespace. You can use it in XAML like this:
`AutoFormView` is defined in `UraniumUI.Controls` namespace.

You can use it in XAML like this:

```xml
xmlns:uranium="http://schemas.enisn-projects.io/dotnet/maui/uraniumui"
Expand Down
33 changes: 33 additions & 0 deletions docs/en/infrastructure/Dropdown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Dropdown
The Dropdown component is a button that, when clicked, displays a list of options for the user to choose from. It's similar to Picker from MAUI but with a different user experience. The Dropdown component is a good choice when you have a small number of options to choose from.

## Usage

`Dropdown` is defined in the `UraniumUI.Controls` namespace.

You can access it in XAML with default UraniumUI namespace like this:

```xml
xmlns:uranium="http://schemas.enisn-projects.io/dotnet/maui/uraniumui"
```

Then you can use it like this:

```xml
<uranium:Dropdown ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}" Placeholder="Choose" />
```

| Windows | Android | iOS & Mac |
| --- | --- | --- |
| ![Dropdown](../../images/dropdown-win.gif) | ![Dropdown](../../images/dropdown-android.gif) | ![Dropdown](../../images/dropdown-ios.gif) |

## Properties

| Property | Description |
| --- | --- |
| `ItemsSource` | The collection of items to display in the dropdown. |
| `SelectedItem` | The selected item in the dropdown. |
| `Placeholder` | The text to display when no item is selected. |
| `PlaceholderColor` | The color of the placeholder text. |
| `TextColor` | The color of the text in the dropdown. |
| `HorizontalTextAlignment` | The horizontal alignment of the text in the dropdown. |
2 changes: 2 additions & 0 deletions docs/en/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
href: infrastructure/GridLayout.md
- name: Auto Form View
href: infrastructure/AutoFormView.md
- name: Dropdown
href: infrastructure/Dropdown.md
- name: ExpanderView
href: infrastructure/ExpanderView.md
- name: Validations
Expand Down
Binary file added docs/images/dropdown-android.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/dropdown-ios.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/dropdown-win.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d1f583a

Please sign in to comment.