In Focus
Delhi Chapter Hands On June 22: Limited Seats Register Now
Kolkata Chapter Developer Day: May 25
C# Corner Delhi Chapter Meet, May-18, 2013 Official Recap
Istanbul Chapter May 2013 2nd Seminar Announced : Learn WinJS, Windows Store, MVC
Email :
Password :
Remember me?
Forgot password
Contribute
An Article
A Blog
A News
A Video
A Link
An Interview Question
Ask a Question
TECHNOLOGIES
.NET 4.5
Current Affairs
Learn .NET
SharePoint 2010
Web Development
.NET Assemblies
Databases & DBA
LightSwitch 2012
SharePoint 2013
Web Services in C#
ADO.NET in C#
Design & Architecture
LINQ
Silverlight with C#
Windows 8
AJAX in C#
Exception Handling C#
Mobile & Embedded
Smart Devices
Windows Azure
Android Programming
Graphics Design
Office 2013
SQL
Windows Controls C#
Articles C#
Hardware
OOP/OOD
SQL Server 2012
Windows Forms C#
ASP.NET Controls in C#
How do I
Operating Systems
Testing
Windows Phone 8
ASP.NET MVC with C#
HTML 5
PHP
TypeScript
Windows Server 2012
ASP.NET Programming
Internet & Web
Products
Visual C#
Windows Store Apps
C# Language
iPhone/iPad
Project Management
Visual Studio .NET
Workflow Foundation in C#
C# Tutorials
Java
Reports using C#
Visual Studio 2010
WPF
C, C++, MFC
Java and .NET
Robotics & Hardware
Visual Studio 2012
XAML
Career Advice
JavaScript, CSS
Security in .NET
WCF with C#
XML
Chapters
JQuery
Request a new Category
|
View All
ANSWERS
BLOGS
VIDEOS
INTERVIEWS
BOOKS
LINKS
NEWS
CHAPTERS
CAREER ADVICE
Making your Web Browser in C#
HTML 5 vs Native Apps
Secure Your Android Application from Hackers
Why to fear Object Oriented Programming approach
Check upcoming B'day in Asp.net
Happy Birthday Destin Joy
Difference between IEnumerable and IEnumerator
Compare strings using StringComparison.Ordin ...
Class vs Structure
Import Email from Gmail in ASP.NET
Blog
WPF popup UserControl
Posted by
Amal ES
in
Blogs
|
WPF
on
Dec 24, 2011
Learn how to create UserControl in WPF.
Tweet
5027
1
0
Download Files:
Popupusercontrol.rar
Create a WPF project and create a UserControl. The UserControl contains one calendar.
<
UserControl
x
:
Class
="WpfApplication6.UserControl1 "
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
"
mc
:
Ignorable
="d"
Name
="user"
d
:
DesignHeight
="158"
d
:
DesignWidth
="183">
<
Grid
Height
="154"
Width
="186">
<
Calendar
Height
="150"
HorizontalAlignment
="Left"
Name
="calendar1"
VerticalAlignment
="Top"
Width
="189" />
</
Grid
>
</
UserControl
>
In the main window create a popup xaml code.Create a reference of theUserControl. Then call the UserControl inside the popup.
<
Window
x
:
Class
="WpfApplication6.MainWindow"
xmlns
="
http://schemas.microsoft.com/winfx/2006/xaml/presentation
"
xmlns
:
x
="
http://schemas.microsoft.com/winfx/2006/xaml
"
xmlns
:
usr
="clr-namespace:WpfApplication6"
Title
="MainWindow"
Height
="350"
Width
="525">
<
StackPanel
>
<
ToggleButton
Name
= "button"
Height
="45"
Width
="154"
Foreground
="Green">
<
ToggleButton.Template
>
<
ControlTemplate
TargetType
="ToggleButton">
<
TextBlock
>
Click here to view the popup
</
TextBlock
>
</
ControlTemplate
>
</
ToggleButton.Template
>
</
ToggleButton
>
<
Popup
IsOpen
="{
Binding
IsChecked
,
ElementName
=button}">
<
Border
Background
="Green">
<
usr
:
UserControl1
></
usr
:
UserControl1
>
</
Border
>
</
Popup
>
</
StackPanel
>
</
Window
>
This Feature is Sponsored By
DynamicPDF Merger is a developers dream for interacting with any existing PDF documents. Merge, append, split, form fill, flatten stamp and so much more.
Application Object In WPF
What is WPF?
post comment
.
Posted by
Tej Kumar
on
Jul 23, 2012
COMMENT USING
PREMIUM SPONSORS
iPhone, Android & Web Development Services
Over-C is a holistic consortium of communications and technology specialists. We build, deploy and market both business as well as consumer products and solutions.
More Blogs from this Blogger
WPF popup UserControl
View All
SPONSORED BY
DynamicPDF ReportWriter Suite
PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Follow @twitterapi
Latest Blogs
Mathematical Symbols in Views
Restricting numeric value in Textbox
Creating Inner Join on Multiple Tables in SQL Server
Bind GridView with MS Access Database Table in ASP.NET
Difference between IEnumerable and IEnumerator
Project Cost Estimation
Basic Aspects of Security and Control
Zoom Image in Different Way in ASP.NET
Gridview with checkbox with check all option
Download SAP Crystal Reports for Visual Studio 2010 - Its Free
View All
Poll
Result
All Polls
What is the best product to build Mobile apps?
What is the best product to build Mobile apps
PhoneGap
Icenium
Xamarin Studio
KendoUI Mobile
JQueryMobile
Native iOS/Android
What is the best product to build Mobile apps
Options
Votes
%
PhoneGap
2
2.74
Icenium
0
0.00
Xamarin Studio
1
1.37
KendoUI Mobile
1
1.37
JQueryMobile
61
83.56
Native iOS/Android
8
10.96
Total
73
100%