Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
b1c1eb8
Show 'SystemMenu' on mouse right button up.
LHTXQ May 6, 2023
453747e
Merge branch 'development' of https://github.com/lepoco/wpfui into pr…
pomianowski Nov 13, 2023
ecbc0b6
Merge branch 'development' of https://github.com/lepoco/wpfui into pr…
pomianowski Nov 13, 2023
fe0e142
Rollback changes
pomianowski Nov 13, 2023
c81692b
Merge branch 'development' into main
pomianowski Nov 14, 2023
1f4cf3a
Fix issue where on launching content dialog, dialog is not focused.
jackBonadies Feb 5, 2024
1b92920
Fix issue where on tabbing focus can leave content dialog and focus b…
jackBonadies Feb 5, 2024
d63400b
Merge branch 'development' into development
pomianowski Feb 5, 2024
4c4e6a9
Merge pull request #931 from jackBonadies/development
pomianowski Feb 5, 2024
739a556
Update README.md
ricaun Feb 5, 2024
939e2bb
Update README.md
pomianowski Feb 5, 2024
bff393b
Merge pull request #932 from ricaun/patch-1
pomianowski Feb 5, 2024
b8f109f
Update NavigationViewCompact.xaml
Nirmal2506 Feb 7, 2024
add846d
Update NavigationViewLeftMinimalCompact.xaml
Nirmal2506 Feb 7, 2024
725a153
Update TitleBar.xaml
Nirmal2506 Feb 7, 2024
b1762cf
[NavSvc] add dataContext to INavigationService.Navigate*()
Palatis Feb 9, 2024
c080436
make `NavigationService` throw-helpers protected
Palatis Feb 9, 2024
4bc1799
Make 'TitleBarButton' public to enable re-templating 'TitleBar'.
kevfrench Feb 11, 2024
6b3eed1
Merge branch 'development' into titlebarbutton-accessibility
kevfrench Feb 11, 2024
5725019
Update NavigationView.Properties.cs
scanfing Feb 20, 2024
43af100
add null check befor UpdateMenuItemsTemplate/AddItemsToDictionaries w…
scanfing Feb 20, 2024
919746e
Don't focus on buttons in text input controls with Tab
tmijail Feb 26, 2024
232be52
Don't focus on ControlIcon in NumberBox
tmijail Feb 27, 2024
f883cd5
Decrease un-selectable whitespace by ensuring Grid has a background
tmijail Feb 27, 2024
322e13c
Eliminate un-selectable whitespace by ensuring there's no margin betw…
tmijail Feb 27, 2024
5e83ee1
Fixed progressbar orientation property.
Veritera Mar 5, 2024
90ee893
Merge pull request #988 from m0lDaViA/development
pomianowski Mar 11, 2024
f9eed39
Merge branch 'development' into ComboBoxWhitespace
tmijail Mar 11, 2024
e7e0f07
Merge branch 'development' into development
tmijail Mar 11, 2024
207dabb
Merge branch 'development' into titlebarbutton-accessibility
kevfrench Mar 12, 2024
c41d206
Fix mouse over color of TitleBarButton for TitleBarButtonType.Close
seasonyuu Mar 13, 2024
17689b8
Remove unused TitleBarButton mouse over trigger
seasonyuu Mar 13, 2024
3a0a100
ApplicationThemeManager.ApplySystemTheme accent fix
SamKr Mar 13, 2024
95072e4
Merge pull request #978 from tmijail/ComboBoxWhitespace
pomianowski Mar 13, 2024
4b82df3
Merge branch 'development' into development
pomianowski Mar 13, 2024
638277d
Merge pull request #993 from seasonyuu/development
pomianowski Mar 13, 2024
f0d6908
Merge branch 'development' into SamKr-dev-accent-patch
pomianowski Mar 13, 2024
07f7593
Merge branch 'development' into feature/navsvc/datacontext
pomianowski Mar 13, 2024
8454e5b
Merge pull request #944 from Palatis/feature/navsvc/datacontext
pomianowski Mar 13, 2024
ad3215d
Merge pull request #994 from SamKr/SamKr-dev-accent-patch
pomianowski Mar 13, 2024
5969812
Merge branch 'development' into development
pomianowski Mar 13, 2024
5e115e8
Merge pull request #975 from tmijail/development
pomianowski Mar 13, 2024
2b5e75e
Merge branch 'development' into development
pomianowski Mar 13, 2024
9d7b7fc
Merge branch 'development' into feature/navsvc/private_to_protected
pomianowski Mar 13, 2024
11018e2
Update NavigationService.cs
pomianowski Mar 13, 2024
e052220
Merge pull request #964 from scanfing/development
pomianowski Mar 13, 2024
233d9ac
Merge pull request #943 from Palatis/feature/navsvc/private_to_protected
pomianowski Mar 13, 2024
f697382
Update labeler.yml
pomianowski Mar 13, 2024
060e928
Merge branch 'development' into pomianowski-patch-1
pomianowski Mar 13, 2024
9762061
Update labeler.yml
pomianowski Mar 13, 2024
9113e68
Update labels.yml
pomianowski Mar 13, 2024
ef7ce87
Update Directory.Build.props
pomianowski Mar 13, 2024
1787398
Merge branch 'development' into patch-3
pomianowski Mar 13, 2024
49d3f86
Merge branch 'development' into main
pomianowski Mar 13, 2024
bd6adce
Merge branch 'development' into patch-1
pomianowski Mar 13, 2024
eb67db2
Merge pull request #627 from LHTXQ/main
pomianowski Mar 13, 2024
d7cc623
Merge pull request #940 from Nirmal2506/patch-3
pomianowski Mar 13, 2024
abcf613
Merge pull request #938 from Nirmal2506/patch-1
pomianowski Mar 13, 2024
fd8e743
Merge branch 'development' into titlebarbutton-accessibility
pomianowski Mar 13, 2024
155cfd6
Merge pull request #946 from kevfrench/titlebarbutton-accessibility
pomianowski Mar 13, 2024
af72469
Merge pull request #939 from Nirmal2506/patch-2
pomianowski Mar 13, 2024
6297a05
Merge branch 'development' into pomianowski-patch-1
pomianowski Mar 13, 2024
99f04c2
Update labeler.yml
pomianowski Mar 13, 2024
eefe270
Update TitleBar.cs
pomianowski Mar 13, 2024
bf07aaa
Create codeql-analysis.yml
pomianowski Mar 13, 2024
699edcb
Merge pull request #995 from lepoco/pomianowski-patch-1
pomianowski Mar 13, 2024
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
41 changes: 26 additions & 15 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,40 @@
---
PR:
- "*"

