SlideShare a Scribd company logo
XAML
Adding new Pages
Frame
Main window - XAML
<Window x:Class="practice.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:practice"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800" >
<Grid >
<!---Arrange navigation Buttons -->
<StackPanel Orientation="Horizontal"
Height="40" Width="200"
HorizontalAlignment="Left"
VerticalAlignment="Top">
<Button Width="100" Content="Page-1" FontSize="16" Click="Button_Click" />
<Button Content="Page-2" Width="100" FontSize="16" Click="Button_Click_1"/>
</StackPanel>
<!---To show pages in Main window-->
<Frame Name="mainFrame" Margin="0,40,0,0"
Background="LightBlue"
NavigationUIVisibility="Hidden"/>
<!---To show pages in Main window
<Frame Name="mainFrame" Margin="0,40,0,0"
Background="LightBlue"
BorderThickness="10" NavigationUIVisibility="Visible"
AllowDrop="False" ToolTip="Back ground"
BorderBrush="Gray" >
</Frame> -->
</Grid>
</Window>
<Page x:Class="practice.Page1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:practice"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Title="Page1" Background="LightSalmon">
<Grid>
<TextBlock FontSize="40"
HorizontalAlignment="Center"
VerticalAlignment="Center" Height="70"
>
<Run Text="This is " />
<Run Text=" 1st Page " Foreground="WhiteSmoke"/>
<TextBlock.TextDecorations >
<TextDecoration Location="Underline">
<TextDecoration.Pen >
<Pen Brush="Gray" Thickness="1" DashCap="Triangle"
/>
</TextDecoration.Pen>
</TextDecoration>
</TextBlock.TextDecorations>
<TextBlock.Effect>
<DropShadowEffect Color="Black" ShadowDepth="2" BlurRadius="10"
Direction="90" RenderingBias="Quality"
Opacity="50"/>
</TextBlock.Effect>
</TextBlock>
</Grid>
</Page>
Page-1- XAML
<Page x:Class="practice.Page2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:practice"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Title="Page2" Background="WhiteSmoke">
<Grid>
<TextBlock FontSize="34"
Height="50"
Width="200" HorizontalAlignment="Center"
VerticalAlignment="Center"
>
<Run Text="2nd "/>
<Run Text="Page ! " Foreground="LightBlue"
FontWeight="ExtraBold"/>
</TextBlock>
</Grid>
</Page>
Page-2- XAML
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;
namespace practice
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
mainFrame.Content = new Page1();
}
private void Button_Click_1(object sender, RoutedEventArgs e)
{
mainFrame.Content = new Page2();
}
}
}
Main window – XAML.CS
New Page by Form . .....................

More Related Content

Similar to New Page by Form . .....................

Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
www.netgains.org
 
ILUG 2010 - Deploying plug-ins to the enterprise
ILUG 2010 - Deploying plug-ins to the enterpriseILUG 2010 - Deploying plug-ins to the enterprise
ILUG 2010 - Deploying plug-ins to the enterprise
René Winkelmeyer
 
Building iPad apps with Flex - 360Flex
Building iPad apps with Flex - 360FlexBuilding iPad apps with Flex - 360Flex
Building iPad apps with Flex - 360Flex
danielwanja
 
WIT lab programs.docx
WIT lab programs.docxWIT lab programs.docx
WIT lab programs.docx
jashmithakakavakam
 
Flask – Python
Flask – PythonFlask – Python
Flask – Python
Max Claus Nunes
 
Version1.0 StartHTML000000207 EndHTML000063947 StartFragment0000.docx
Version1.0 StartHTML000000207 EndHTML000063947 StartFragment0000.docxVersion1.0 StartHTML000000207 EndHTML000063947 StartFragment0000.docx
Version1.0 StartHTML000000207 EndHTML000063947 StartFragment0000.docx
tienboileau
 
Profit statement 00
Profit statement 00Profit statement 00
Profit statement 00
Sandro Suzart
 
Move Page to Page in WPF Application ...........................
Move Page to Page in WPF Application ...........................Move Page to Page in WPF Application ...........................
Move Page to Page in WPF Application ...........................
abhisahdev
 
