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

Merge Development #817

Merged
merged 51 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
b1a369e
feat(CardControl): add CornerRadius support
xmine64 Jul 18, 2023
8f93196
feat(Wpf.Ui.Gallery): add CardControl
xmine64 Jul 18, 2023
5191a77
feat(AutomationPeers): add CardControlAutomationPeer
xmine64 Jul 18, 2023
1d6efd9
ProgressBar and ProgressRing
niels9001 Oct 22, 2023
9a28cc4
RadioButton
niels9001 Oct 22, 2023
20280bc
BreadcrumbBar
niels9001 Oct 22, 2023
8c7d952
RichSuggestBox
niels9001 Oct 22, 2023
006043e
XAML styler
niels9001 Oct 22, 2023
a09d81e
ScrollBar
niels9001 Oct 22, 2023
161d448
XAML styler
niels9001 Oct 22, 2023
ec2cca6
Separator
niels9001 Oct 22, 2023
6f082a7
Slider
niels9001 Oct 22, 2023
8251363
Fix Calendar
niels9001 Oct 22, 2023
bd06b8c
Expander
niels9001 Oct 22, 2023
d87ee38
SnackBar
niels9001 Oct 22, 2023
9529bd6
ToolTip
niels9001 Oct 23, 2023
956c06a
SplitButton
niels9001 Oct 23, 2023
21bc4e9
TabControl / TabView
niels9001 Oct 23, 2023
f4058d0
TimePicker
niels9001 Oct 23, 2023
0b6c7a0
TitleBar
niels9001 Oct 23, 2023
bad6c09
TimePicker
niels9001 Oct 23, 2023
a4ea027
ToggleButton
niels9001 Oct 23, 2023
75f26d0
ToggleSwitch
niels9001 Oct 23, 2023
a908ec9
Cards
niels9001 Oct 23, 2023
1833127
Formatting
niels9001 Oct 23, 2023
bb36995
Bump actions/setup-node from 3 to 4
dependabot[bot] Oct 23, 2023
cbbcc69
TreeView
niels9001 Oct 24, 2023
c82847a
Adding highcontrast resources
niels9001 Oct 26, 2023
62931e2
Adding logic to detect highcontrast themes
niels9001 Oct 26, 2023
846376a
Merge branch 'development' into niels9001/colormanagement-v2
niels9001 Oct 26, 2023
06ad080
Adding colors of the other contrast themes as comments
niels9001 Oct 26, 2023
bf00bfb
Fixed OnClosed method
Oct 31, 2023
c3b1fe5
Merge pull request #802 from niels9001/niels9001/colormanagement-v2
pomianowski Nov 8, 2023
b100a59
Merge branch 'development' into dependabot/github_actions/development…
pomianowski Nov 8, 2023
8a40df2
Merge pull request #796 from lepoco/dependabot/github_actions/develop…
pomianowski Nov 8, 2023
f8fa323
Merge branch 'development' into main
pomianowski Nov 8, 2023
8b8e056
Fix NullReferenceException in AutoSuggestBox ReleaseTemplateResources.
Redvo Nov 9, 2023
5dd8c84
Add AutoSuggestBox internal event resubscriptions to Loaded event.
Redvo Nov 9, 2023
b658a35
Fixing background
niels9001 Nov 10, 2023
35af6ee
Support for other HC themes
niels9001 Nov 10, 2023
14f8916
Updating BG
niels9001 Nov 10, 2023
23c8773
Merge pull request #814 from niels9001/niels9001/themefix
pomianowski Nov 13, 2023
ac00399
Merge branch 'development' into development
pomianowski Nov 13, 2023
fa31558
Merge branch 'development' into main
pomianowski Nov 13, 2023
d7961ee
Merge pull request #806 from IOL0ol1/main
pomianowski Nov 13, 2023
2ebdb8f
Merge pull request #812 from Redvo/development
pomianowski Nov 13, 2023
11e1fb3
Merge branch 'development' of https://github.com/lepoco/wpfui into pr…
pomianowski Nov 13, 2023
e7ba446
Merge pull request #707 from xmine64/card_control_update
pomianowski Nov 13, 2023
4efc6b4
Format code
pomianowski Nov 13, 2023
15a55ae
Bump version
pomianowski Nov 13, 2023
d9f9fa4
Merge pull request #815 from lepoco/update/preview-9
pomianowski Nov 13, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/wpf-ui-cd-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Setup .NET Core SDK 7.x
Expand Down
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-preview.8</Version>
<Version>3.0.0-preview.9</Version>
<LangVersion>11.0</LangVersion>
<Deterministic>true</Deterministic>
</PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion docs/codesnippet/Rtf/Hyperlink/RtfDocumentProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace RtfDocumentProcessors
using System.Linq;
using System.Web;
using System.Xml.Linq;

