Skip to content

Commit

Permalink
Merge pull request #879 from lepoco/development
Browse files Browse the repository at this point in the history
Merge development and bump version to preview 13
  • Loading branch information
pomianowski committed Dec 13, 2023
2 parents 538af8b + e54bdbd commit 7fcc2d8
Show file tree
Hide file tree
Showing 40 changed files with 1,184 additions and 119 deletions.
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.12</Version>
<Version>3.0.0-preview.13</Version>
<LangVersion>12.0</LangVersion>
<Deterministic>true</Deterministic>
</PropertyGroup>
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ https://marketplace.visualstudio.com/items?itemName=lepo.wpf-ui

| Name | Framework |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **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) |
| **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) |
| **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) |
| **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) |
| **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) |
| **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) |
| **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) |
| **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) |
| **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) |
| **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) |
| **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) |

## 📷 Screenshots
Expand Down
11 changes: 11 additions & 0 deletions src/Wpf.Ui.Gallery/ViewModels/Pages/Layout/CardActionViewModel.cs
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 CardActionViewModel : ObservableObject
{
public CardActionViewModel() { }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// 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 Wpf.Ui.Controls;

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

public partial class InfoBadgeViewModel : ObservableObject
{
[ObservableProperty]
private InfoBadgeSeverity _infoBadgeSeverity = InfoBadgeSeverity.Attention;

private int _infoBadgeSeverityComboBoxSelectedIndex = 0;

public int InfoBadgeSeverityComboBoxSelectedIndex
{
get => _infoBadgeSeverityComboBoxSelectedIndex;
set
{
_ = SetProperty(ref _infoBadgeSeverityComboBoxSelectedIndex, value);
InfoBadgeSeverity = ConvertIndexToInfoBadgeSeverity(value);
}
}

private InfoBadgeSeverity ConvertIndexToInfoBadgeSeverity(int value)
{
return value switch
{
1 => InfoBadgeSeverity.Informational,
2 => InfoBadgeSeverity.Success,
3 => InfoBadgeSeverity.Caution,
4 => InfoBadgeSeverity.Critical,
_ => InfoBadgeSeverity.Attention
};
}
}
4 changes: 3 additions & 1 deletion src/Wpf.Ui.Gallery/ViewModels/Windows/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ public partial class MainWindowViewModel : ObservableObject
MenuItems = new object[]
{
new NavigationViewItem("Expander", typeof(ExpanderPage)),
new NavigationViewItem("CardControl", typeof(CardControlPage))
new NavigationViewItem("CardControl", typeof(CardControlPage)),
new NavigationViewItem("CardAction", typeof(CardActionPage))
},
},
#endif
Expand Down Expand Up @@ -141,6 +142,7 @@ public partial class MainWindowViewModel : ObservableObject
{
MenuItems = new object[]
{
new NavigationViewItem("InfoBadge", typeof(InfoBadgePage)),
new NavigationViewItem("InfoBar", typeof(InfoBarPage)),
new NavigationViewItem("ProgressBar", typeof(ProgressBarPage)),
new NavigationViewItem("ProgressRing", typeof(ProgressRingPage)),
Expand Down
68 changes: 68 additions & 0 deletions src/Wpf.Ui.Gallery/Views/Pages/Layout/CardActionPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<Page
x:Class="Wpf.Ui.Gallery.Views.Pages.Layout.CardActionPage"
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="CardActionPage"
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">
<controls:ControlExample
Margin="0"
HeaderText="A CardAction with an ImageIcon and a header."
XamlCode="&lt;ui:CardAction Icon=&quot;{ui:ImageIcon 'pack://application:,,,/Assets/wpfui.png'}&quot; /&gt;">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ui:CardAction Grid.Column="0" Icon="{ui:ImageIcon 'pack://application:,,,/Assets/wpfui.png'}">
<StackPanel>
<ui:TextBlock
Margin="0"
FontTypography="Body"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Text="This is the header text"
TextWrapping="WrapWithOverflow" />
</StackPanel>
</ui:CardAction>
</Grid>
</controls:ControlExample>
<controls:ControlExample
Margin="0,32,0,0"
HeaderText="A CardAction with an icon, a header and a description."
XamlCode="&lt;ui:CardAction Icon=&quot;{ui:SymbolIcon Fluent24}&quot; /&gt;">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ui:CardAction Grid.Column="0" Icon="{ui:SymbolIcon DocumentEdit20, FontSize=43, Filled=False}">
<StackPanel>
<ui:TextBlock
Margin="0"
FontTypography="BodyStrong"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Text="This is the header text"
TextWrapping="WrapWithOverflow" />
<ui:TextBlock
Appearance="Secondary"
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
Text="This is a description text."
TextWrapping="WrapWithOverflow" />
</StackPanel>
</ui:CardAction>
</Grid>
</controls:ControlExample>

</StackPanel>
</Page>
39 changes: 39 additions & 0 deletions src/Wpf.Ui.Gallery/Views/Pages/Layout/CardActionPage.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 CardActionPage.xaml
/// </summary>
[GalleryPage("Card action control.", SymbolRegular.Code24)]
public partial class CardActionPage : INavigableView<CardActionViewModel>
{
public CardActionPage(CardActionViewModel viewModel)
{
InitializeComponent();
ViewModel = viewModel;
}

public CardActionViewModel ViewModel { get; }
}
Loading

0 comments on commit 7fcc2d8

Please sign in to comment.