-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WinUI project added to DateCalculator MVVM solution
- Loading branch information
1 parent
1982a5c
commit c54b6ad
Showing
35 changed files
with
815 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
src/NET_8/DateCalculator/DateCalculator.WinForms/Views/DateForm.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<Application | ||
x:Class="DateCalculator.WinUI.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="using:DateCalculator.WinUI" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d"> | ||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" /> | ||
<!-- Other merged dictionaries here --> | ||
</ResourceDictionary.MergedDictionaries> | ||
<!-- Other app resources here --> | ||
<Color x:Key="Primary">#512BD4</Color> | ||
|
||
<Style TargetType="StackPanel"> | ||
<Setter Property="Spacing" Value="5 " /> | ||
</Style> | ||
|
||
<SolidColorBrush | ||
x:Key="PrimaryBrush" | ||
Color="{StaticResource Primary}" /> | ||
<SolidColorBrush | ||
x:Key="WhiteBrush" | ||
Color="White" /> | ||
<SolidColorBrush | ||
x:Key="BlackBrush" | ||
Color="Black" /> | ||
|
||
<x:Double x:Key="AppFontSize">14</x:Double> | ||
|
||
<Style | ||
x:Key="MyLabel" | ||
TargetType="TextBlock"> | ||
<Setter Property="Foreground" Value="{StaticResource PrimaryBrush}" /> | ||
</Style> | ||
|
||
<Style | ||
x:Key="Action" | ||
TargetType="Button"> | ||
<Setter Property="FontSize" Value="{StaticResource AppFontSize}" /> | ||
<Setter Property="Padding" Value="14,10" /> | ||
</Style> | ||
|
||
<Style | ||
x:Key="PrimaryAction" | ||
BasedOn="{StaticResource Action}" | ||
TargetType="Button"> | ||
<Setter Property="Background" Value="{StaticResource PrimaryBrush}" /> | ||
<Setter Property="CornerRadius" Value="8" /> | ||
<Setter Property="Foreground" Value="{StaticResource WhiteBrush}" /> | ||
</Style> | ||
|
||
<Style | ||
x:Key="Caption" | ||
TargetType="TextBlock"> | ||
|
||
</Style> | ||
|
||
<Style | ||
x:Key="BoldText" | ||
TargetType="TextBlock"> | ||
<Setter Property="FontWeight" Value="SemiBold" /> | ||
</Style> | ||
</ResourceDictionary> | ||
</Application.Resources> | ||
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
namespace DateCalculator.WinUI | ||
{ | ||
/// <summary> | ||
/// Provides application-specific behavior to supplement the default Application class. | ||
/// </summary> | ||
public partial class App : Application | ||
{ | ||
/// <summary> | ||
/// Initializes the singleton application object. This is the first line of authored code | ||
/// executed, and as such is the logical equivalent of main() or WinMain(). | ||
/// </summary> | ||
public App() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
|
||
/// <summary> | ||
/// Invoked when the application is launched normally by the end user. Other entry points | ||
/// will be used such as when the application is launched to open a specific file. | ||
/// </summary> | ||
/// <param name="args">Details about the launch request and process.</param> | ||
protected override void OnLaunched(LaunchActivatedEventArgs args) | ||
{ | ||
m_window = new MainWindow(); | ||
m_window?.Activate(); | ||
} | ||
|
||
private Window? m_window; | ||
} | ||
} |
Binary file added
BIN
+432 Bytes
src/NET_8/DateCalculator/DateCalculator.WinUI/Assets/LockScreenLogo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.25 KB
src/NET_8/DateCalculator/DateCalculator.WinUI/Assets/SplashScreen.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.71 KB
...ET_8/DateCalculator/DateCalculator.WinUI/Assets/Square150x150Logo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+637 Bytes
src/NET_8/DateCalculator/DateCalculator.WinUI/Assets/Square44x44Logo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+283 Bytes
.../DateCalculator.WinUI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.05 KB
src/NET_8/DateCalculator/DateCalculator.WinUI/Assets/Wide310x150Logo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions
11
src/NET_8/DateCalculator/DateCalculator.WinUI/Converters/BoolToVisibilityConverter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace DateCalculator.WinUI.Converters | ||
{ | ||
public class BoolToVisibilityConverter : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, string language) | ||
=> (bool)value ? Visibility.Visible : Visibility.Collapsed; | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, string language) | ||
=> value is Visibility visibility && visibility == Visibility.Visible; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/NET_8/DateCalculator/DateCalculator.WinUI/Converters/InvertedBoolConverter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace DateCalculator.WinUI.Converters | ||
{ | ||
public class InvertedBoolConverter : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, string language) | ||
=> !(bool)value; | ||
public object ConvertBack(object value, Type targetType, object parameter, string language) | ||
=> !(bool)value; | ||
} | ||
} |
Oops, something went wrong.