Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion TestingApplication/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<ResourceDictionary Source="pack://application:,,,/PresentationFramework.Fluent;component/Resources/Fluent.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

</Application.Resources>
</Application>

14 changes: 8 additions & 6 deletions TestingApplication/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@
Title="MainWindow" Height="450" Width="800" Left="0" Top="0" WindowStartupLocation="CenterScreen">
<Grid>
<StackPanel Margin="10">
<Button Content="Click Me" Click="clickEvent" Width="200" />
<Button Content="Click Me" Click="ClickEvent" Width="200" />
<TextBlock Text="Loren Ipsum Dolor Sit" />
<Slider />
<TextBox Text="TextBox Content..." />
<Button Name="testbtn" Content="Test Button" Click="Button_Click"/>
<Button Name="calendartestbtn" Content="Test Calendar" Click="calendarButton_Click"/>
<Button Name="txtBoxButton" Content="TextBox Button" Width="129" Click="textBoxButton_Click" />
<Button Name="cmbBoxButton" Content="Combo Button" Width="200" Click="comboBoxButton_Click" />
<Button Name="testchkbtn" Content="Test Checkbox" Click="checkboxButton_Click"/>
<Button Name="listBoxtestbtn" Content="Test Listbox" RenderTransformOrigin="1.562,1.132" Width="104" Click="listboxButton_Click"/>
<Button Name="calendartestbtn" Content="Test Calendar" Click="CalendarButton_Click"/>
<Button Name="txtBoxButton" Content="TextBox Button" Width="129" Click="TextBoxButton_Click" />
<Button Name="cmbBoxButton" Content="Combo Button" Width="200" Click="ComboBoxButton_Click" />
<Button Name="testchkbtn" Content="Test Checkbox" Click="CheckboxButton_Click"/>
<Button Name="listBoxtestbtn" Content="Test Listbox" RenderTransformOrigin="1.562,1.132" Width="104" Click="ListboxButton_Click"/>
<Button Name="radioButton" Content="Test Radio Button" Click="RadioButton_Click" />
<Button Name="sliderButton" Content="Slider Button" Width="120" Click="SliderButton_Click"/>
</StackPanel>
</Grid>
</Window>
74 changes: 52 additions & 22 deletions TestingApplication/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,62 +23,92 @@ public MainWindow()
InitializeComponent();
}

private void clickEvent(object sender, RoutedEventArgs e)
private void ClickEvent(object sender, RoutedEventArgs e)
{
MessageBox.Show("Button Clicked");
}
private void Button_Click(object sender, RoutedEventArgs e)
{
// this.NavigationService.Navigate(new Uri("Page3.xaml", UriKind.Relative));
ButtonWindow btnwindow = new ButtonWindow();
btnwindow.Owner = this;
ButtonWindow btnwindow = new()
{
Owner = this
};
//Added for fixing blank window issue
Application.Current.MainWindow = btnwindow;
btnwindow.Show();
}