dotnet:
- '**/*.cs'

github_actions:
- .github/workflows/*
- ".github/workflows/*"

documentation:
- docs/*
- "docs/*"

update:
- src/Directory.Build.props
- "src/Directory.Build.props"

controls:
- src/Wpf.Ui/Controls/*
dependencies:
- "src/Packages.props"
- "branding/package.json"
- "src/Packages.props"

NuGet:
- "src/Packages.props"

styles:
- src/Wpf.Ui/Styles/*
- "src/Wpf.Ui/**/*.xaml"

icons:
- src/Wpf.Ui/Fonts/FluentSystemIcons-Filled.ttf
- src/Wpf.Ui/Fonts/FluentSystemIcons-Regular.ttf
themes:
- "src/Wpf.Ui/Appearance/*"

dependencies:
- src/Packages.props
- branding/package.json
tray:
- "src/Wpf.Ui.Tray/*"

NuGet:
- src/Packages.props
controls:
- "src/Wpf.Ui/Controls/*"

icons:
- "src/Wpf.Ui/Resources/Fonts/*"

navigation:
- "src/Wpf.Ui/Controls/NavigationView/*"
5 changes: 4 additions & 1 deletion .github/labels.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
- name: "icons"
color: "86CBEC"
description: "Fonts and icons updates"
Expand Down Expand Up @@ -47,6 +46,9 @@
- name: ".NET"
color: "7121c6"
description: "Pull requests that update .NET code."
- name: "dotnet"
color: "7121c6"
description: "Pull requests that update .NET code."
- name: "NuGet"
color: "004880"
description: "Update of the NuGet package."
Expand All @@ -71,3 +73,4 @@
- name: "wontfix"
color: "ffffff"
description: "This will not be worked on."

39 changes: 39 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
branches: [ development ]

jobs:
analyze:
name: Analyze
runs-on: windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- uses: microsoft/setup-msbuild@v1.3
with:
msbuild-architecture: x64

- name: Setup .NET Core SDK 8.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build src\Wpf.Ui.Gallery\Wpf.Ui.Gallery.csproj --configuration Release --no-restore

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: "csharp"

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Version>3.0.0</Version>
<Version>3.0.1</Version>
<LangVersion>12.0</LangVersion>
<Deterministic>true</Deterministic>
</PropertyGroup>
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,16 @@ public partial class MainWindow
Now you can create fantastic apps, e.g. with one button:

```xml
<ui:UiWindow
<ui:FluentWindow
...
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml">
<Grid>
<ui:Button
Content="Hello World"
Icon="Fluent24"/>
</Grid>
</ui:UiWindow>
<StackPanel>
<ui:TitleBar Title="WPF UI"/>
<ui:Card Margin="8">
<ui:Button Content="Hello World" Icon="{ui:SymbolIcon Fluent24}" />
</ui:Card>
</StackPanel>
</ui:FluentWindow>
```

