Skip to content

Commit

Permalink
add sample test application
Browse files Browse the repository at this point in the history
  • Loading branch information
harshit7962 committed Jan 10, 2024
1 parent 4e3c178 commit eeefe42
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 0 deletions.
18 changes: 18 additions & 0 deletions TestingApplication/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Application x:Class="TestingApplication.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:TestingApplication"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>

<ResourceDictionary.MergedDictionaries>
<ThemesDictionary Theme="Light"/>
<ControlsDictionary />

</ResourceDictionary.MergedDictionaries>

</ResourceDictionary>

</Application.Resources>
</Application>
14 changes: 14 additions & 0 deletions TestingApplication/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System.Configuration;
using System.Data;
using System.Windows;

namespace TestingApplication
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}

}
10 changes: 10 additions & 0 deletions TestingApplication/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
17 changes: 17 additions & 0 deletions TestingApplication/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Window x:Class="TestingApplication.MainWindow"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:TestingApplication"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<StackPanel Margin="10">
<Button Content="Click Me" Click="clickEvent" Width="200" />
<TextBlock Text="Loren Ipsum Dolor Sit" />
<Slider />
<TextBox Text="TextBox Content..." />
</StackPanel>
</Grid>
</Window>
29 changes: 29 additions & 0 deletions TestingApplication/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System.Text;
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;

namespace TestingApplication
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}

private void clickEvent(object sender, RoutedEventArgs e)
{
MessageBox.Show("Button Clicked");
}
}
}
15 changes: 15 additions & 0 deletions TestingApplication/TestingApplication.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net9.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseWPF>true</UseWPF>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup>
<WpfRepoRoot>C:\Users\hmishra\Desktop\Git\dotnet\wpf</WpfRepoRoot>
</PropertyGroup>
<Import Project="$(WpfRepoRoot)\eng\wpf-debug.targets" />
</Project>
10 changes: 10 additions & 0 deletions ThemingTest.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Win11ThemeTest", "Win11Them
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Win11ThemeSampleApp", "Win11ThemeSampleApp\Win11ThemeSampleApp.csproj", "{B46630F2-08F2-4883-B581-9AB61DF68384}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestingApplication", "TestingApplication\TestingApplication.csproj", "{6BEE0660-871A-4750-9269-A80712474401}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -31,6 +33,14 @@ Global
{B46630F2-08F2-4883-B581-9AB61DF68384}.Release|Any CPU.Build.0 = Release|x64
{B46630F2-08F2-4883-B581-9AB61DF68384}.Release|x64.ActiveCfg = Release|x64
{B46630F2-08F2-4883-B581-9AB61DF68384}.Release|x64.Build.0 = Release|x64
{6BEE0660-871A-4750-9269-A80712474401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6BEE0660-871A-4750-9269-A80712474401}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6BEE0660-871A-4750-9269-A80712474401}.Debug|x64.ActiveCfg = Debug|Any CPU
{6BEE0660-871A-4750-9269-A80712474401}.Debug|x64.Build.0 = Debug|Any CPU
{6BEE0660-871A-4750-9269-A80712474401}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6BEE0660-871A-4750-9269-A80712474401}.Release|Any CPU.Build.0 = Release|Any CPU
{6BEE0660-871A-4750-9269-A80712474401}.Release|x64.ActiveCfg = Release|Any CPU
{6BEE0660-871A-4750-9269-A80712474401}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit eeefe42

Please sign in to comment.