WPF, which stands for Windows Presentation Foundation, is Microsoft's latest approach to a GUI framework, used with the .NET framework. It is a powerful framework for building Windows applications. WPF contains features that will help you develop rich Windows applications.
In questa sessione andremo in dettaglio sulle principali novità introdotte nella versione 3.0 di ASP.NET Core.
Code: https://github.com/andreadottor/VSSaturdayPN2019
In questa sessione andremo in dettaglio sulle principali novità introdotte nella versione 3.0 di ASP.NET Core.
Code: https://github.com/andreadottor/VSSaturdayPN2019
Python/Flask is one of the most popular choices for Developers when it comes to creating a Web Application. Learn how you can get started with making your Web Application using Python and Flask in this presentation.
Here are Github links for Sample Application that we Demonstrated -
https://github.com/mohanrohit/reading-list-api
https://github.com/mohanrohit/reading-list-web
(Powered by www.DeepDiveEducation.com)
Migrating .NET Application to .NET CoreBaris Ceviz
"Migrate .NET Application to .NET Core with scenarios" presentation in Dotnetkonf. How to migrate .NET Desktop, ASP.NET MVC & Web API or WCF Service applications to .NET Core
C# is a object oriented programming language as well as modern programming Language. It is nothing but extension of C++. Its a simple and general purpose programming language for application development.
Laravel Poznań Meetup #12 - "Speed up web API with Laravel and Swoole using ...HighSolutions Sp. z o.o.
Prezentacja, która miała miejsce 2019-09-05 w Poznaniu.
Wykonanie: Marek Tenus (HighSolutions)
Temat: "Speed up web API with Laravel and Swoole using Docker"
asp.net is a web development platform, which provides a programming model and various services required to build up robust web application for PC, as well as mobile device.
Visual Studio | Lanzamiento VS2017 en Buenos Aires - 11/03/2017Pablo Ariel Di Loreto
Esta presentación fue la utilizada el 11/03/2017 en las oficinas de Microsoft Argentina, en marco del evento “Lanzamiento de Visual Studio 2017 para la Comunidad Técnica”.
Este evento fue organizado sin ánimos de lucro por Net-Baires (www.net-baires.com.ar) y contó con el apoyo de Microsoft Argentina y otros sponsors.
Los organizadores, que son colaboradores de la comunidad técnica, fueron (por órden alfabético): Germán Küber (@germankuber), Guillermo Bellamann (@gjbellmann), Nicolás Bello (@nbellocam), y Pablo Ariel Di Loreto (@pablodiloreto).
Php phalcon - Another approach to develop website - Techcamp Saigon 2014Minh Quang Trần
Building website with Phalcon Framework, that is fastest framework. I write my PhalconExt Module help to develop website easier. This is my talk in TechCamp Saigon 2014 (23/3) at RMIT University Vietnam
Python/Flask is one of the most popular choices for Developers when it comes to creating a Web Application. Learn how you can get started with making your Web Application using Python and Flask in this presentation.
Here are Github links for Sample Application that we Demonstrated -
https://github.com/mohanrohit/reading-list-api
https://github.com/mohanrohit/reading-list-web
(Powered by www.DeepDiveEducation.com)
Migrating .NET Application to .NET CoreBaris Ceviz
"Migrate .NET Application to .NET Core with scenarios" presentation in Dotnetkonf. How to migrate .NET Desktop, ASP.NET MVC & Web API or WCF Service applications to .NET Core
C# is a object oriented programming language as well as modern programming Language. It is nothing but extension of C++. Its a simple and general purpose programming language for application development.
Laravel Poznań Meetup #12 - "Speed up web API with Laravel and Swoole using ...HighSolutions Sp. z o.o.
Prezentacja, która miała miejsce 2019-09-05 w Poznaniu.
Wykonanie: Marek Tenus (HighSolutions)
Temat: "Speed up web API with Laravel and Swoole using Docker"
asp.net is a web development platform, which provides a programming model and various services required to build up robust web application for PC, as well as mobile device.
Visual Studio | Lanzamiento VS2017 en Buenos Aires - 11/03/2017Pablo Ariel Di Loreto
Esta presentación fue la utilizada el 11/03/2017 en las oficinas de Microsoft Argentina, en marco del evento “Lanzamiento de Visual Studio 2017 para la Comunidad Técnica”.
Este evento fue organizado sin ánimos de lucro por Net-Baires (www.net-baires.com.ar) y contó con el apoyo de Microsoft Argentina y otros sponsors.
Los organizadores, que son colaboradores de la comunidad técnica, fueron (por órden alfabético): Germán Küber (@germankuber), Guillermo Bellamann (@gjbellmann), Nicolás Bello (@nbellocam), y Pablo Ariel Di Loreto (@pablodiloreto).
Php phalcon - Another approach to develop website - Techcamp Saigon 2014Minh Quang Trần
Building website with Phalcon Framework, that is fastest framework. I write my PhalconExt Module help to develop website easier. This is my talk in TechCamp Saigon 2014 (23/3) at RMIT University Vietnam
we are providing proffetional training in gandhinagar.
.net training in gandhinagar
php training in gandhinagar
java training in gandhinagar
ios training in gandhinagar
android training in gandhinagar
Windows Presentation Foundation (WPF) and XAML (eXtensible Application Markup Language) powered by Microsoft. It's all about presentation (User Interface). For example, how various options of an app is presenting in front of a user. User eXperience (UX) designing is an art.
This PowerPoint slide show was designed with the inspiration from Microsoft Design Language (Metro UI). This slide best works with Microsoft Office 2013 or Office 365.
Raffaele will provide a gap analysis and the potential problems or advantages of moving from a Win32 technology to a vectorial technology like WPF/Silverlight. A detailed discussion and samples will be provided to address when to use WPF and when to use Silverlight.
Presentation about Windows Presentation Foundation - that appeared in the .NET Framework 3.0. The technology gives us ability to create outstanding UI for our applications.
I gave that lecture for IT Academic Days at my University.
A First Look at Windows Presentation Foundation Everywhere (WPF/E): a Cross …goodfriday
WPF/E is a cross platform runtime enabling a subset of Windows Presentation Foundation (WPF) XAML to reach beyond the latest Windows PC platforms. With WPF/E you'll be able to build rich, interactive experiences that run in major Web browsers on major platforms as well as on mobile devices. The combination of WPF/E and WPF will enable designers and developers to have a consistent development experience across smart clients, Web-based applications, and mobile devices. Join us to discuss the WPF/E feature set, targeted platforms and browsers, the developer experience, and to see a preview of the technology.
Similar to Complete WPF Overview Tutorial with Example - iFour Technolab (20)
Angular is considered as one of the most popular software development instruments today. Many custom Angular software development companies are seeing positive results after adopting Angular and the popularity of Angular with compared to other technologies is far high throughout 2019 and might be rise in 2020 as well as per the current trend.
"This article originally appeared in iFour Technolab Blog."
This document also gives a source link.
iFour Technolab is a Microsoft Gold certified custom software, product and Add-in development company with offices in USA, Netherlands, Australia and India.
We have helped small and big enterprises in realizing their need to simplify their businesses through sustainable IT solutions. We use .NET, Angular, Xamarin, .NET Core, WPF, Node.js, React.js, Java, VSTO, Salesforce, and other advanced technologies. We have developed products for Fortune 500 companies and have touched the lives of millions of industry professionals in the Healthcare, Fleet, Aviation, Education, Finance, Construction, Logistics, Entertainment and Environment sectors. One of our projects was for the Netherlands Government Municipality, where we simplified the old-age care policy using technology-based solutions.
IoT refers to the network of connected devices and the technology that facilitates communication between devices and the cloud.
Azure IoT is a powerful tool that enables organizations to deploy, manage and scale IoT solutions.
With this you have a bi-directional, trustworthy communication setup, and security is the number one priority of this configuration.
IoT makes virtually everything “smart,” by improving aspects of our life with the power of data collection, AI algorithms, and networks. The goal of IoT is to extend internet connectivity to "dumb" devices like toasters and turn them into "smart" devices. Such devices are basically lazy as a standard device needs to be switched on but as Frank B. Gilbreth Sr once said, “I will always choose a lazy person to do a difficult job because a lazy person will find an easy way to do it.” We now have smart kitchen, smart vacuums and etc.
NFTs are the talk of the town these days. Many of us feel left out when others are talking about NFTs. Let’s shed some light on them. This is the opportunity for you to understand the know-how of NFTs. Do attend our meetup for a detailed understanding of the NFTs for the marketplace.
iFour Technolab is a custom software development and software consulting firm in India which has experienced developers of ASP.Net development to increase their business growth and sustainability for small and large enterprises across the globe. We stand as a technology partner which accelerates client growth by means of providing key technology solutions, based on a variety of industry or domain experiences & operations.
Vue.js is an open-source JavaScript framework to build user interfaces and single-page applications. It is one of the famous frameworks used to simplify web development to easily integrate into big projects without any issues.
Basic Introduction of VSTO Office Add-in Software Development - iFour TechnolabiFour Technolab Pvt. Ltd.
VSTO stands for Visual Studio Tools for Office. This tutorial is about basic introduction of VSTO office add-in software development created by iFour Technolab Pvt. Ltd. VSTO has an extend features of the application, and customize the user interface (UI) of the application.
Blockchain in Legal Industry improves approval waiting time and resources for patents & trademarks handling and creates a record of peer-to-peer transactions without the need for a trusted authority. 40% of legal departments utilize automated contract management tools and tamper-proof and legally unassailable agreements based on smart contract technology.
Information technology helps healthcare organizations in providing better services to patients and making better decisions. Some of the technologies like e-prescriptions, electronic transactions, and electronic medical records help in increasing the business functionality, removes data ambiguities, reduces the time of staff and physicians and enhances the relationship between the organization and patients. IT provides the ability to measure and monitor patients’ health and provides better analytics to physicians.
Blockchain Use Cases in Financial Services Industry - iFour Technolab Pvt. Ltd.iFour Technolab Pvt. Ltd.
This blockchain Encryption technology can help reduce overall cyber frauds with 24 x 7 service that can be offered by banks. It allows financial institutions to create direct links internally and used a common database to keep track of the execution. The main feature is that transaction clearance and settlement without a central database in between.
NPM is a package manager for the JavaScript programming language. It is the default package manager for the JavaScript runtime environment Node.js. It consists of a command line client, also called npm, and an online database of public and paid-for private packages, called the npm registry.
The Node.js file system module allows you to work with the file system on your computer. Node.js gives the functionality of File I/O by providing wrappers around the standard POSIX functions. In Node.js, File I/O methods can be performed in both synchronous as well as asynchronous form depending upon the user requirements.
MongoDB is a scalable high-performance open-source document-orientated database which is built for speed, rich document based queries for easy readability, full index support for high performance, replication and failover for high availability, auto sharding for easy scalability and map/reduce for aggregation.
Windows Presentation Foundation (WPF) allows developers to easily build and create visually enriched UI based applications. The classical UI elements or controls in other UI frameworks are also enhanced in WPF applications.
Agile project management is more about empowerment. Agile projects are not lead by individual like project manager. Agile project management is a combination of art and science both where you should be well versed with the principals of the project management. At the same time you should be practical while taking decision and understanding circumstances.
This tutorial includes topics like fundamentals of the agile development approach, agile development life cycle, agile requirements development, agile planning, agile design, agile construction & agile project management.
This tutorial displays the list of non functional testing attributes which are helpful while build the software for any purpose. It will be definitely guide for a newbie developer or beginner to understand the concept of non functional testing.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
2. ❑ What is WPF?
❏ WPF, which stands for Windows Presentation Foundation, is Microsoft's latest approach to a GUI
framework, used with the .NET framework.
❏ WPF , previously known as "Avalon", was initially released as part of .NET Framework 3.0 in 2006 , and
then so many other features were added in the subsequent .NET framework versions.
❏ It is a powerful framework for building Windows applications.
❏ WPF offers Separation of Appearance and Behaviour.
❏ WPF contains features that will help you develop rich windows applications.
❏ WPF employs XAML, an XML-based language, to define and link various interface elements.
❏ WPF has a built-in set of data services to enable application developers to bind and manipulate data
within applications
https://www.ifourtechnolab.com/wpf-software-development
3. ❑ Architecture of WPF
The major components of WPF architecture are as shown in the figure. The
most important code part of WPF are −
Presentation Framework
Presentation Core
Milcore
The architecture of WPF can be classified into three layers,
Managed Layer
Unmanaged Layer
Core API Layer
Managed Layer
The Presentation Framework : This DLL consists of all classes that are
required to create the WPF UI. This wraps up the controls, data bindings,
styling, shapes, media, documents, annotations, animation and more.
Presentation core : This is a low-level API exposed by WPF providing features
for 2D, 3D, geometry and so on.
https://www.ifourtechnolab.com/wpf-software-development
4. Unmanaged layer
Milcore is a part of unmanaged code which allows tight integration with
DirectX (responsible for display and rendering).
WindowsCodecs : WindowsCodecs provides Imaging support in WPF.
Image display, processing, scaling and transform are all handled by
WindowsCodecs
CLR makes the development process more productive by offering many
features such as memory management, error handling, etc.
Core API Layer
This layer has OS core components like Kernel, User32, GDI, Device Drivers, Graphic cards etc. These components
are used by the application to access low-level APIs. User32 manages memory and process separation.
DirectX : DirectX is the low-level API through which WPF renders all graphics. DirectX talks with drivers and
renders the content.
GDI : GDI stands for Graphic Device Interface. GDI provides an expanded set of graphics primitives and a number
of improvements in rendering quality.
https://www.ifourtechnolab.com/wpf-software-development
5. ❑ WPF Advantages
In the earlier GUI frameworks, there was no real separation between how an application looks like and how
it behaved.
In WPF, UI elements are designed in XAML while behaviors can be implemented in procedural languages
such C# and VB.Net. So it very easy to separate behavior from the designer code.
With XAML, the programmers can work in parallel with the designers.
The separation between a GUI and its behavior can allow us to easily change the look of a control by using
styles and templates.
Easier animation and special effects.
Support rich data visualization.
UIs are completely re-sizable without loss of quality.
https://www.ifourtechnolab.com/wpf-software-development
6. ❑ WPF Features
Feature Description
Control inside a Control Allows to define a control inside another control as a content.
Data binding Mechanism to display and interact with data between UI elements
and data object on user interface.
Media services Provides an integrated system for building user interfaces with
common media elements like images, audio, and video.
Templates In WPF you can define the look of an element directly with a
Template
Animations Building interactivity and movement on user Interface
Alternative input Supports multi-touch input on Windows 7 and above.
Direct3D Allows to display more complex graphics and custom themes
https://www.ifourtechnolab.com/wpf-software-development
8. Index
❏ What is XAML?
❏ Advantages of XAML
❏ Basic Syntax of XAML
❏ Namespaces
❏ Why XAML in WPF
https://www.ifourtechnolab.com/wpf-software-development
9. ❑ What is XAML?
❏ XAML stands for Extensible Application Markup Language
❏ Its a simple language based on XML to create and initialize .NET objects with hierarchical
relations.
❏ Today XAML is used to create user interfaces in WPF, Silverlight, declare workflows in WF
(Workflow Foundation) and for electronic paper in the XPS standard.
❏ All classes in WPF have parameterless constructors and make excessive usage of properties. That
is done to make it perfectly fit for XML languages like XAML.
https://www.ifourtechnolab.com/wpf-software-development
10. ❑ Advantage of XAML
❏ It very easy to create, initialize, and set properties of objects with hierarchical relations.
❏ XAML code is short and clear to read
❏ Separation of designer code and logic
❏ Graphical design tools like Expression Blend require XAML as source.
❏ The goal of XAML is to enable visual designers to create user interface elements directly.
❏ All you can do in XAML can also be done in code. XAML is just another way to create and
initialize objects. You can use WPF without using XAML. It's up to you if you want to declare it in
XAML or write it in code.
https://www.ifourtechnolab.com/wpf-software-development
11. ❑ Basic Synatx of XAML
❏ When you create your new WPF project, you will encounter some of the XAML code by default
in MainWindow.xaml as shown below.
https://www.ifourtechnolab.com/wpf-software-development
12. Information Description
<Window It is the opening object element or container of the root.
x:Class = "Resources.MainWindow" It is a partial class declaration which connects the markup
to the partial class code defined behind.
xmlns = Maps the default XAML namespace for WPF
client/framework
xmlns:x = XAML namespace for XAML language which maps it to x:
prefix
> End of object element of the root
<Grid></Grid> It is starting and closing tags of an empty grid object.
</Window> Closing the object element
https://www.ifourtechnolab.com/wpf-software-development
13. ❑ Syntax
❏ The syntax of an Object element starts with a left angle bracket (<) followed by the name of an
object, e.g. Button.
❏ Define some Properties and attributes of that object element.
❏ The Object element must be closed by a forward slash (/) followed immediately by a right angle
bracket (>).
https://www.ifourtechnolab.com/wpf-software-development
14. ❑ Syntax
❏ Example of simple object with no child element
<Button/>
❏ Example of object element with some attributes
<Button Content = "Click Me" Height = "30" Width = "60" />
</StackPanel>
https://www.ifourtechnolab.com/wpf-software-development
15. ❑ Syntax
❏ Example of an alternate syntax do define properties (Property element syntax)
<Button>
<Button.Content>Click Me</Button.Content>
<Button.Height>30</Button.Height>
<Button.Width>60</Button.Width>
</Button>
❏ Example of Object with Child Element: StackPanel contains Textblock as child element
<StackPanel Orientation = "Horizontal">
<TextBlock Text = "Hello"/>
</StackPanel>
https://www.ifourtechnolab.com/wpf-software-development
16. ❑ Namespaces
❏ At the beginning of every XAML file you need to include two namespaces.
❏ The first is http://schemas.microsoft.com/winfx/2006/xaml/presentation. It is mapped to all wpf
controls in System.Windows.Controls.
❏ The second is http://schemas.microsoft.com/winfx/2006/xaml it is mapped to System.Windows.Markup
that defines the XAML keywords.
https://www.ifourtechnolab.com/wpf-software-development
17. ❑ Why XAML in WPF?
❏ Both XAML & WPF are independent pieces of technology.
❏ For better Understanding, let us create a window with a button in it using XAML as below :
https://www.ifourtechnolab.com/wpf-software-development
19. ❏ In case you choose not to use XAML in WPF, then you can achieve the same GUI result with procedural
language as well. Let’s have a look at the same example, but this time, we will create a button in C#
https://www.ifourtechnolab.com/wpf-software-development
20. ❏ From the above example, it is clear that what you can do in XAML to create, initialize, and set
properties of objects, the same tasks can also be done using code.
❏ So below are the two less known facts about XAML :
❏ WPF doesn't need XAML
❏ XAML doesn't need WPF
https://www.ifourtechnolab.com/wpf-software-development
22. ❑ Element Tree
❏ Windows Presentation Foundation (WPF) has a comprehensive tree structure in the form of objects. In
WPF, there are two ways that a complete object tree is conceptualized −
❏ Logical Tree Structure
❏ Visual Tree Structure
❏ There are many technologies where the elements and components are ordered in a tree structure so
that the programmers can easily handle the object and change the behavior of an application.
❏ Mostly, WPF developers and designers either use procedural language to create an application or design
the UI part of the application in XAML keeping in mind the object tree structure.
https://www.ifourtechnolab.com/wpf-software-development
23. ❑ Logical Tree Structure
❏ In WPF applications, the structure of the UI elements in XAML represents the logical tree structure. In
XAML, the basic elements of UI are declared by the developer. The logical tree in WPF defines the
following −
❏ Dependency properties
❏ Static and dynamic resources
❏ Binding the elements on its name etc.
https://www.ifourtechnolab.com/wpf-software-development
24. ❏ Let’s have a look at the following example in which a button and a list box are created.
https://www.ifourtechnolab.com/wpf-software-development
25. ❑ Visual Tree Structure
❏ In WPF, the concept of the visual tree describes the structure of visual objects, as represented by the
Visual Base Class. It signifies all the UI elements which are rendered to the output screen.
❏ When a programmer wants to create a template for a particular control, he is actually rendering the
visual tree of that control. The visual tree is also very useful for those who want to draw lower level
controls for performance and optimization reasons.
❏ In WPF applications, visual tree is used for −
❏ Rendering the visual objects.
❏ Rendering the layouts.
❏ The routed events mostly travel along the visual tree, not the logical tree.
https://www.ifourtechnolab.com/wpf-software-development
26. ❑ Visual Tree Structure
❏ In WPF, the concept of the visual tree describes the structure of visual objects, as represented by the
Visual Base Class. It signifies all the UI elements which are rendered to the output screen.
❏ When a programmer wants to create a template for a particular control, he is actually rendering the
visual tree of that control. The visual tree is also very useful for those who want to draw lower level
controls for performance and optimization reasons.
❏ In WPF applications, visual tree is used for −
❏ Rendering the visual objects.
❏ Rendering the layouts.
❏ The routed events mostly travel along the visual tree, not the logical tree.
https://www.ifourtechnolab.com/wpf-software-development
29. ❏ The logical tree leaves out a lot of detail enabling you to focus on the core structure of the user interface
and to ignore the details of exactly how it has been presented.
❏ The logical tree is what you use to create the basic structure of the user interface.
❏ The visual tree will be of interest if you're focusing on the presentation. For example, if you wish to
customize the appearance of any UI element, you will need to use the visual tree.
https://www.ifourtechnolab.com/wpf-software-development
31. ❑ Layout
❏ The layout of controls is very important and critical for application usability. It is used to arrange a group
of GUI elements in your application. There are certain important things to consider while selecting layout
panels −
❏ Positions of the child elements
❏ Sizes of the child elements
❏ Layering of overlapping child elements on top of each other
❏ Fixed pixel arrangement of controls doesn’t work when the application is to be sed on different screen
resolutions. XAML provides a rich set of built-in layout panels to arrange GUI elements in an appropriate
way. Some of the most commonly used and popular layout panels are as follows −
https://www.ifourtechnolab.com/wpf-software-development
32. Sr. No. Panels & Description
1 Stack panel is a simple and useful layout panel in XAML. In stack panel, child
elements can be arranged in a single line, either horizontally or vertically, based on
the orientation property.
2 In WrapPanel, child elements are positioned in sequential order, from left to right or
from top to bottom based on the orientation property.
3 DockPanel defines an area to arrange child elements relative to each other, either
horizontally or vertically. With DockPanel you can easily dock child elements to top,
bottom, right, left and center using the Dock property.
https://www.ifourtechnolab.com/wpf-software-development
33. Sr. No. Panels & Description
4 Canvas panel is the basic layout panel in which the child elements can be positioned
explicitly using coordinates that are relative to the Canvas any side such as left,
right, top and bottom.
5 A Grid Panel provides a flexible area which consists of rows and columns. In a Grid,
child elements can be arranged in tabular form.
https://www.ifourtechnolab.com/wpf-software-development
35. Nesting of layout means the use layout panel inside another layout, e.g. define stack
panels inside a grid. This concept is widely used to take the advantages of multiple
layouts in an application.
Nesting layout
https://www.ifourtechnolab.com/wpf-software-development
36. Considering example of real world wherein
we used grid layout for outlining and used
stackpanel to display controls inside it.
https://www.ifourtechnolab.com/wpf-software-development
39. Windows Presentation Foundation (WPF) allows developers to easily build and create
visually enriched UI based applications.
The classical UI elements or controls in other UI frameworks are also enhanced in
WPF applications.
All of the standard WPF controls can be found in the Toolbox which is a part of the
System.Windows.Controls.
These controls can also be created in XAML markup language.
Controls
https://www.ifourtechnolab.com/wpf-software-development
42. The Label control, in its most simple form, will look very much like the TextBlock which
we used in another article. You will quickly notice though that instead of a Text property,
the Label has a Content property. The reason for that is that the Label can host any kind
of control directly inside of it, instead of just text.
Labels
<Label Content="This is a Label control." />
https://www.ifourtechnolab.com/wpf-software-development
45. Four standard list controls- ListBox, ComboBox, ListView, TreeView.
List controls can be filled from one of the two sources.
1. Items Property
2. ItemsSource Property.
List
https://www.ifourtechnolab.com/wpf-software-development
46. List view derives from listBox
It has ability to separate view properties from control properties.
View property must be changed to grid view ad set properties on that object.
List View
https://www.ifourtechnolab.com/wpf-software-development
50. Expander is a layout in which we can add
control and expand it when we need. When
have less space in our application then we
can use expander layout.
We can assign the expand direction either
down, up, left or right.
At the time of expander creation we can
assign IsExpanded property true or false. It
has the same drawback as GroupBox that it
can contain only one control.
<Window x:Class="GroupBoxDemo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/present
ation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="GroupBox Demo"
Width="250"
Height="180">
<Grid>
<Expander Header=“Description"
HorizontalAlignment="Left"
Margin="10,10,0,0"
VerticalAlignment="Top"
IsExpanded="False"
Height="299"
Width="497">
<TextBlock TextWrapping="Wrap"
Text="This is some text content."
Margin="5"/>
</Expander>
</Grid>
</Window>
Expander
https://www.ifourtechnolab.com/wpf-software-development
51. <Window x:Class="GroupBoxDemo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="GroupBox Demo"
Width="250"
Height="180">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<GroupBox Header="Mouse Handedness">
<StackPanel>
<RadioButton Content="Left-Handed" Margin="5"/>
<RadioButton Content="Right-Handed" Margin="5"
IsChecked="True"/>
</StackPanel>
</GroupBox>
<GroupBox Grid.Row="1" Header="Double Click Speed">
<Slider Margin="5" />
</GroupBox>
</Grid>
</Window>
The GroupBox control allows you to visually
group content and provide a title for grouped
elements.
When you use the default styling for a
GroupBox, the child controls are surrounded by
a border that includes a caption. There is no
need to explicitly define a Border.
Configuring a GroupBox is similar to setting up
an Expander. Both controls inherit from the
same base class and include the same
properties for controlling the header area and
content. The key difference is that a GroupBox
does not add the user interaction that permits
the content to be expanded and collapsed.
Group Box
https://www.ifourtechnolab.com/wpf-software-development
52. The Separator Control is used to separate items
in items controls.
The intention is to divide the items on the menu
or toolbar into logical groups.
It uses borders and rectangles.
Separator
<ListBox>
<ListBoxItem>Sports Car</ListBoxItem>
<ListBoxItem>Compact Car</ListBoxItem>
<ListBoxItem>Family Car</ListBoxItem>
<ListBoxItem>Off-Road Car</ListBoxItem>
<Separator/>
<ListBoxItem>Supersports Bike</ListBoxItem>
<ListBoxItem>Sports Tourer</ListBoxItem>
<ListBoxItem>Cruiser</ListBoxItem>
</ListBox>
https://www.ifourtechnolab.com/wpf-software-development
53. The WPF TabControl allows you to split your
interface up into different areas, each accessible
by clicking on the tab header, usually positioned
at the top of the control.
TabControl
<Window x:Class="WpfTutorialSamples.Misc_controls.TabControlSample“
xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="TabControlSample" Height="200" Width="250">
<Grid>
<TabControl>
<TabItem Header="General">
<Label Content="Content goes here..." />
</TabItem>
<TabItem Header="Security" />
<TabItem Header="Details" />
</TabControl>
</Grid>
</Window>
https://www.ifourtechnolab.com/wpf-software-development
54. Standalone applications typically have a main window that both displays the main data over which the application operates and
exposes the functionality to process that data through user interface (UI) mechanisms like menu bars, tool bars, and status bars. A
non-trivial application may also display additional windows to do the following:
Display specific information to users.
Gather information from users.
Both display and gather information.
These types of windows are known as dialog boxes, and there are two types: modal and modeless.
Dialog
https://www.ifourtechnolab.com/wpf-software-development
55. A modeless dialog box, on the other hand, does not prevent
a user from activating other windows while it is open.
For example, if a user wants to find occurrences of a
particular word in a document, a main window will often
open a dialog box to ask a user what word they are looking
for.
Since finding a word doesn't prevent a user from editing the
document, however, the dialog box doesn't need to be
modal.
A modeless dialog box at least provides a Close button to
close the dialog box.
A modal dialog box is displayed by a function when the
function needs additional data from a user to continue.
Because the function depends on the modal dialog box to
gather data
the modal dialog box also prevents a user from activating
other windows in the application while it remains open.
In most cases, a modal dialog box allows a user to signal
when they have finished with the modal dialog box by
pressing either an OK or Cancel button.
Pressing the OK button indicates that a user has entered
data and wants the function to continue processing with
that data.
Pressing the Cancel button indicates that a user wants to
stop the function from executing altogether
https://www.ifourtechnolab.com/wpf-software-development
56. A message box is a dialog box that can be used to display textual information and to allow users to make
decisions with buttons.
To create a message box, you use the MessageBox class. MessageBox lets you configure the message box
text, title, icon, and buttons, using code like the following.
The following figure shows a message box that displays textual information, asks a question, and provides
the user with three buttons to answer the question.
Dialog-Message box
string messageBoxText = "Do you want to save changes?";
string caption = "Word Processor";
MessageBoxButton button = MessageBoxButton.YesNoCancel;
MessageBoxImage icon = MessageBoxImage.Warning;
// Display message box
MessageBox.Show(messageBoxText, caption, button, icon);
https://www.ifourtechnolab.com/wpf-software-development
57. // Display message box
MessageBoxResult result = MessageBox.Show(messageBoxText, caption, button, icon);
// Process message box results
switch (result)
{
case MessageBoxResult.Yes:
// User pressed Yes button
break;
case MessageBoxResult.No:
// User pressed No button
// ...
break;
case MessageBoxResult.Cancel:
// User pressed Cancel button
// ...
break;
}
Message box(cont..)
https://www.ifourtechnolab.com/wpf-software-development
58. Other Common Dialog Boxes are
Open File Dialog
Save File Dialog Box
Print Dialog Box
A modeless dialog box, such as the Find Dialog
Box shown in the following figure, has the same
fundamental appearance as the modal dialog
box.
Screenshot that shows a Find dialog box.
However, the behavior is slightly different, as
described in the following sections.
A modeless dialog box is opened by calling
the Show method.
Unlike ShowDialog, Show returns immediately.
Consequently, the calling window cannot tell when the
modeless dialog box is closed and, therefore, does not
know when to check for a dialog box result or get data
from the dialog box for further processing.
Instead, the dialog box needs to create an alternative
way to return data to the calling window for
processing.
https://www.ifourtechnolab.com/wpf-software-development
59. Window is the root window of XAML applications
which provides minimize/maximize option, title bar,
border, and close button.
It also provides the ability to create, configure, show,
and manage the lifetime of windows and dialog
boxes.
When you create a new WPF project, then by default,
the Window control is present.
Window
<Window x:Class="GroupBoxDemo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentatio
n"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="GroupBox Demo"
Width="250"
Height="180">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<GroupBox Header="Mouse Handedness">
<StackPanel>
<RadioButton Content="Left-Handed" Margin="5"/>
<RadioButton Content="Right-Handed" Margin="5"
IsChecked="True"/>
</StackPanel>
</GroupBox>
<GroupBox Grid.Row="1" Header="Double Click Speed">
<Slider Margin="5" />
</GroupBox>
</Grid>
</Window>
https://www.ifourtechnolab.com/wpf-software-development
60. A context menu, often referred to as a popup or pop-up menu, is a menu which is shown upon certain user actions,
usually a right-click with the mouse on a specific control or window.
Contextual menus are often used to offer functionality that's relevant within a single control.
Context Menu
https://www.ifourtechnolab.com/wpf-software-development
62. Third-party controls are those which are not created
by Microsoft but are created by some individual or
company by using WPF User Control or Custom
Control. Telerik and DevExpress are the most popular
companies for creating third-party controls.
Third-party controls
https://www.ifourtechnolab.com/wpf-software-development
64. ⚫ Calendar is a control that enables a user to select a date by using a visual calendar
display.
⚫ It provides some basic navigation using either the mouse or keyboard
Calendar
https://www.ifourtechnolab.com/wpf-software-development
66. ⚫ A Date Picker is a control that allows a user to pick a date value.
⚫ The user picks the date by using Combo Box selection for month, day, and year
values
Date picker
https://www.ifourtechnolab.com/wpf-software-development
67. Cont.….
Properties
Date Gets or sets the date currently set in the date
picker.
DayFormat Gets or sets the display format for the day value.
DayFormatProperty Gets the identifier for the DayFormat dependency
property.
Orientation Gets or sets a value that indicates whether the
day, month, and year selectors are stacked
horizontally or vertically.
YearFormat Gets or sets the display format for the year value.
MonthFormat Gets or sets the display format for the month
value.
https://www.ifourtechnolab.com/wpf-software-development
68. ⚫ A control that displays an image, you can use either the Image object or the
Image Brush object.
⚫ An Image object display an image, while an Image Brush object paints another
object with an image.
Image
https://www.ifourtechnolab.com/wpf-software-development
69. Cont.….
Properties
wSource Gets or sets the source for the image.
Width Gets or sets the width of a FrameworkElement.
(Inherited from FrameworkElement)
StretchProperty Identifies the Stretch dependency property.
Opacity Gets or sets the degree of the object's opacity.
(Inherited from UIElement)
Name Gets or sets the identifying name of the object.
CanDrag Gets or sets a value that indicates whether the
element can be dragged as data in a drag-and-
drop operation. (Inherited from UIElement)
https://www.ifourtechnolab.com/wpf-software-development
70. ⚫ Popup is a control that displays content on top of existing content, within the
bounds of the application window.
⚫ It is a temporary display on other content.
Popup
https://www.ifourtechnolab.com/wpf-software-development
71. Cont.….
Properties
Child Gets or sets the content to be hosted in the
popup.
ChildProperty Gets the identifier for the Child dependency
property.
IsOpen Gets or sets whether the popup is currently
displayed on the screen.
Opacity Gets or sets the degree of the object's opacity.
(Inherited from UIElement)
Name Gets or sets the identifying name of the object.
https://www.ifourtechnolab.com/wpf-software-development
72. ⚫ Progress Bar is a control that indicates the progress of an operation, where the
typical visual appearance is a bar that animates a filled area as the progress
continues.
It can show the progress in one of the two following styles −
⚫ A bar that displays a repeating pattern, or
⚫ A bar that fills based on a value.
Progress Bar
https://www.ifourtechnolab.com/wpf-software-development
73. Cont.….
Properties
IsIndeterminate Gets or sets a value that indicates whether the
progress bar reports generic progress with a
repeating pattern or reports progress based on
the Value property.
ShowError Gets or sets a value that indicates whether the
progress bar should use visual states that
communicate an Error state to the user.
ShowPaused Gets or sets a value that indicates whether the
progress bar should use visual states that
communicate a Paused state to the user.
Name Gets or sets the identifying name of the object.
https://www.ifourtechnolab.com/wpf-software-development
74. ⚫ A ScrollViewer is a control that provides a scrollable area that can contain other
visible elements.
Scroll Viewer
https://www.ifourtechnolab.com/wpf-software-development
75. Cont.….
Properties
ComputedHorizontalScrollBarVisibility Gets a value that indicates whether the
horizontal ScrollBar is visible.
ComputedHorizontalScrollBarVisibilityProper
ty
Identifies the
ComputedHorizontalScrollBarVisibility
dependency property.
ScrollableHeight Gets a value that represents the vertical size of
the area that can be scrolled; the difference
between the width of the extent and the width of
the viewport.
Name Gets or sets the identifying name of the object.
ScrollableWidth Gets a value that represents the horizontal size
of the area that can be scrolled; the difference
between the width of the extent and the width of
the viewport.
https://www.ifourtechnolab.com/wpf-software-development
76. ⚫ A Toggle Button is a control that can switch states, such as CheckBox and
RadioButton. .
Toggle Button
https://www.ifourtechnolab.com/wpf-software-development
77. Cont.….
Properties
IsChecked Gets or sets whether the ToggleButton is
checked.
IsCheckedProperty Identifies the IsChecked dependency property.
IsThreeState Gets or sets a value that indicates whether the
control supports three states
Name Gets or sets the identifying name of the object.
IsThreeStateProperty Identifies the IsThreeState dependency property.
https://www.ifourtechnolab.com/wpf-software-development
78. ⚫ A tooltip is a control that creates a pop-up window that displays information for
an element in the GUI.
tooltip
https://www.ifourtechnolab.com/wpf-software-development
79. Cont.….
Properties
IsOpen Gets or sets a value that indicates whether the
ToolTip is visible.
Placement Gets or sets how a ToolTip is positioned in
relation to the placement target element.
PlacementTarget Gets or sets the visual element or control that the
tool tip should be positioned in relation to when
opened by the ToolTipService.
Name Gets or sets the identifying name of the object.
https://www.ifourtechnolab.com/wpf-software-development
81. ❑ Dependency Property
❏ In WPF applications, Dependency property is a specific type of property which extends the CLR
property. It takes the advantage of specific functionalities available in the WPF property system.
❏ A class which defines a dependency property must be inherited from the DependencyObject
class.
❏ Many of the UI controls class which are used in XAML are derived from the DependencyObject
class and they support dependency properties, e.g. Button class supports the IsMouseOver
dependency property.
https://www.ifourtechnolab.com/wpf-software-development
84. ❑ Why We Need Dependency Properties
❏ Dependency property gives you all kinds of benefits when you use it in your application.
Dependency Property can used over a CLR property in the following scenarios −
❏ If you want to set the style
❏ If you want data binding
❏ If you want to set with a resource (a static or a dynamic resource)
❏ If you want to support animation
https://www.ifourtechnolab.com/wpf-software-development
85. ❑ Why We Need Dependency Properties
❏ Basically, Dependency Properties offer a lot of functionalities that you won’t get by using a CLR
property.
❏ The main difference between dependency properties and other CLR properties are listed below
−
❏ CLR properties can directly read/write from the private member of a class by using getter and setter.
In contrast, dependency properties are not stored in local object.
❏ Dependency properties are stored in a dictionary of key/value pairs which is provided by the
DependencyObject class. It also saves a lot of memory because it stores the property when changed.
It can be bound in XAML as well.
https://www.ifourtechnolab.com/wpf-software-development
87. ❑ Routed Event
❏ A Routed Event is a type of event that can invoke handlers on multiple listeners in an element
tree rather than just the object that raised the event. It is basically a CLR event that is supported
by an instance of the Routed Event class. It is registered with the WPF event system.
RoutedEvents have three main routing strategies which are as follows −
❏ Direct Event
❏ Bubbling Event
❏ Tunnel Event
https://www.ifourtechnolab.com/wpf-software-development
88. ❑ Bubbling Event
❏ A Bubbling Event begins with the element where the event is originated.
❏ Then it travels up the visual tree to the topmost element in the visual tree.
❏ So, in WPF, the topmost element is most likely a window.
https://www.ifourtechnolab.com/wpf-software-development
89. ❑ Tunnel Event
❏ Event handlers on the element tree root are invoked and then the event travels down the visual
tree to all the children nodes until it reaches the element in which the event originated.
❏ The difference between a bubbling and a tunneling event is that a tunneling event will always
start with a preview.
❏ In a WPF application, events are often implemented as a tunneling/bubbling pair. So, you'll have
a preview MouseDown and then a MouseDown event.
https://www.ifourtechnolab.com/wpf-software-development
90. ❑ Direct Event
❏ A Direct Event is similar to events in Windows forms which are raised by the element in which
the event is originated.
❏ Unlike a standard CLR event, direct routed events support class handling and they can be used in
Event Setters and Event Triggers within your style of your Custom Control.
❏ A good example of a direct event would be the MouseEnter Event.
https://www.ifourtechnolab.com/wpf-software-development
92. Windows Presentation Foundation (WPF) provides a powerful API with the help of which
applications can get input from various devices such as mouse, keyboard, and touch
panels.
Data binding is the process that establishes a connection between the application UI and
business logic. If the binding has the correct settings and the data provides the proper
notifications, then, when the data changes its value, the elements that are bound to the
data reflect changes automatically
https://www.ifourtechnolab.com/wpf-software-development
93. Binding data to UI Elements
Using Converters to convert data during Binding
Using Data Templates to visualize data
https://www.ifourtechnolab.com/wpf-software-development
94. Binding Components
Target Object
Target Property
Binding Source
Path
Target Property Must be a dependency property
https://www.ifourtechnolab.com/wpf-software-development
95. OneWay-Updates the target property only when the source property change.
TwoWay-Updates the target property or the property whenever either the target
property or the source property changes.
OneWayToSource-updates the source property when the target property changes
OneTime- Updates the target property only when the application starts or when
the DataContext undergoes a change.
https://www.ifourtechnolab.com/wpf-software-development
96. Triggering supported by TwoWay or OneWayToSource mode of binding
Dependency property or INotifyPropertyChanged
UpdateSourceTrigger property
Explicit -Updates the binding source only when you call.
UpdateSource- method.
LostFocus-Updates the binding source whenever the binding target element
loses
https://www.ifourtechnolab.com/wpf-software-development
97. Binding using XAML
Binding using Code
<Label Name="lblNote" Content="{DynamicResource
ResourceKey=Note}" />
<TextBox Name="txtNote" VerticalContentAlignment="Top"
HorizontalAlignment="Stretch" Text="{Binding
AppointmentNote,Mode=TwoWay}" VerticalAlignment="Stretch"
Width="Auto" Height="Auto" />
MyData myDataObject = new MyData(DateTime.Now);
Binding myBinding = new Binding("MyDataProperty");
myBinding.Source = myDataObject;
myText.SetBinding(TextBlock.TextProperty, myBinding);
https://www.ifourtechnolab.com/wpf-software-development
98. Used when data doesn’t match between bindings create a conversion class
When to use
Culture changes needed
Different View of data then native storage
Incompatible data types between target and source
https://www.ifourtechnolab.com/wpf-software-development
99. Contained in the System.Windows.Controls namespace
BooleanToVisibilityConverter
Converts True/False to Visible, Hidden or Collapsed
BorderGapMaskConverter
Represents a converter that converts the dimensions of a GroupBox control
into a VisualBrush
https://www.ifourtechnolab.com/wpf-software-development
100. Makes it easy to put content with data
Easy to define visual styles for data
Reusable and modifiable
https://www.ifourtechnolab.com/wpf-software-development
102. ❑ Styles
❏ The .NET framework provides several strategies to personalize and customize the appearance of an
application.
❏ Style gives uniformity to our application and improves user UI experience.
❏ Styles provide us the flexibility to set some properties of an object and reuse these specific settings across
multiple objects for a consistent look.
❏ In styles, you can set only the existing properties of an object such as Height, Width, Font size, etc.
❏ Only default behavior of a control can be specified.
❏ Multiple properties can be added into a single style.
https://www.ifourtechnolab.com/wpf-software-development
103. ❑ Scenario
As you can see in first image, Width and Height properties of
each button is set.
It is tedious to set property of each button like this to
maintain uniformity.
And this is not the case only for buttons as there will be many
more elements. It is not feasible to give style like this.
Rather what we can do is, declare a style for particular
element by setting properties of that control. Just like it is
done in second image.
Sounds more efficient. Right? Let’s see an example.
https://www.ifourtechnolab.com/wpf-software-development
105. ❑ Explanation
Styles are defined in the resource dictionary and each style has a unique key identifier and a target type.
Inside <style> you can see that multiple setter tags are defined for each property which will be included in
the style.
All of the common properties of each button are now defined in style and then the style are assigned to
each button with a unique key by setting the style property through the StaticResource markup extension.
The advantage of doing it like this is immediately obvious, we can reuse that style anywhere in its scope;
and if we need to change it, we simply change it once in the style definition instead of on each element.
https://www.ifourtechnolab.com/wpf-software-development
106. ❑ Style Levels
Sr.No Levels & Description
1 Control Level Defining a style on control level can only be applied to that particular control. Given below is an example of a control level
where the button and TextBlock have their own style.
2 Layout Level Defining a style on any layout level will make it accessible by that layout and its child elements only.
3 Window Level Defining a style on a window level can make it accessible by all the elements on that window.
4 Application Level Defining a style on app level can make it accessible throughout the entire application. Let’s take the same example, but
here, we will put the styles in app.xaml file to make it accessible throughout application.
https://www.ifourtechnolab.com/wpf-software-development
107. Triggers
A trigger basically enables you to change property values or take actions based on the value of a
property.
So, it allows you to dynamically change the appearance and/or behavior of your control without having
to create a new one.
Triggers are used to change the value of any given property, when certain conditions are satisfied.
Triggers are usually defined in a style or in the root of a document which are applied to that specific
control.
https://www.ifourtechnolab.com/wpf-software-development
108. Types Of Triggers
There are three types of triggers-
Property Triggers
Data Triggers
Event Triggers
https://www.ifourtechnolab.com/wpf-software-development
109. Property Triggers
In property triggers, when a change occurs in one property, it will bring either an immediate or an animated change in another
property.
For example, you can use a property trigger to change the appearance of a button when the mouse hovers over the button.
<Window x:Class = "WPFPropertyTriggers.MainWindow"
xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x = "http://schemas.microsoft.com/winfx/2006/xaml"
Title = "MainWindow" Height = "350" Width = "604">
<Window.Resources>
<Style x:Key = "TriggerStyle" TargetType = "Button">
<Setter Property = "Foreground" Value = "Blue" />
<Style.Triggers>
<Trigger Property = "IsMouseOver" Value = "True">
<Setter Property = "Foreground" Value = "Green" />
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<Button Width = "100" Height = "70"
Style = "{StaticResource TriggerStyle}" Content = "Trigger"/>
</Grid>
</Window>
https://www.ifourtechnolab.com/wpf-software-development
110. Data Triggers
A data trigger performs some actions when the bound data satisfies some conditions.
For example, There is checkbox and label. When the checkbox is checked, it will change label’s foreground color to red.
<Window x:Class = "WPFDataTrigger.MainWindow"
xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x = "http://schemas.microsoft.com/winfx/2006/xaml"
Title = "Data Trigger" Height = "350" Width = "604">
<StackPanel HorizontalAlignment = "Center">
<CheckBox x:Name = "redColorCheckBox"
Content = "Set red as foreground color" Margin = "20"/>
<TextBlock Name = "txtblock" VerticalAlignment = "Center"
Text = "Event Trigger" FontSize = "24" Margin = "20">
<TextBlock.Style>
<Style>
<Style.Triggers>
<DataTrigger Binding = "{Binding ElementName = redColorCheckBox, Path = IsChecked}"
Value = "true">
<Setter Property = "TextBlock.Foreground" Value = "Red"/>
<Setter Property = "TextBlock.Cursor" Value = "Hand" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
</Window>
https://www.ifourtechnolab.com/wpf-software-development
111. Event Triggers
A data trigger performs some actions when the bound data
satisfies some conditions.
For example, There is checkbox and label. When the checkbox
is checked, it will change label’s foreground color to red.
<Window x:Class = "WPFEventTrigger.MainWindow"
xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x = "http://schemas.microsoft.com/winfx/2006/xaml"
Title = "MainWindow" Height = "350" Width = "604">
<Grid>
<Button Content = "Click Me" Width = "60" Height = "30">
<Button.Triggers>
<EventTrigger RoutedEvent = "Button.Click">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty =
"Width" Duration = "0:0:4">
<LinearDoubleKeyFrame Value = "60" KeyTime = "0:0:0"/>
<LinearDoubleKeyFrame Value = "120" KeyTime = "0:0:1"/>
<LinearDoubleKeyFrame Value = "200" KeyTime = "0:0:2"/>
<LinearDoubleKeyFrame Value = "300" KeyTime = "0:0:3"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty = "Height"
Duration = "0:0:4">
<LinearDoubleKeyFrame Value = "30" KeyTime = "0:0:0"/>
<LinearDoubleKeyFrame Value = "40" KeyTime = "0:0:1"/>
<LinearDoubleKeyFrame Value = "80" KeyTime = "0:0:2"/>
<LinearDoubleKeyFrame Value = "150" KeyTime = "0:0:3"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Button.Triggers>
</Button>
</Grid>
</Window>
https://www.ifourtechnolab.com/wpf-software-development