## Special thanks
Expand Down
2 changes: 1 addition & 1 deletion src/Wpf.Ui/Appearance/ApplicationThemeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ systemTheme is SystemTheme.HC1 or SystemTheme.HC2 or SystemTheme.HCBlack or Syst
themeToSet = ApplicationTheme.HighContrast;
}

Apply(themeToSet);
Apply(themeToSet, updateAccent: updateAccent);
}

/// <summary>
Expand Down
7 changes: 3 additions & 4 deletions src/Wpf.Ui/Controls/ComboBox/ComboBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<Thickness x:Key="ComboBoxBorderThemeThickness">1,1,1,1</Thickness>
<Thickness x:Key="ComboBoxAccentBorderThemeThickness">0,0,0,2</Thickness>
<Thickness x:Key="ComboBoxChevronMargin">8,0,10,0</Thickness>
<Thickness x:Key="ComboBoxItemMargin">3,2,3,0</Thickness>
<Thickness x:Key="ComboBoxItemMargin">6,4,6,0</Thickness>
<Thickness x:Key="ComboBoxItemContentMargin">10,8,8,8</Thickness>
<system:Double x:Key="ComboBoxChevronSize">11.0</system:Double>
<system:Double x:Key="ComboBoxPopupMinHeight">32.0</system:Double>
Expand Down Expand Up @@ -92,7 +92,6 @@
<!-- Universal WPF UI focus -->
<Setter Property="Foreground" Value="{DynamicResource ComboBoxForeground}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Margin" Value="{StaticResource ComboBoxItemMargin}" />
<Setter Property="Padding" Value="{StaticResource ComboBoxItemContentMargin}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Border.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
Expand All @@ -101,10 +100,10 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
<Grid>
<Grid Background="Transparent">
<Border
Name="ContentBorder"
Margin="{TemplateBinding Margin}"
Margin="{DynamicResource ComboBoxItemMargin}"
Padding="0"
VerticalAlignment="Stretch"
CornerRadius="{TemplateBinding Border.CornerRadius}"
Expand Down
4 changes: 3 additions & 1 deletion src/Wpf.Ui/Controls/ContentDialog/ContentDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
<Setter Property="DialogMaxWidth" Value="1000" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Focusable" Value="False" />
<Setter Property="Focusable" Value="True" />
<Setter Property="KeyboardNavigation.TabNavigation" Value="Cycle" />
<Setter Property="KeyboardNavigation.DirectionalNavigation" Value="Cycle" />
<Setter Property="DialogMargin" Value="35" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Foreground" Value="{DynamicResource ContentDialogForeground}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// Copyright(c) Microsoft Corporation.All rights reserved.

using System.Collections;
using System.Collections.Specialized;
using System.Windows.Controls;
using Wpf.Ui.Animations;

Expand Down Expand Up @@ -82,7 +83,7 @@ public partial class NavigationView
nameof(FooterMenuItemsProperty),
typeof(IList),
typeof(NavigationView),
new FrameworkPropertyMetadata(null)
new FrameworkPropertyMetadata(null, OnFooterMenuItemsPropertyChanged)
);

/// <summary>
Expand Down Expand Up @@ -513,16 +514,45 @@ private static void OnMenuItemsPropertyChanged(DependencyObject? d, DependencyPr

if (navigationView.MenuItemsItemsControl is null)
{
navigationView.UpdateCollectionChangedEvent(e.OldValue as IList, e.NewValue as IList);
return;
}

if (navigationView.MenuItemsItemsControl.ItemsSource.Equals(enumerableNewValue))
{
navigationView.UpdateMenuItemsTemplate(enumerableNewValue);
return;
}

navigationView.MenuItemsItemsControl.ItemsSource = null;
navigationView.MenuItemsItemsControl.ItemsSource = enumerableNewValue;
navigationView.UpdateMenuItemsTemplate(enumerableNewValue);
navigationView.AddItemsToDictionaries(enumerableNewValue);

navigationView.UpdateCollectionChangedEvent(e.OldValue as IList, e.NewValue as IList);
}

private void UpdateCollectionChangedEvent(IList? oldMenuItems, IList? newMenuItems)
{
if(oldMenuItems is INotifyCollectionChanged notifyCollection)
{
notifyCollection.CollectionChanged -= OnMenuItems_CollectionChanged;
}
if(newMenuItems is INotifyCollectionChanged newNotifyCollection)
{
newNotifyCollection.CollectionChanged += OnMenuItems_CollectionChanged;
}
}

private void OnMenuItems_CollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
{
if (e.NewItems is null)
{
return;
}

UpdateMenuItemsTemplate(e.NewItems);
AddItemsToDictionaries(e.NewItems);
}

