Fluent Design System for WPF.
NuGet Package
Install-Package FluentWPFhttps://nuget.org/packages/FluentWPF
Add XAML namespace.
xmlns:fw="clr-namespace:SourceChord.FluentWPF;assembly=FluentWPF"Add ResourceDictionary to App.xaml.
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FluentWPF;component/Styles/Controls.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>…Code Behind Remove base class definition.
public partial class MainWindow
{
public MainWindow()
{
InitializeComponent();
}
}| Property Name | Type | Description |
|---|---|---|
| TintColor | Color | Gets or sets the color tint for the semi-transparent acrylic material. |
| TintOpacity | double | Gets or sets the degree of opacity of the color tint. |
| NoiseOpacity | double | Gets or sets the degree of opacity of the noise layer. |
| FallbackColor | Color | Gets or sets the color when window is inactive. |
| AcrylicWindowStyle | Normal NoIcon None |
Gets or sets a value that indicates the style of the Acrylic Window. |
The difference between kind of AcrylicWindowStyle is demonstrated as follows,
| AcrylicWindowStyle="Normal" | AcrylicWindowStyle="NoIcon" | AcrylicWindowStyle="None" |
|---|---|---|
AcrylicWindow can also be used as an Attached Property.
…Code Behind
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}…Reveal effect for controls.
To use the reveal effect, set fw:PointerTracker.Enabled="True" on a parent container.
…| Control | Style Name |
|---|---|
| Button | ButtonRevealStyle |
| Button | ButtonAccentRevealStyle |
| Button | ButtonRoundRevealStyle |
| Button | ButtonRoundAccentRevealStyle |
| TextBox | TextBoxRevealStyle |
| PasswordBox | PasswordBoxRevealStyle |
| ListBox | ListBoxRevealStyle |
| ComboBox | ComboBoxRevealStyle |
<Grid>
<fw:ParallaxView VerticalShift="200" HorizontalShift="200"
Source="{Binding ElementName=list}">
<Image Source="/FluentWPFSample;component/Assets/Images/1.jpg" Stretch="UniformToFill"/>
</fw:ParallaxView>
<ListBox x:Name="list" Background="#88EEEEEE" ScrollViewer.CanContentScroll="False"
ItemsSource="{Binding Items}"/>
</Grid>| Property Name | Type | Description |
|---|
…Accent color depends on the accent color of the system.
| Sample | Color | Brush |
|---|---|---|
| ImmersiveSystemAccentLight3 | ImmersiveSystemAccentLight3Brush | |
| ImmersiveSystemAccentLight2 | ImmersiveSystemAccentLight2Brush | |
| ImmersiveSystemAccentLight1 | ImmersiveSystemAccentLight1Brush | |
| ImmersiveSystemAccent | ImmersiveSystemAccentBrush | |
| ImmersiveSystemAccentDark1 | ImmersiveSystemAccentDark1Brush | |
| ImmersiveSystemAccentDark2 | ImmersiveSystemAccentDark2Brush | |
| ImmersiveSystemAccentDark3 | ImmersiveSystemAccentDark3Brush |
Usage:
<Border Background="{x:Static fw:AccentColors.ImmersiveSystemAccentBrush}"/>
<Border Background="{Binding Path=(fw:AccentColors.ImmersiveSystemAccentBrush)}"/>| Light | Dark | Color | Brush |
|---|---|---|---|
| SystemBaseHighColor | SystemBaseHighColorBrush | ||
| SystemBaseMediumHighColor | SystemBaseMediumHighColorBrush | ||
| SystemBaseMediumColor | SystemBaseMediumColorBrush | ||
| SystemBaseMediumLowColor | SystemBaseMediumLowColorBrush | ||
| SystemBaseLowColor | SystemBaseLowColorBrush |
Usage:
<Border Background="{DynamicResource SystemBaseHighColorBrush}"/>| Light | Dark | Color | Brush |
|---|---|---|---|
| SystemAltHighColor | SystemAltHighColorBrush | ||
| SystemAltMediumHighColor | SystemAltMediumHighColorBrush | ||
| SytemAltMediumColor | SytemAltMediumColorBrush | ||
| SystemAltMediumLowColor | SystemAltMediumLowColorBrush | ||
| SystemAltLowColor | SystemAltLowColorBrush |
Usage:
<TextBlock Foreground="{DynamicResource SystemAltHighColorBrush}"/>| Light | Dark | Color | Brush |
|---|---|---|---|
| SystemChromeHighColor | SystemChromeHighColorBrush | ||
| SytemAltMediumColor | SytemAltMediumColorBrush | ||
| SystemChromeMediumLowColor | SystemChromeMediumLowColorBrush | ||
| SystemChromeLowColor | SystemChromeLowColorBrush |
Usage:
<Border Background="{DynamicResource SystemChromeMediumBrush}"/>Windows includes a set of colors that differ only by their opacities:
| Base Color | Opacity | Color | Brush |
|---|---|---|---|
| FF | SystemChromeBlackHighColor | SystemChromeBlackHighColorBrush | |
| CC | SystemChromeBlackMediumColor | SystemChromeBlackMediumColor | |
| 66 | SystemChromeBlackMediumLowColor | SystemChromeBlackMediumLowColorBrush | |
| 33 | SystemChromeBlackLowColor | SystemChromeBlackLowColorBrush | |
| 33 | SystemListMediumColor | SystemListMediumColorBrush | |
| 19 | SystemListLowColor | SystemListLowColorBrush |
| Light | Dark | Color | Brush |
|---|---|---|---|
| SystemChromeWhiteColor | SystemChromeWhiteColorBrush | ||
| SystemChromeAltLowColor | SystemChromeAltLowColorBrush | ||
| SystemChromeDisabledHighColor | SystemChromeDisabledHighColorBrush | ||
| SystemChromeDisabledLowColor | SystemChromeDisabledLowColorBrush |
No open issues yet, or sync has not completed.