-
-
Notifications
You must be signed in to change notification settings - Fork 785
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #222 from lepoco/development
Merge development
- Loading branch information
Showing
504 changed files
with
53,974 additions
and
22,574 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!--- Please provide a general summary of your changes in the title above --> | ||
|
||
## Pull request type | ||
|
||
<!-- Please try to limit your pull request to one type, submit multiple pull requests if needed. --> | ||
|
||
Please check the type of change your PR introduces: | ||
|
||
- [ ] Update | ||
- [ ] Bugfix | ||
- [ ] Feature | ||
- [ ] Code style update (formatting, renaming) | ||
- [ ] Refactoring (no functional changes, no api changes) | ||
- [ ] Build related changes | ||
- [ ] Documentation content changes | ||
|
||
## What is the current behavior? | ||
|
||
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. --> | ||
|
||
Issue Number: N/A | ||
|
||
## What is the new behavior? | ||
|
||
<!-- Please describe the behavior or changes that are being added by this PR. --> | ||
|
||
- | ||
- | ||
|
||
## Other information | ||
|
||
<!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,43 @@ | ||
# Controls | ||
WPF UI has two kinds of controls. Default WPF ones, which styles have been overridden, and custom proprietary controls like `ProgressRing`. | ||
**WPF UI** has two kinds of controls. Default WPF ones, which styles have been overridden, and custom proprietary controls like `ProgressRing`. | ||
|
||
### Access to custom controls | ||
In order for your `Window`, `Page`, or `UserControl` to use custom WPF UI controls, you need to add `wpfui` namespace. | ||
In order for your `Window`, `Page`, or `UserControl` to use custom **WPF UI** controls, you need to add `wpfui` namespace. | ||
```xml | ||
<Window | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:wpfui="clr-namespace:WPFUI.Controls;assembly=WPFUI" | ||
xmlns:wpfui="http://schemas.lepo.co/wpfui/2022/xaml" | ||
mc:Ignorable="d"> | ||
<wpfui:ProgressRing IsIndeterminate="True" /> | ||
</Window> | ||
``` | ||
|
||
## 🛠️ Custom controls | ||
| Control | Namespace | Description | | ||
| --- | --- | --- | | ||
| **Anchor** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/Anchor.cs) | Creates a hyperlink to web pages, files or anything else a URL can address. | | ||
| **Arc** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/Arc.cs) | Draws a symmetrical arc with rounded edges. | | ||
| **Badge** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/Badge.cs) | Used to highlight an item, attract attention or flag status. | | ||
| **Breadcrumb** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/Breadcrumb.cs) | Automatic display of the page title from the navigation in the application. | | ||
| **Button** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/Button.cs) | Custom button with additional parameters like an icon. | | ||
| **Card** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/Card.cs) | Simple card compatible with the theme for displaying other elements. | | ||
| **CardAction** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/CardAction.cs) | Inherited from the Button interactive card styled according to Fluent Design. | | ||
| **CardControl** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/CardControl.cs) | Inherited from the Button control which displays an additional control on the right side of the card. | | ||
| **CardExpander** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/CardExpander.cs) | Inherited from the ContentControl control which can hide the collapsable content. | | ||
| **CodeBlock** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/CodeBlock.cs) | Formats syntax and display a fragment of the source code. | | ||
| **Dialog** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/Dialog.cs) | Displays a large card with a slightly transparent background and two action buttons. | | ||
| **FontIcon** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/FontIcon.cs) | Represents a text element containing an icon glyph with selectable font family. | | ||
| **Hyperlink** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/Hyperlink.cs) | Button that opens a URL in a web browser. | | ||
| **SymbolIcon** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/SymbolIcon.cs) | Represents a text element containing an icon glyph. | | ||
| **MessageBox** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/MessageBox.cs) | Custom window to display notifications outside the application. | | ||
| **Navigation** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/Navigation.cs) | Navigation styled as UWP apps. | | ||
| **NavigationItem** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/NavigationItem.cs) | Element of the navigation. | | ||
| **NavigationStore** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/NavigationStore.cs) | Navigation styled as Windows 11 Store app | | ||
| **NavigationFluent** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/NavigationFluent.cs) | Navigation styled as Windows 11 Settings app. | | ||
| **NumberBox** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/NumberBox.cs) | Text field for entering numbers with the possibility of setting a mask. | | ||
| **ProgressRing** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/ProgressRing.cs) | Rotating loading ring like in Windows 11. | | ||
| **Rating** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/Rating.cs) | Stars to display the rating. | | ||
| **SearchBox** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/SearchBox.cs) | Lets look for things and other stuff. | | ||
| **Snackbar** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/Snackbar.cs) | Animated card with a notification displayed at the bottom of the application. | | ||
| **TextBox** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/TextBox.cs) | Text field for with placeholders and icons. | | ||
| **TitleBar** | [WPFUI.Controls](https://github.com/lepoco/wpfui/blob/main/WPFUI/Controls/TitleBar.cs) | A set of buttons that can replace the default window navigation, giving it a new, modern look with implemented [NotifyIcon](https://github.com/lepoco/wpfui/blob/main/WPFUI/Tray/NotifyIcon.cs). | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,117 @@ | ||
# Data | ||
TODO... | ||
There is often a need to display datasets. We can use default controls like `ListView` or `ItemsControl`, but **WPF UI** also provides controls like `VirtualizingItemsControl` or `VirtualizingWrapPanel` which allow you to display thousands of controls without slowing down your application. | ||
|
||
## ListView | ||
```xml | ||
<ListView | ||
Margin="0,8,0,0" | ||
ItemsSource="{Binding ListBoxItemCollection}" | ||
SelectedIndex="0" /> | ||
``` | ||
|
||
## ListBox | ||
```xml | ||
<ListBox | ||
Margin="0,8,0,0" | ||
ItemsSource="{Binding ListBoxItemCollection}" | ||
SelectedIndex="0" /> | ||
``` | ||
|
||
## TreeView | ||
```xml | ||
<TreeView ScrollViewer.CanContentScroll="False"> | ||
<TreeViewItem Header="Employee1" IsExpanded="True"> | ||
<TreeViewItem Header="Jesper Aaberg" /> | ||
<TreeViewItem Header="Employee Number" IsExpanded="True"> | ||
<TreeViewItem Header="12345" IsSelected="True" /> | ||
</TreeViewItem> | ||
<TreeViewItem Header="Work Days"> | ||
<TreeViewItem Header="Monday" /> | ||
<TreeViewItem Header="Tuesday" /> | ||
<TreeViewItem Header="Thursday" /> | ||
</TreeViewItem> | ||
</TreeViewItem> | ||
<TreeViewItem Header="Employee2"> | ||
<TreeViewItem Header="Dominik Paiha" /> | ||
<TreeViewItem Header="Employee Number"> | ||
<TreeViewItem Header="98765" /> | ||
</TreeViewItem> | ||
<TreeViewItem Header="Work Days"> | ||
<TreeViewItem Header="Tuesday" /> | ||
<TreeViewItem Header="Wednesday" /> | ||
<TreeViewItem Header="Friday" /> | ||
</TreeViewItem> | ||
</TreeViewItem> | ||
</TreeView> | ||
``` | ||
|
||
## DataGrid | ||
```xml | ||
<DataGrid | ||
Margin="0,8,0,0" | ||
AutoGenerateColumns="False" | ||
ItemsSource="{Binding DataGridItemCollection}"> | ||
<DataGrid.Columns> | ||
<DataGridTextColumn Binding="{Binding FirstName}" Header="First Name" /> | ||
<DataGridTextColumn Binding="{Binding LastName}" Header="Last Name" /> | ||
<!-- The Email property contains a URI. For example "mailto:lucy0@adventure-works.com" --> | ||
<DataGridHyperlinkColumn | ||
Binding="{Binding Email}" | ||
ContentBinding="{Binding Email}" | ||
Header="Email" /> | ||
<DataGridCheckBoxColumn Binding="{Binding IsMember}" Header="Member?" /> | ||
<DataGridComboBoxColumn Header="Order Status" SelectedItemBinding="{Binding Status}" /> | ||
</DataGrid.Columns> | ||
</DataGrid> | ||
``` | ||
|
||
## VirtualizingWrapPanel | ||
```xml | ||
<ListView | ||
Height="300" | ||
ItemsSource="{Binding BrushCollection, Mode=OneWay}" | ||
SelectedIndex="0"> | ||
<ListView.ItemTemplate> | ||
<DataTemplate DataType="Brush"> | ||
<Border | ||
Width="80" | ||
Height="80" | ||
Background="{Binding}" | ||
CornerRadius="4"> | ||
<wpfui:SymbolIcon FontSize="25" Symbol="Fluent24" /> | ||
</Border> | ||
</DataTemplate> | ||
</ListView.ItemTemplate> | ||
<ListView.ItemsPanel> | ||
<ItemsPanelTemplate> | ||
<wpfui:VirtualizingWrapPanel | ||
Orientation="Horizontal" | ||
SpacingMode="Uniform" | ||
StretchItems="False" /> | ||
</ItemsPanelTemplate> | ||
</ListView.ItemsPanel> | ||
</ListView> | ||
``` | ||
|
||
## VirtualizingItemsControl | ||
```xml | ||
<wpfui:VirtualizingItemsControl | ||
Height="300" | ||
Foreground="{DynamicResource TextFillColorSecondaryBrush}" | ||
ItemsSource="{Binding BrushCollection, Mode=OneWay}" | ||
VirtualizingPanel.CacheLengthUnit="Pixel"> | ||
<ItemsControl.ItemTemplate> | ||
<DataTemplate DataType="Brush"> | ||
<wpfui:Button | ||
Width="80" | ||
Height="80" | ||
Margin="2" | ||
Padding="0" | ||
Appearance="Secondary" | ||
Background="{Binding}" | ||
FontSize="25" | ||
Icon="Fluent24" /> | ||
</DataTemplate> | ||
</ItemsControl.ItemTemplate> | ||
</wpfui:VirtualizingItemsControl> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,40 @@ | ||
# Icons | ||
TODO... | ||
**WPF UI** uses [Fluent UI System Icons](https://github.com/microsoft/fluentui-system-icons), a collection of familiar, friendly and modern icons from Microsoft. | ||
|
||
### Source | ||
Icons are displayed by using the font that comes with the library. All glyphs are mapped to the [Icon](https://github.com/lepoco/wpfui/blob/main/WPFUI/Common/Icon.cs) and [IconFilled](https://github.com/lepoco/wpfui/blob/main/WPFUI/Common/IconFilled.cs) enums. | ||
|
||
### Usage | ||
Many interface elements use icons via simple parameters, for example you can add an icon to a button with the Icon parameter. | ||
```xml | ||
<wpfui:Button | ||
Icon="FoodCake24" | ||
Content="The cake is a lie!"/> | ||
``` | ||
|
||
### SymbolIcon Control | ||
You can simply display the icon with `SymbolIcon` control: | ||
```xml | ||
<wpfui:SymbolIcon | ||
Symbol="FoodCake24" | ||
Filled="True"/> | ||
``` | ||
|
||
### FontIcon Control | ||
If you add a custom font like **Segoe Fluent Icons** to your application, you can use it with `FontIcon`: | ||
```xml | ||
<wpfui:FontIcon | ||
Glyph="" | ||
FontFamily="{DynamicResource SegoeFluentIcons}"/> | ||
``` | ||
|
||
### Segoe Fluent Icons | ||
Not all icons available in WinUi 3 are in **Fluent UI System Icons**. Some of them require the **Segoe Fluent Icons** font. | ||
According to the EULA of Segoe Fluent Icons we cannot ship a copy of it with this dll. Segoe Fluent Icons is installed by default on Windows 11, but if you want these icons in an application for Windows 10 and below, you must manually add the font to your application's resources. | ||
[https://docs.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font](https://docs.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font) | ||
[https://docs.microsoft.com/en-us/windows/apps/design/downloads/#fonts](https://docs.microsoft.com/en-us/windows/apps/design/downloads/#fonts) | ||
|
||
In the `App.xaml` dictionaries, you can add an alternate path to the font | ||
```XML | ||
<FontFamily x:Key="SegoeFluentIcons">pack://application:,,,/;component/Fonts/#Segoe Fluent Icons</FontFamily> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,18 @@ | ||
# Icons | ||
WPF UI uses [Fluent UI System Icons](https://github.com/microsoft/fluentui-system-icons), a collection of familiar, friendly and modern icons from Microsoft. | ||
# Input | ||
You can handle input from your users in a variety of ways. **WPF UI** modifies the default controls, but also adds its own, like `NumberBox`. | ||
|
||
### Source | ||
Icons are displayed by using the font that comes with the library. All glyphs are mapped to the [Icon](https://github.com/lepoco/wpfui/blob/main/WPFUI/Common/Icon.cs) and [IconFilled](https://github.com/lepoco/wpfui/blob/main/WPFUI/Common/IconFilled.cs) enums. | ||
|
||
### Usage | ||
Many interface elements use icons via simple parameters, for example you can add an icon to a button with the Icon parameter. | ||
```xml | ||
<wpfui:Button | ||
Icon="FoodCake24" | ||
Content="The cake is a lie!"/> | ||
``` | ||
|
||
### Icon Control | ||
You can simply display the icon with `Icon` control: | ||
## TextBox | ||
The default TextBox only allows you to define the `Text` parameter. | ||
```xml | ||
<wpfui:Icon | ||
Glyph="FoodCake24" | ||
Filled="True"/> | ||
<TextBox | ||
Margin="0,8,0,0" | ||
Text="Hello World" /> | ||
``` | ||
|
||
### FontIcon Control | ||
If you add a custom font like **Segoe Fluent Icons** to your application, you can use it with `FontIcon`: | ||
**WPF UI** extends it and allows you to set `Placeholder` or `Icon`. | ||
```xml | ||
<wpfui:FontIcon Glyph="" FontFamily="{DynamicResource SegoeFluentIcons}"/> | ||
<wpfui:TextBox | ||
Margin="0,8,0,0" | ||
Icon="Fluent24" | ||
Placeholder="Hello World" /> | ||
``` | ||
|
||
### Segoe Fluent Icons | ||
Not all icons available in WinUi 3 are in **Fluent UI System Icons**. Some of them require the **Segoe Fluent Icons** font. | ||
According to the EULA of Segoe Fluent Icons we cannot ship a copy of it with this dll. Segoe Fluent Icons is installed by default on Windows 11, but if you want these icons in an application for Windows 10 and below, you must manually add the font to your application's resources. | ||
[https://docs.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font](https://docs.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font) | ||
[https://docs.microsoft.com/en-us/windows/apps/design/downloads/#fonts](https://docs.microsoft.com/en-us/windows/apps/design/downloads/#fonts) | ||
|
||
In the `App.xaml` dictionaries, you can add an alternate path to the font | ||
```XML | ||
<FontFamily x:Key="SegoeFluentIcons">pack://application:,,,/;component/Fonts/#Segoe Fluent Icons</FontFamily> | ||
``` |
Oops, something went wrong.