using Microsoft.DocAsCode.Plugins;
using Microsoft.DocAsCode.Utility;

Expand Down
1 change: 0 additions & 1 deletion docs/codesnippet/Rtf/RtfBuildStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ namespace RtfDocumentProcessors
using System.Composition;
using System.Threading.Tasks;
using System.Threading.Tasks.Schedulers;

using MarkupConverter;
using Microsoft.DocAsCode.Plugins;

Expand Down
1 change: 0 additions & 1 deletion docs/codesnippet/Rtf/RtfDocumentProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ namespace RtfDocumentProcessors
using System.Collections.Immutable;
using System.Composition;
using System.IO;

using Microsoft.DocAsCode.Common;
using Microsoft.DocAsCode.Plugins;

Expand Down
6 changes: 3 additions & 3 deletions src/Wpf.Ui.Extension.Template.Compact/Usings.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
global using System;
global using System.Windows;
global using CommunityToolkit.Mvvm.ComponentModel;
global using CommunityToolkit.Mvvm.ComponentModel;
global using CommunityToolkit.Mvvm.Input;
global using System;
global using System.Windows;
global using Wpf.Ui.Services;
6 changes: 3 additions & 3 deletions src/Wpf.Ui.Extension.Template.Fluent/Usings.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
global using System;
global using System.Windows;
global using CommunityToolkit.Mvvm.ComponentModel;
global using CommunityToolkit.Mvvm.ComponentModel;
global using CommunityToolkit.Mvvm.Input;
global using System;
global using System.Windows;
global using Wpf.Ui.Services;
3 changes: 2 additions & 1 deletion src/Wpf.Ui.FontMapper/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ await httpClient.GetFromJsonAsync<IEnumerable<GitTag>>(
)
)
?.Last()
?.Ref.Replace("refs/tags/", String.Empty)
?.Ref
.Replace("refs/tags/", String.Empty)
.Trim() ?? throw new Exception("Unable to parse the version string");
}

Expand Down
9 changes: 5 additions & 4 deletions src/Wpf.Ui.Gallery/Controls/ControlExample.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,31 @@
Grid.Row="0"
Margin="0,0,0,10"
FontTypography="BodyStrong"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Text="{TemplateBinding HeaderText}"
Visibility="{TemplateBinding HeaderText,
Converter={StaticResource NullToVisibilityConverter}}" />

<Border
Grid.Row="1"
Padding="16"
Background="{ui:ThemeResource CardStrokeColorDefaultBrush}"
BorderBrush="{ui:ThemeResource ControlElevationBorderBrush}"
Background="{ui:ThemeResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{ui:ThemeResource CardStrokeColorDefaultBrush}"
BorderThickness="1,1,1,0"
CornerRadius="8,8,0,0">
<ContentPresenter Content="{TemplateBinding ExampleContent}" />
</Border>

<ui:CardExpander
Grid.Row="2"
Background="{ui:ThemeResource CardBackgroundFillColorSecondaryBrush}"
CornerRadius="0,0,8,8"
Header="Source code">
<StackPanel>
<StackPanel x:Name="XamlCodeBlock">
<ui:TextBlock
Margin="0,0,0,5"
FontTypography="BodyStrong"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Text="XAML" />

<syntax:CodeBlock
Expand All @@ -63,14 +64,14 @@
<Border
x:Name="Border"
Margin="0,20"
BorderBrush="{ui:ThemeResource CardBackgroundFillColorDefaultBrush}"
BorderThickness="1"
Visibility="Visible" />

<StackPanel x:Name="CsharpCodeBlock">
<ui:TextBlock
Margin="0,0,0,5"
FontTypography="BodyStrong"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Text="C#" />

