Skip to content

Commit 7fcc2d8

Browse files
authored
Merge pull request #879 from lepoco/development
Merge development and bump version to preview 13
2 parents 538af8b + e54bdbd commit 7fcc2d8

40 files changed

+1184
-119
lines changed

Directory.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<PropertyGroup>
4-
<Version>3.0.0-preview.12</Version>
4+
<Version>3.0.0-preview.13</Version>
55
<LangVersion>12.0</LangVersion>
66
<Deterministic>true</Deterministic>
77
</PropertyGroup>

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ https://marketplace.visualstudio.com/items?itemName=lepo.wpf-ui
4343

4444
| Name | Framework |
4545
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
46-
| **Wpf.Ui**<br />Library that allows you to use all features in your own application | [![NET6](https://img.shields.io/badge/.NET-6.0-yellow)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui/Wpf.Ui.csproj) [![NET7](https://img.shields.io/badge/.NET-7.0-purple)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui/Wpf.Ui.csproj)<br/>[![NETCore3](https://img.shields.io/badge/.NET%20Core-3.1-brightgreen)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui/Wpf.Ui.csproj)<br/>[![NETFramework48](https://img.shields.io/badge/.NET%20Framework-4.8-orange)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui/Wpf.Ui.csproj)<br/>[![NETFramework472](https://img.shields.io/badge/.NET%20Framework-4.7.2-orange)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui/Wpf.Ui.csproj)<br/>[![NETFramework462](https://img.shields.io/badge/.NET%20Framework-4.6.2-orange)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui/Wpf.Ui.csproj) |
47-
| **Wpf.Ui.Gallery**<br />Application with all controls. | [![NET7-win](https://img.shields.io/badge/.NET-7.0--windows-purple)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui.Gallery/Wpf.Ui.Gallery.csproj) |
48-
| **Wpf.Ui.Demo.Mvvm**<br />An MVVM app written in WPF .NET 6 where you can test the features. | [![NET7-win](https://img.shields.io/badge/.NET-7.0--windows-purple)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui.Demo.Mvvm/Wpf.Ui.Demo.Mvvm.csproj) |
49-
| **Wpf.Ui.Demo.Simple**<br />Simple .NET 7 app with navigation. | [![NET7-win](https://img.shields.io/badge/.NET-7.0--windows-purple)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui.Demo.Simple/Wpf.Ui.Demo.Simple.csproj) |
50-
| **Wpf.Ui.FontMapper**<br />Console app for generating Fluent System Icons enums. | [![NET7](https://img.shields.io/badge/.NET-7.0-purple)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui.FontMapper/Wpf.Ui.FontMapper.csproj) |
46+
| **Wpf.Ui**<br />Library that allows you to use all features in your own application | [![NET7](https://img.shields.io/badge/.NET-8.0-purple)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui/Wpf.Ui.csproj) [![NET6](https://img.shields.io/badge/.NET-6.0-yellow)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui/Wpf.Ui.csproj)<br/>[![NETCore3](https://img.shields.io/badge/.NET%20Core-3.1-brightgreen)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui/Wpf.Ui.csproj)<br/>[![NETFramework48](https://img.shields.io/badge/.NET%20Framework-4.8-orange)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui/Wpf.Ui.csproj)<br/>[![NETFramework472](https://img.shields.io/badge/.NET%20Framework-4.7.2-orange)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui/Wpf.Ui.csproj)<br/>[![NETFramework462](https://img.shields.io/badge/.NET%20Framework-4.6.2-orange)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui/Wpf.Ui.csproj) |
47+
| **Wpf.Ui.Gallery**<br />Application with all controls. | [![NET7-win](https://img.shields.io/badge/.NET-8.0--windows-purple)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui.Gallery/Wpf.Ui.Gallery.csproj) |
48+
| **Wpf.Ui.Demo.Mvvm**<br />An MVVM app written in WPF .NET 6 where you can test the features. | [![NET7-win](https://img.shields.io/badge/.NET-8.0--windows-purple)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui.Demo.Mvvm/Wpf.Ui.Demo.Mvvm.csproj) |
49+
| **Wpf.Ui.Demo.Simple**<br />Simple .NET 7 app with navigation. | [![NET7-win](https://img.shields.io/badge/.NET-8.0--windows-purple)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui.Demo.Simple/Wpf.Ui.Demo.Simple.csproj) |
50+
| **Wpf.Ui.FontMapper**<br />Console app for generating Fluent System Icons enums. | [![NET7](https://img.shields.io/badge/.NET-8.0-purple)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui.FontMapper/Wpf.Ui.FontMapper.csproj) |
5151
| **Wpf.Ui.Extension**<br />Project for Visual Studio 2022 extension. | [![NETFramework48](https://img.shields.io/badge/.NET%20Framework-4.8-orange)](https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui.Extension/Wpf.Ui.Extension/Wpf.Ui.Extension.csproj) |
5252

5353
## 📷 Screenshots
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// This Source Code Form is subject to the terms of the MIT License.
2+
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
3+
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
4+
// All Rights Reserved.
5+
6+
namespace Wpf.Ui.Gallery.ViewModels.Pages.Layout;
7+
8+
public partial class CardActionViewModel : ObservableObject
9+
{
10+
public CardActionViewModel() { }
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// This Source Code Form is subject to the terms of the MIT License.
2+
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
3+
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
4+
// All Rights Reserved.
5+
6+
using Wpf.Ui.Controls;
7+
8+
namespace Wpf.Ui.Gallery.ViewModels.Pages.StatusAndInfo;
9+
10+
public partial class InfoBadgeViewModel : ObservableObject
11+
{
12+
[ObservableProperty]
13+
private InfoBadgeSeverity _infoBadgeSeverity = InfoBadgeSeverity.Attention;
14+
15+
private int _infoBadgeSeverityComboBoxSelectedIndex = 0;
16+
17+
public int InfoBadgeSeverityComboBoxSelectedIndex
18+
{
19+
get => _infoBadgeSeverityComboBoxSelectedIndex;
20+
set
21+
{
22+
_ = SetProperty(ref _infoBadgeSeverityComboBoxSelectedIndex, value);
23+
InfoBadgeSeverity = ConvertIndexToInfoBadgeSeverity(value);
24+
}
25+
}
26+
27+
private InfoBadgeSeverity ConvertIndexToInfoBadgeSeverity(int value)
28+
{
29+
return value switch
30+
{
31+
1 => InfoBadgeSeverity.Informational,
32+
2 => InfoBadgeSeverity.Success,
33+
3 => InfoBadgeSeverity.Caution,
34+
4 => InfoBadgeSeverity.Critical,
35+
_ => InfoBadgeSeverity.Attention
36+
};
37+
}
38+
}

src/Wpf.Ui.Gallery/ViewModels/Windows/MainWindowViewModel.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ public partial class MainWindowViewModel : ObservableObject
105105
MenuItems = new object[]
106106
{
107107
new NavigationViewItem("Expander", typeof(ExpanderPage)),
108-
new NavigationViewItem("CardControl", typeof(CardControlPage))
108+
new NavigationViewItem("CardControl", typeof(CardControlPage)),
109+
new NavigationViewItem("CardAction", typeof(CardActionPage))
109110
},
110111
},
111112
#endif
@@ -141,6 +142,7 @@ public partial class MainWindowViewModel : ObservableObject
141142
{
142143
MenuItems = new object[]
143144
{
145+
new NavigationViewItem("InfoBadge", typeof(InfoBadgePage)),
144146
new NavigationViewItem("InfoBar", typeof(InfoBarPage)),
145147
new NavigationViewItem("ProgressBar", typeof(ProgressBarPage)),
146148
new NavigationViewItem("ProgressRing", typeof(ProgressRingPage)),
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<Page
2+
x:Class="Wpf.Ui.Gallery.Views.Pages.Layout.CardActionPage"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:controls="clr-namespace:Wpf.Ui.Gallery.Controls"
6+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7+
xmlns:local="clr-namespace:Wpf.Ui.Gallery.Views.Pages.Layout"
8+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9+
xmlns:system="clr-namespace:System;assembly=System.Runtime"
10+
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
11+
Title="CardActionPage"
12+
d:DesignHeight="450"
13+
d:DesignWidth="800"
14+
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
15+
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
16+
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
17+
mc:Ignorable="d">
18+
<StackPanel Margin="0,0,0,24">
19+
<controls:ControlExample
20+
Margin="0"
21+
HeaderText="A CardAction with an ImageIcon and a header."
22+
XamlCode="&lt;ui:CardAction Icon=&quot;{ui:ImageIcon 'pack://application:,,,/Assets/wpfui.png'}&quot; /&gt;">
23+
<Grid>
24+
<Grid.ColumnDefinitions>
25+
<ColumnDefinition Width="*" />
26+
<ColumnDefinition Width="Auto" />
27+
</Grid.ColumnDefinitions>
28+
<ui:CardAction Grid.Column="0" Icon="{ui:ImageIcon 'pack://application:,,,/Assets/wpfui.png'}">
29+
<StackPanel>
30+
<ui:TextBlock
31+
Margin="0"
32+
FontTypography="Body"
33+
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
34+
Text="This is the header text"
35+
TextWrapping="WrapWithOverflow" />
36+
</StackPanel>
37+
</ui:CardAction>
38+
</Grid>
39+
</controls:ControlExample>
40+
<controls:ControlExample
41+
Margin="0,32,0,0"
42+
HeaderText="A CardAction with an icon, a header and a description."
43+
XamlCode="&lt;ui:CardAction Icon=&quot;{ui:SymbolIcon Fluent24}&quot; /&gt;">
44+
<Grid>
45+
<Grid.ColumnDefinitions>
46+
<ColumnDefinition Width="*" />
47+
<ColumnDefinition Width="Auto" />
48+
</Grid.ColumnDefinitions>
49+
<ui:CardAction Grid.Column="0" Icon="{ui:SymbolIcon DocumentEdit20, FontSize=43, Filled=False}">
50+
<StackPanel>
51+
<ui:TextBlock
52+
Margin="0"
53+
FontTypography="BodyStrong"
54+
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
55+
Text="This is the header text"
56+
TextWrapping="WrapWithOverflow" />
57+
<ui:TextBlock
58+
Appearance="Secondary"
59+
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
60+
Text="This is a description text."
61+
TextWrapping="WrapWithOverflow" />
62+
</StackPanel>
63+
</ui:CardAction>
64+
</Grid>
65+
</controls:ControlExample>
66+
67+
</StackPanel>
68+
</Page>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// This Source Code Form is subject to the terms of the MIT License.
2+
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
3+
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
4+
// All Rights Reserved.
5+
6+
using System;
7+
using System.Collections.Generic;
8+
using System.Linq;
9+
using System.Text;
10+
using System.Threading.Tasks;
11+
using System.Windows;
12+
using System.Windows.Controls;
13+
using System.Windows.Data;
14+
using System.Windows.Documents;
15+
using System.Windows.Input;
16+
using System.Windows.Media;
17+
using System.Windows.Media.Imaging;
18+
using System.Windows.Navigation;
19+
using System.Windows.Shapes;
20+
using Wpf.Ui.Controls;
21+
using Wpf.Ui.Gallery.ControlsLookup;
22+
using Wpf.Ui.Gallery.ViewModels.Pages.Layout;
23+
24+
namespace Wpf.Ui.Gallery.Views.Pages.Layout;
25+
26+
/// <summary>
27+
/// Interaction logic for CardActionPage.xaml
28+
/// </summary>
29+
[GalleryPage("Card action control.", SymbolRegular.Code24)]
30+
public partial class CardActionPage : INavigableView<CardActionViewModel>
31+
{
32+
public CardActionPage(CardActionViewModel viewModel)
33+
{
34+
InitializeComponent();
35+
ViewModel = viewModel;
36+
}
37+
38+
public CardActionViewModel ViewModel { get; }
39+
}

0 commit comments

Comments
 (0)