private void calendarButton_Click(object sender, RoutedEventArgs e)
{
CalendarWindow clndrwindow = new CalendarWindow();
clndrwindow.Owner = this;
private void CalendarButton_Click(object sender, RoutedEventArgs e)
{
CalendarWindow clndrwindow = new()
{
Owner = this
};
//Added for fixing blank window issue
Application.Current.MainWindow = clndrwindow;
clndrwindow.Show();
}

private void textBoxButton_Click(object sender, RoutedEventArgs e)
private void TextBoxButton_Click(object sender, RoutedEventArgs e)
{
TextWindow tw = new TextWindow();
tw.Owner = this;
TextWindow tw = new()
{
Owner = this
};
Application.Current.MainWindow = tw;
tw.Show();
}

private void comboBoxButton_Click(object sender, RoutedEventArgs e)
private void ComboBoxButton_Click(object sender, RoutedEventArgs e)
{
ComboBoxViewModel vm = new ComboBoxViewModel();
ComboBoxWindow cbw = new ComboBoxWindow(vm);
cbw.Owner = this;
ComboBoxViewModel vm = new();
ComboBoxWindow cbw = new(vm)
{
Owner = this
};
Application.Current.MainWindow = cbw;
cbw.Show();
}

private void checkboxButton_Click(object sender, RoutedEventArgs e)
private void CheckboxButton_Click(object sender, RoutedEventArgs e)
{
CheckBoxViewModel viewModel=new CheckBoxViewModel();
CheckboxWindow checkboxWindow = new CheckboxWindow(viewModel);
CheckBoxViewModel viewModel = new();
CheckboxWindow checkboxWindow = new(viewModel);
//Added for fixing blank window issue
Application.Current.MainWindow = checkboxWindow;
checkboxWindow.Owner = this;
checkboxWindow.Show();
}

private void listboxButton_Click(object sender, RoutedEventArgs e)
private void ListboxButton_Click(object sender, RoutedEventArgs e)
{
ListboxWindow lstboxwindow = new()
{
Owner = this
};
//Added for fixing blank window issue
Application.Current.MainWindow = lstboxwindow;
lstboxwindow.Show();
}
private void SliderButton_Click(object sender, RoutedEventArgs e)
{
SliderWindow sliderWindow = new()
{
Owner = this
};
Application.Current.MainWindow = sliderWindow;
sliderWindow.Show();
}
private void RadioButton_Click(object sender, RoutedEventArgs e)
{
ListboxWindow lstbxwindow = new ListboxWindow();
lstbxwindow.Owner = this;
RadioButtonWindow radioButtonWindow = new()
{
Owner = this
};
//Added for fixing blank window issue
Application.Current.MainWindow = lstbxwindow;
lstbxwindow.Show();
Application.Current.MainWindow = radioButtonWindow;
radioButtonWindow.Show();
}
}
}
25 changes: 25 additions & 0 deletions TestingApplication/RadioButtonWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Window x:Class="TestingApplication.RadioButtonWindow"
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="RadioButtonWindow" Height="450" Width="800">
<Grid Margin="25,35,52,27">
<StackPanel Margin="0,0,0,162" HorizontalAlignment="Left" Width="341">
<RadioButton Content="Option A" />
<RadioButton Content="Option B" />
<RadioButton Content="Option C" />
<RadioButton Content="Option D" />
</StackPanel>
<StackPanel Margin="351,5,21,54">
<RadioButton Content="RadioButton1" GroupName="radio_group_one"/>
<RadioButton Content="RadioButton2" GroupName="radio_group_one"/>
<RadioButton Content="RadioButton3" IsEnabled="False" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<RadioButton Content="RadioButton3" IsEnabled="False" />
<Separator/>
<RadioButton Content="RadioButton3" IsEnabled="False" />
<Separator/>

<RadioButton Content="RadioButton4" />
<RadioButton Content="RadioButton5" GroupName="radio_group_two" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<RadioButton Content="RadioButton5" GroupName="radio_group_two" />
<Separator/>
<RadioButton Content="RadioButton5" GroupName="radio_group_two" />

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add separators, they are going to separate different radio button groups, presently it is misleading.

<RadioButton Content="RadioButton6" GroupName="radio_group_two"/>
</StackPanel>
</Grid>
</Window>
27 changes: 27 additions & 0 deletions TestingApplication/RadioButtonWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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.Shapes;

namespace TestingApplication
{
/// <summary>
/// Interaction logic for RadioButtonWindow.xaml
/// </summary>
public partial class RadioButtonWindow : Window
{
public RadioButtonWindow()
{
InitializeComponent();
}
}
}
12 changes: 12 additions & 0 deletions TestingApplication/SliderWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Window x:Class="TestingApplication.SliderWindow"
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="SliderWindow" Height="450" Width="800">
<Grid>
<Slider x:Name="slider" HorizontalAlignment="Left" Margin="243,173,0,0" VerticalAlignment="Top" Width="120"/>
</Grid>
</Window>
27 changes: 27 additions & 0 deletions TestingApplication/SliderWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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.Shapes;

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