What's new in Xamarin.Forms?
What's new in Xamarin.Forms?What's new in Xamarin.Forms?
What's new in Xamarin.Forms?
James Montemagno
 
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
Coulawrence
 
Mobile Web Development
Mobile Web DevelopmentMobile Web Development
Mobile Web Development
Jonathan Snook
 
Prototype UI Intro
Prototype UI IntroPrototype UI Intro
Prototype UI Intro
Juriy Zaytsev
 
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface
 
Polymer 1.0
Polymer 1.0Polymer 1.0
Polymer 1.0
Cyril Balit
 
WordCamp Praga 2015
WordCamp Praga 2015WordCamp Praga 2015
WordCamp Praga 2015
Tomasz Dziuda
 
WPF L01-Layouts, Controls, Styles and Templates
WPF L01-Layouts, Controls, Styles and TemplatesWPF L01-Layouts, Controls, Styles and Templates
WPF L01-Layouts, Controls, Styles and Templates
Mohammad Shaker
 
OpenERP e l'arte della gestione aziendale con Python
OpenERP e l'arte della gestione aziendale con PythonOpenERP e l'arte della gestione aziendale con Python
OpenERP e l'arte della gestione aziendale con Python
PyCon Italia
 
Web components with Angular
Web components with AngularWeb components with Angular
Web components with Angular
Ana Cidre
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and Improved
Timothy Fisher
 
The Benefits of Juicing
The Benefits of JuicingThe Benefits of Juicing
The Benefits of Juicing
social media business club
 

Similar to New Page by Form . ..................... (20)

Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
 
ILUG 2010 - Deploying plug-ins to the enterprise
ILUG 2010 - Deploying plug-ins to the enterpriseILUG 2010 - Deploying plug-ins to the enterprise
ILUG 2010 - Deploying plug-ins to the enterprise
 
Building iPad apps with Flex - 360Flex
Building iPad apps with Flex - 360FlexBuilding iPad apps with Flex - 360Flex
Building iPad apps with Flex - 360Flex
 
WIT lab programs.docx
WIT lab programs.docxWIT lab programs.docx
WIT lab programs.docx
 
Flask – Python
Flask – PythonFlask – Python
Flask – Python
 
Version1.0 StartHTML000000207 EndHTML000063947 StartFragment0000.docx
Version1.0 StartHTML000000207 EndHTML000063947 StartFragment0000.docxVersion1.0 StartHTML000000207 EndHTML000063947 StartFragment0000.docx
Version1.0 StartHTML000000207 EndHTML000063947 StartFragment0000.docx
 
Profit statement 00
Profit statement 00Profit statement 00
Profit statement 00
 
Move Page to Page in WPF Application ...........................
Move Page to Page in WPF Application ...........................Move Page to Page in WPF Application ...........................
Move Page to Page in WPF Application ...........................
 
What's new in Xamarin.Forms?
What's new in Xamarin.Forms?What's new in Xamarin.Forms?
What's new in Xamarin.Forms?
 
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
 
Mobile Web Development
Mobile Web DevelopmentMobile Web Development
Mobile Web Development
 
Prototype UI Intro
Prototype UI IntroPrototype UI Intro
Prototype UI Intro
 
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
 
Polymer 1.0
Polymer 1.0Polymer 1.0
Polymer 1.0
 
WordCamp Praga 2015
WordCamp Praga 2015WordCamp Praga 2015
WordCamp Praga 2015
 
WPF L01-Layouts, Controls, Styles and Templates
WPF L01-Layouts, Controls, Styles and TemplatesWPF L01-Layouts, Controls, Styles and Templates
WPF L01-Layouts, Controls, Styles and Templates
 
OpenERP e l'arte della gestione aziendale con Python
OpenERP e l'arte della gestione aziendale con PythonOpenERP e l'arte della gestione aziendale con Python
OpenERP e l'arte della gestione aziendale con Python
 
Web components with Angular
Web components with AngularWeb components with Angular
Web components with Angular
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and Improved
 
The Benefits of Juicing
The Benefits of JuicingThe Benefits of Juicing
The Benefits of Juicing
 

Recently uploaded

Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 

Recently uploaded (20)

Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 

New Page by Form . .....................