<syntax:CodeBlock
Expand Down
11 changes: 8 additions & 3 deletions src/Wpf.Ui.Gallery/Controls/GalleryNavigationPresenter.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ResourceDictionary
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:basicInput="clr-namespace:Wpf.Ui.Gallery.Views.Pages.BasicInput"
Expand All @@ -24,16 +24,21 @@
CommandParameter="{Binding PageType, Mode=OneTime}"
IsChevronVisible="True">
<ui:CardAction.Icon>
<ui:SymbolIcon FontSize="30" Symbol="{Binding Icon, Mode=OneTime}" />
<ui:SymbolIcon
FontSize="30"
Symbol="{Binding Icon, Mode=OneTime}"
TextElement.Foreground="{DynamicResource TextFillColorPrimaryBrush}" />
</ui:CardAction.Icon>
<StackPanel>
<ui:TextBlock
Margin="0"
FontTypography="BodyStrong"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Text="{Binding Name, Mode=OneTime}"
TextWrapping="WrapWithOverflow" />
<ui:TextBlock
Appearance="Tertiary"
Appearance="Secondary"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Text="{Binding Description, Mode=OneTime}"
TextWrapping="WrapWithOverflow" />
</StackPanel>
Expand Down
11 changes: 7 additions & 4 deletions src/Wpf.Ui.Gallery/Controls/GalleryNavigationPresenter.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ private void OnTemplateButtonClick(Type? pageType)
}