private static void OnMenuItemsSourcePropertyChanged(
Expand Down Expand Up @@ -551,6 +581,31 @@ DependencyPropertyChangedEventArgs e
navigationView.FooterMenuItems = enumerableNewValue;
}

private static void OnFooterMenuItemsPropertyChanged(DependencyObject? d, DependencyPropertyChangedEventArgs e)
{
if (d is not NavigationView navigationView || e.NewValue is not IList enumerableNewValue)
{
return;
}

if (navigationView.FooterMenuItemsItemsControl is null)
{
navigationView.UpdateCollectionChangedEvent(e.OldValue as IList, e.NewValue as IList);
return;
}

if (navigationView.FooterMenuItemsItemsControl.ItemsSource.Equals(enumerableNewValue))
{
return;
}

navigationView.FooterMenuItemsItemsControl.ItemsSource = null;
navigationView.FooterMenuItemsItemsControl.ItemsSource = enumerableNewValue;
navigationView.UpdateMenuItemsTemplate(enumerableNewValue);
navigationView.AddItemsToDictionaries(enumerableNewValue);
navigationView.UpdateCollectionChangedEvent(e.OldValue as IList, e.NewValue as IList);
}

private static void OnPaneDisplayModePropertyChanged(
DependencyObject? d,
DependencyPropertyChangedEventArgs e
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<Border
x:Name="MainBorder"
Grid.Row="0"
MinWidth="310"
MinWidth="40"
MinHeight="40"
Margin="0"
Padding="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<Border
x:Name="MainBorder"
Grid.Row="0"
MinWidth="310"
MinWidth="40"
MinHeight="40"
Margin="0"
Padding="0"
Expand Down
5 changes: 5 additions & 0 deletions src/Wpf.Ui/Controls/NumberBox/NumberBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
VerticalAlignment="Top"
Content="{TemplateBinding Icon}"
FontSize="16"
IsTabStop="False"
Foreground="{TemplateBinding Foreground}" />
<Grid Grid.Column="1" Margin="{TemplateBinding Padding}">
<Decorator
Expand Down Expand Up @@ -115,6 +116,7 @@
Command="{Binding Path=TemplateButtonCommand, RelativeSource={RelativeSource TemplatedParent}}"
CommandParameter="clear"
Cursor="Arrow"
IsTabStop="False"
Foreground="{DynamicResource TextControlButtonForeground}">
<controls:Button.Icon>
<controls:SymbolIcon FontSize="{StaticResource NumberBoxButtonIconSize}" Symbol="Dismiss24" />
Expand All @@ -138,6 +140,7 @@
CommandParameter="increment"
Cursor="Arrow"
Foreground="{DynamicResource TextControlButtonForeground}"
IsTabStop="False"
Visibility="Collapsed">
<controls:Button.Icon>
<controls:SymbolIcon FontSize="{StaticResource NumberBoxButtonIconSize}" Symbol="ChevronUp24" />
Expand All @@ -162,6 +165,7 @@
Cursor="Arrow"
FontSize="{StaticResource NumberBoxButtonIconSize}"
Foreground="{DynamicResource TextControlButtonForeground}"
IsTabStop="False"
Visibility="Collapsed">
<controls:Button.Icon>
<controls:SymbolIcon FontSize="{StaticResource NumberBoxButtonIconSize}" Symbol="ChevronDown24" />
Expand All @@ -175,6 +179,7 @@
VerticalAlignment="Top"
Content="{TemplateBinding Icon}"
FontSize="16"
IsTabStop="False"
Foreground="{TemplateBinding Foreground}" />
</Grid>
</Border>
Expand Down
2 changes: 2 additions & 0 deletions src/Wpf.Ui/Controls/PasswordBox/PasswordBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@
Command="{Binding Path=TemplateButtonCommand, RelativeSource={RelativeSource TemplatedParent}}"
CommandParameter="clear"
Cursor="Arrow"
IsTabStop="False"
Foreground="{DynamicResource TextControlButtonForeground}">
<controls:Button.Icon>
<controls:SymbolIcon FontSize="{StaticResource PasswordBoxButtonIconSize}" Symbol="Dismiss24" />
Expand All @@ -229,6 +230,7 @@
Command="{Binding Path=TemplateButtonCommand, RelativeSource={RelativeSource TemplatedParent}}"
CommandParameter="reveal"
Cursor="Arrow"
IsTabStop="False"
Foreground="{DynamicResource TextControlButtonForeground}">
<controls:Button.Icon>
<controls:SymbolIcon FontSize="{StaticResource PasswordBoxButtonIconSize}" Symbol="Eye24" />
Expand Down
Loading