#if DEBUG
System.Diagnostics.Debug.WriteLine(
$"INFO | {nameof(GalleryNavigationPresenter)} navigated, ({pageType})",
"Wpf.Ui.Gallery"
);
System
.Diagnostics
.Debug
.WriteLine(
$"INFO | {nameof(GalleryNavigationPresenter)} navigated, ({pageType})",
"Wpf.Ui.Gallery"
);
#endif
}
}
13 changes: 8 additions & 5 deletions src/Wpf.Ui.Gallery/Controls/PageControlDocumentation.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,13 @@ private static void SwitchThemes()
{
var currentTheme = Wpf.Ui.Appearance.ApplicationThemeManager.GetAppTheme();

Wpf.Ui.Appearance.ApplicationThemeManager.Apply(
currentTheme == Wpf.Ui.Appearance.ApplicationTheme.Light
? Wpf.Ui.Appearance.ApplicationTheme.Dark
: Wpf.Ui.Appearance.ApplicationTheme.Light
);
Wpf.Ui
.Appearance
.ApplicationThemeManager
.Apply(
currentTheme == Wpf.Ui.Appearance.ApplicationTheme.Light
? Wpf.Ui.Appearance.ApplicationTheme.Dark
: Wpf.Ui.Appearance.ApplicationTheme.Light
);
}
}
3 changes: 2 additions & 1 deletion src/Wpf.Ui.Gallery/ControlsLookup/ControlPages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ static class ControlPages
public static IEnumerable<GalleryPage> All()
{
foreach (
var type in GalleryAssembly.Asssembly
var type in GalleryAssembly
.Asssembly
.GetTypes()
.Where(t => t.IsDefined(typeof(GalleryPageAttribute)))
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

namespace Wpf.Ui.Gallery.ViewModels.Pages.Layout;

public partial class CardControlViewModel : ObservableObject
{
public CardControlViewModel() { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ public partial class MainWindowViewModel : ObservableObject
#if DEBUG
new NavigationViewItem("Layout", SymbolRegular.News24, typeof(LayoutPage))
{
MenuItems = new object[] { new NavigationViewItem("Expander", typeof(ExpanderPage)) }
MenuItems = new object[]
{
new NavigationViewItem("Expander", typeof(ExpanderPage)),
new NavigationViewItem("CardControl", typeof(CardControlPage))
},
},
#endif
new NavigationViewItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

using Microsoft.Web.WebView2.Wpf;
using System.Windows.Threading;
using Microsoft.Web.WebView2.Wpf;
using Wpf.Ui.Gallery.Controllers;
using Wpf.Ui.Gallery.Models.Monaco;

Expand Down
13 changes: 7 additions & 6 deletions src/Wpf.Ui.Gallery/Views/Pages/DashboardPage.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Page
<Page
x:Class="Wpf.Ui.Gallery.Views.Pages.DashboardPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Expand Down Expand Up @@ -117,7 +117,8 @@
Text="Basic input"
TextWrapping="WrapWithOverflow" />
<ui:TextBlock
Appearance="Tertiary"
Appearance="Secondary"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Text="Buttons, CheckBoxes, Sliders..."
TextWrapping="WrapWithOverflow" />
</StackPanel>
Expand Down Expand Up @@ -154,8 +155,8 @@
Text="Dialogs &amp; Flyouts"
TextWrapping="WrapWithOverflow" />
<ui:TextBlock
Appearance="Tertiary"
Foreground="{DynamicResource TextFillColorTertiaryBrush}"
Appearance="Secondary"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Text="Contextual notifications."
TextWrapping="WrapWithOverflow" />
</StackPanel>
Expand Down Expand Up @@ -192,8 +193,8 @@
Text="Navigation"
TextWrapping="WrapWithOverflow" />
<ui:TextBlock
Appearance="Tertiary"
Foreground="{DynamicResource TextFillColorTertiaryBrush}"
Appearance="Secondary"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Text="Managing the displayed pages."
TextWrapping="WrapWithOverflow" />
</StackPanel>
Expand Down
40 changes: 40 additions & 0 deletions src/Wpf.Ui.Gallery/Views/Pages/Layout/CardControlPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<Page
x:Class="Wpf.Ui.Gallery.Views.Pages.Layout.CardControlPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Wpf.Ui.Gallery.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Wpf.Ui.Gallery.Views.Pages.Layout"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:system="clr-namespace:System;assembly=System.Runtime"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
Title="CardControlPage"
d:DesignHeight="450"
d:DesignWidth="800"
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
mc:Ignorable="d">

<controls:ControlExample
Margin="0"
HeaderText="A card control with a header and a button."
XamlCode="&lt;ui:CardControl Header=&quot;This is the header text.&quot; /&gt;">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ui:CardControl Grid.Column="0">
<ui:CardControl.Header>
<TextBlock Text="This is the header text." />
</ui:CardControl.Header>
<ui:CardControl.Content>
<ui:Button Content="Button" />
</ui:CardControl.Content>
</ui:CardControl>

</Grid>
</controls:ControlExample>
<!-- TODO: Add CardAction -->
</Page>
39 changes: 39 additions & 0 deletions src/Wpf.Ui.Gallery/Views/Pages/Layout/CardControlPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Wpf.Ui.Controls;
using Wpf.Ui.Gallery.ControlsLookup;
using Wpf.Ui.Gallery.ViewModels.Pages.Layout;

namespace Wpf.Ui.Gallery.Views.Pages.Layout;

/// <summary>
/// Interaction logic for CardControlPage.xaml
/// </summary>
[GalleryPage("Card control.", SymbolRegular.CardUi24)]
public partial class CardControlPage : INavigableView<CardControlViewModel>
{
public CardControlPage(CardControlViewModel viewModel)
{
InitializeComponent();
ViewModel = viewModel;
}

public CardControlViewModel ViewModel { get; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
</ui:IconSourceElement>
</Setter.Value>
</Setter>
<Setter Property="FontSize" Value="16" />
<Setter Property="FontWeight" Value="Regular" />
</Style>
</ResourceDictionary>
Expand Down
9 changes: 3 additions & 6 deletions src/Wpf.Ui.Gallery/Views/Pages/SettingsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
IsDesignTimeCreatable=False}"
d:DesignHeight="450"
d:DesignWidth="800"
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
mc:Ignorable="d">

<StackPanel Margin="0,0,0,24">
Expand All @@ -37,7 +34,7 @@
Text="App theme" />
<ui:TextBlock
Grid.Row="1"
Foreground="{ui:ThemeResource TextFillColorTertiaryBrush}"
Foreground="{ui:ThemeResource TextFillColorSecondaryBrush}"
Text="Select which app theme to display" />
</Grid>
</ui:CardControl.Header>
Expand Down Expand Up @@ -93,15 +90,15 @@
<ui:TextBlock
Grid.Row="1"
Grid.Column="0"
Foreground="{ui:ThemeResource TextFillColorTertiaryBrush}"
Foreground="{ui:ThemeResource TextFillColorSecondaryBrush}"
Text="© 2023 lepo.co | Leszek Pomianowski &amp; WPF UI Contributors" />
<TextBlock
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="1"
Margin="0,0,16,0"
VerticalAlignment="Center"
Foreground="{ui:ThemeResource TextFillColorTertiaryBrush}"
Foreground="{ui:ThemeResource TextFillColorSecondaryBrush}"
Text="{Binding ViewModel.AppVersion, Mode=OneWay}" />
</Grid>
</ui:CardExpander.Header>
Expand Down
Loading
Loading