Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Everything / desktop / XAML

XAML

XAML

Great Reads

by Saad_Mahmood
Magical MVVM using power of Expression Blend
by Sacha Barber
This is a rant about .NET 3.5 SP1 StringFormat Binding Property
by Anil Kr. Sharma
.NET Framework 3.0 primer.
by Jani Giannoudis
Concepts and patterns for the handling of strings in multilingual applications.

Latest Articles

by Saad_Mahmood
Magical MVVM using power of Expression Blend
by Sacha Barber
This is a rant about .NET 3.5 SP1 StringFormat Binding Property
by Anil Kr. Sharma
.NET Framework 3.0 primer.
by Jani Giannoudis
Concepts and patterns for the handling of strings in multilingual applications.

All Articles

Sort by Score

XAML 

by Dave “DWC” Curry
How to wire up drag+drop events through multiple objects.
by Georgeutc
A very simple Resizable SplitView
by AnobikDey
A description of how images and other controls can be rotated and used to give 3d Effect in Windows Store Apps
by Prasanna Venkatesh . K
Writing a Windows store background app from the scratch
by Dirk Bahle
Making better use of the available UI space.
by Nuwan Karunarathna
This a foldable content control for UWP platform.
by İlkay İlknur
Silverlight Focusing Issue
by Yvan Rodrigues
A simple but effective way for format bound data in XAML with the Windows Runtime
by Pradeep Reddy S
Implementation of Accelerometer in WP8 applications.
by Ramanujam Shankar
Show data in grid view control of Windows Stores App using web service or WCF
by Mahmudul Haque Azad
Accessing image from Resource File in XAML markup
by prince sanghi
How to create an Acordian view for ListView in XAML for Windows WPF, Store, Mobile Application
by Peter Sun (247)
Demonstrate how to create WPF TrewView with multiple levels of HierarchicalDataTemplate from C# code-behind without XAML using MVVM for data binding
by Shah Ankita
This code sample demonstrates how to set an alarm notification.
by brain2cpu
The way x:Bind is (not) working in universal Windows applications
by Malak Zia Nasir
Override the Windows Store app default splash screen with an animated one
by Anis Derbel
The easiest way to animate your object using Storyboard
by Jeff East
Implements automatic column width sizing based on item contents for ListViews using GridView
by syncsivakumar
Behaviors and Triggers explained with samples.
by Volodymyr Trubachov
Describes the approach to bind a group of radio buttons to a single property, regardless of the property type (enum, bool, int, string).
by Amit_Mittal
An easy way to bind XAML with properties defined in code behind
by Houssem_Dellai
Using Bing Maps in Windows Phone 7
by Fredrik Zetterlund
BitmapImageExtension with NetworkCredentials.
by Francisco T. Chavez
Bool to content converter
by Anis Derbel
This tip will show the new way to browse photos with Windows Phone 8.1
by Peter Sun (247)
Create a C# WPF app to read Twitter tweets and retweets via REST API with grouping related users / friends by categories. As a bonus, tweets can be saved in Azure / Cloud, and viewed in an Azure website.
by Abhilash Raja
Building adaptive layout in a windows 10 app with relative panel and adaptive triggers
by Dan Maroff
A custom ListView class that uses reflection to sort columns based on the DisplayMemberBinding's bound data type
by Peter Sun (247)
Master-detail view navigation using manageable data-driven and code-behind techniques
by Houssem Dellai
Developing a Windows Phone app step by step
by Peter Sun (247)
Implement ChatGPT API in C# WPF with GPT3.5-turbo
by Santhosh Kumar Jayaraman
Silverlight doesn't have a ListBox control with a checkbox. In this article, I describe how to achieve that functionality in Silverlight using MVVM.
by Mitesh k Prajapati
This is a WPf circular indeterminate progressbar and you can use this in your application for loading processes which are in an indeterminate state.
by Fun@learn
Lightweight approach to close view from viewmodel command.
by Shah Ankita
This code sample demonstrates how to set color to any control using colorpicker. For this, you have to create a new Windows phone app.
by Anis Derbel
The easy way to connect to Mysql using Wamp server on WPF
by Zain Nisar
Create "Sign Up Page" using Toolbar and Navigation feature
by Ruzli999
How to create Animation using separated Images
by Zain Nisar
How to create visual states and what is state group?
by Mohit Johri
This tip will help you to display data using XamDataPresenter (or any DataGrid) which will have multi-header column.
by Umer Qureshi
Creating an animation using blend instead of writing the XAML yourself
by Gregory Morse
Deriving VirtualizingPanel and OrientedVirtualizingPanel is not possible in WinRT but using some calculation strategies, an efficient emulation is possible
by Lance Contreras
Create an easily resusable IconBlock (TextBlock that display's an icon)
by Azim Zahir
This tip explains how you can create animated gradients in a Windows store app using DispatcherTimer.
by AesopTurtle
Mimic a loading animation as seen in Windows 8 using pure XAML.
by Zain Nisar
How to create Custom Control in Blend 2015
by shahidul.haq
A WPF custom control for grouping data similar to build-in expander
by Opata Chibueze
This tip demonstrates how to wrap text in WPF - similar to using &shy or <wbr. in html
by Deepak_Sharma_
In this article I will explain how to display data from a SQL Server database table in a WPF DataGrid control
by Zain Nisar
How to create Data Binding?
by Carsten Breum
Data Virtualization example with a pagesize and async data request
by Ced743
DataGrid column separator
by Tawani Anyangwe
A dead simple HTML Sanitizer (and HTML Parser) you can use to clean user HTML input.
by Venkatesh Mookkan
Debugging XAML DataBinding
by Vinoth Kumar J
Designer debugging in WinRT
by Punamchand Dhuppad
In this tip we will talk about how to apply the same font style to TextBlock and Glyphs controls from code-behind.
by Umer Qureshi
A tip explaining the difference between Stackpanel and a Grid layout in WPF
by Jawahar Suresh Babu
The article explains how to add variable sized tile items into WinRT GridView.
by Venkatesh Mookkan
Databinding Concept in WPF
by Anis Derbel
This sample is based on Drag and Drop between GridView
by rohini.chiniwal
This tip defines a way to make a TextBlock trimming and display the whole text on mouse hover with animation effect.
by Sujeet Bhujbal
Article on dynamically generating Forms in WPF and Silverlight.
by Feverbird
This is an easy to use class that will help you in creating and reading XMLfiles.
by SoundersFan
How to edit templates in VS XAML without the bloat
by StormyDev
Simple and clean-cut label that user can edit text of during run-time (by double-clicking) which I wrote because the examples I found were either obsolete or added clutter to the interface.
by Ajit_Pudale
Tip to add EmptyDataTemplate in WPF or Silverlight DataGrid
by Farhan Ghumra
Encypt and decrypt StorageFile in Windows Store apps.
by Divikiran
Exception has been thrown by the target of an invocation using Visual Studio and TFS
by P_Dash
Showing multiple dialogs concurrently in UWP
by Shweta Lodha
How to troubleshoot data binding
by Slim Hammami
This is a tutorial which contains the finger print authentication using Xamarin Forms
by Clifford Nelson
This is a behavior that that will reset ToggleButton derived controls to false (or a specified default value) when the container's visibility becomes false.
by Shweta Lodha
How to format strings in binding
by jmix90
When you read the MSDN guidelines to improce WPF's performances you can find that it's a good idea to freeze Freezable objects.It's a quite easy thing to do via the code but it's quite harder to do it directly in the XAML. In this post we will see how to do so.What are freezable...
by dietmar schoder
Turtle graphics: fundamental C# classes and methods for the artwork production in the area of generative art.
by dietmar schoder
Read and analyse pixels: fundamental C# classes and methods for the artwork production in the area of generative art.
by dietmar schoder
Image sections and images: fundamental C# classes and methods for the artwork production in the area of generative art.
by dietmar schoder
Poisson disc algorithm: fundamental C# classes and methods for the artwork production in the area of generative art.
by Anis Derbel
The easiest way to drag and drop Image using Gestlure
by Mark Heath
Learn how to get started with MahApps.Metro, an open source library for giving your WPF applications a modern look and feel.
by dietmar paul schoder
How to produce a dynamic lined or squared background on a canvas/grid
by Divesh P
This tip explains how to create LongListSelector with grouping in very simple and easy steps.
by Cuba Cubicula
Attached behavior that saves control's template in a file as XAML
by GPUToaster™
Include Windows Form Controls in WPF
by Erxin
Introduce a simple way to embed an EXE into a WPF window application.
by Lance Contreras
How to add columns to a DataGrid through binding and map its cell values
by Vassili Kravtchenko-Berejnoi
A generic workaround for auto-generating multiple custom columns in a WPF DataGrid in case where the data class has multiple properties of the same type
by Alberto M.
How to control TP-Link Smart Plug (HS100 or HS110) with C#
by Umer Qureshi
How to create a Custom Control so it can be used later and how to give access to some of it properties
by Anis Derbel
you can now crop Image with specified size equally
by Manish Dubeyy
How to debug the design time errors in WPF XAML file?
by umangsain
Thanks for providing the coding, i am also searching for the same content and now i need not to search any where.bike authorized dealers
by gsvolt
Draing a two-color line in Silverlight.
by Vladan.Obradovic
How to easily write a user's guide for your application using different file extensions
by KADJINA Toyi
This sample is about hiding automatically datagrid columns when all rows of this column are empty.NB: The following code is for silerlight 5 and can be readapt for WPF
by Umer Qureshi
Explains how to navigate among pages with button clicks
by Anis Derbel
Get information of any website you want
by Herbert Lausmann
Icon Pro - A C# + WPF open source tool for creating windows icons from PNG images or SVG vectors
by wim4you
Show UniformGrid and scroll through a few thousand images, UI virtualization
by Silvia Campo
How to organize the container
by Gregory Morse
Implementing a complete WRL native C++ XAML blank project template
by SujayC
This tip demonstrates how easy it is to implement validations in your WPF Application based on MVVM pattern.
by comiscience
Improve WPF performance with RenderOptions and TextOptions
by Sergey Alexandrovich Kryukov
Improvements used to fix an annoying WPF MenuItem defect related to icons
by Mohammad Dayyan
Sometimes we need to show an external image directly in WPF.Assume we have a folder that is named images beside of our main's WPF exe file. There is an image in this folder that's named sample.png.Now with the following XAML code, we can show it in WPF directly:<Image...
by Aaron Amberman
Advanced custom logical and visual tree walking methods
by Mayur Shah
Markup Extension that allows you to declare Generic classes in Xaml
by Richard Deeming
This is an alternative for "Markup Extension for Generic classes"
by adityasahver
In this article, we will learn how to create an Tile/Page in the MS Band and trigger the details on the associated device
by lally727
Running multiple animations in one WPF XAML
by Kelvin33
A quick and dirty way to enable multi-item selection in listbox and listview WPF controls.
by wim4you
Highlights some code from "VERY Easy MVVM "MVVMExtraLite" (MVVMXL) - Free and tiny source code" from XAML guy that I found simple and useful.
by Yasser Moradi DNP
Parse CanExecute to detect when CanExecuteChanged should be called.
by Mdimagh Firas
This tip/trick shows you how to add bindable AppBar with MVVM Light Toolkit in Windows Phone 8
by Mdimagh Firas
This tip/trick shows you how to add navigation between pages with MVVM Light Toolkit in Windows Phone 8
by Csaba Fábián
An open source library of Linq operators on ObservableCollection
by Jun Du
I had to create a trivial image button for my Silverlight web site. I Googled the web and got tons of tips and suggestions. However, most of them involve several editing steps through resources, template or style. Some require additional tools, such as Expression Blend. In my...
by Houssem_Dellai
Developing the client and server side for a chat application.
by ntg123
Simple way to pass custom(Attached) properties into a style-based control-template with triggers
by shahed.sohail
Passing Parameters to Success method in executeQueryAsync.
by Houssem_Dellai
We'll see how SystemTray properties can help you design nifty apps
by isenthil
How to play a sound in Windows Phone using media element
by Reader Man San
Plug-in Architecture To Work in WinForms MVC + WPF MVVM + ASP.NET MVC + Mobile (Xamarin MVC/PhoneGap MVC) + Win 10 Universal App MVC
by pritam40
Simple but presentable message boxes for Silverlight developers. Designed for ease of integration with existing projects.
by MichaelLPerry
A behavior to attach to a ListBox to keep WPF from clearing the selected item
by Abhishek Shrivastava
Simple trick to provide compile time safety for client side classes using INotify to notify when property changes (used generally by XAML bindings)
by jmix90
Creating a full-screen window in WPF is quite simple, set WindowState to Maximized and WindowStyle to None. However, a border is still visible on the bottom and on the right sides. In this post we'll discover how to remove it.
by Anton Lesnichenko
Add AllowsTransparency="True" and there will not be a border.
by Sumit Samediya
Here we will learn how to remove default background color of ListBox item on selection in Windows Universal App
by Anis Derbel
The easy way to Reorder your DataGrid/ListBox with Drag and Drop
by Clifford Nelson
This tip presents a ValidationAttribute that can be applied to enumeration properties. The normal RequiredValidationAttribute normally works but if numbers are assigned to the enumeration values, the default value is zero and that may not be valid.
by alexbk66
Reusable WPF RadioButton control which takes the pain away
by immortalus
This is an alternative for "Scroll Synchronization"
by jmix90
You often read on the web that the DependencyObjects are not marked as serializable and that this is a major drawback of them...But there is a easy way to perform a serialization of these object : use XAMLWriter and XAMLReader :public class MyDependencyObject : DependencyObject{public...
by Sujeet Bhujbal
In this article I will tell you how to create shapes and create custom drawings using the Path property.
by Reinhard Ostermeier
This article introduces a simple control which allows to share height and/or width between multiple instances of it.
by Praveen_Kumar Gupta
with the help of this article developer can add gridlines on canvas , and with slider control resize them easily
by Uday Kumar B R
In this article you will learn How to develop Silverlight Application
by Ian Landicho
A simple combo box that will have predefined items but the selected value bound to a property from our View Model.
by Umer Qureshi
How to bind data in a simple way without writing any code
by MarkWardell
An aid to Port WPF Framework Applications to .NET Core 3.1
by Gerald Gomes
A very simple example of displaying validation error next to controls in WPF
by 1sumitanand
This tip is for newbie developers.
by N_tro_P
Simplify your MVVM Properties
by Cédric Bourgeois
How to make it easier to manage StyleSelector and TemplateSelector with AvalonDock, especially when the selection is based on the ViewModel type only.
by Borja Prado
How to convert slider thumb tooltip value
by 1sumitanand
Sorting of simple ListView Elements in Ascending/Descending Order
by Christian Amado
In this tutorial, we will discuss on ProgressBar & Background worker. Follow the step-by-step tutorial to know how to use these clases.
by Houssem_Dellai
Get the resources you need to start developing Windows 10 apps.
by ergohack
This SQLite Data Object Window base class automates the data updates and the data bindings between the XAML presentation and the SQLite database allowing the minimum of code needed to present and edit SQLite database records.
by Clifford Nelson
This tip provides an alternate way to combine data with text in a WPF control using a ValueConverter that could be considered easier.
by cjb110
A String To Brush Converter for WPF/Silverlight
by Maciej Wojton
Style a WPF TabControl border to be thicker and have rounded corners.
by sam stokes
How to perform arithmetic operations on XAML Text
by Shmuel Zang
This tip shows how we can extend a Button control to support suspension of its Click event, in order to perform some animations before the Click event is raised.
by Ced743
Imbricated ItemsControl (a list into another list) to make a table
by Clifford Nelson
It is not straight forward to change the row selected and hover colors on the Telerik RadGridView. This is a ControlTemplate that works, and works with the detail pane.
by Jawahar Suresh Babu
The tip gives an easy way to bind string values to WinRT RichTextBlock
by Alaa Ben Fatma
Choose your text maximum length programmatically and show a message whenever the length = the maximum length
by Shining Dragon
A TFS build template that cleans up after itself once the build is complete
by Matej Pavlů
Creating a replacement for missing TileBrush known from WPF.
by Shah Ankita
Top and Bottom Appbar in XAML
by Sergey Alexandrovich Kryukov
Focused TextBox blocks Undo/Redo invocation of other components, but the problem can be solved comprehensively
by Saad_Mahmood
Unleashing Path List Box using Expression Blend
by Avtar Sohi
Objective of this article is to demystify the deferred loading concept in XAML.
by Jack Z. Stone
How to use Xaml.XamlServices to serialize or deserialize a DependencyObject.
by ShantanuKulkarni3
Introduction to WPF DrawingContext api
by Le Sourcier
This tip helps in using font icons as ImageSource.
by Piyush Manharlal
Using integer instead of Enum for ComboBox and Radio Button in XAML
by Houssem_Dellai
Reduce the number of properties in the View-Model by using ObservableCollection
by Mihail Mateev
This blog is about how to start with PhoneGap / Apache Cordova and Windows Phone 8
by Clifford Nelson
I had a situation where a control appearing was significantly affected by the initialization of the UserControls. This behavior fixed my problem.
by Matej Pavlů
Creating a replacement for missing TileBrush known from WPF
by Nomesh G
Adding Validation to controls in WPF
by PyroStrex
Example of loading external scripting and external XAML with VB.NET and NeoLua
by VR Karthikeyan
Vector icons in WPF
by hesido
A super simple method for listing Enum members in WPF using databinding
by VitusD
Avoid unwanted margin in disabled TextBox.
by Houssem_Dellai
Cached images will still be in memory even when navigated to another page, I'll suggest some workaround.
by Anis Derbel
Link between Accelerometer and composant in xaml
by Rohit Dot net
Validation control with a single validation rule is easy, but what if we need to validate a control using different validation rules. This article tells how to achieve multiple validation on single control in an easy and systematic way.
by Oussama_Kahoul
Introduction to WPF technology and the MVVM design pattern
by Clifford Nelson
Normally a popup will stay open until explicitly closed. The Behavior will close the Popup if the mouse is clicked within or outside the Popup area or leaves the Popup area.
by Clifford Nelson
The tip provides a behavior that will set a control to a default value when the Visibility changes
by Clifford Nelson
Shows how to set DataContext of View to itself using XAML and discusses the advantages of INotifyPropertyChanged to DependencyProperty
by Emiliarge
Using WindowChrome from Microsoft.Windows.Shell.dll
by Clifford Nelson
This tip presents a way to use the ContentControl and DataTemplate to easily control an image in a Window.
by Alexander Sharykin
No more Template copies
by Clifford Nelson
A little trick that will more completely fill the DatePicker background from the code-behind.
by Luis Manuel Prospero Mano Batista
Another simple way to bind one Enumeration to a Combobox or to a Listbox
by Dirk Bahle
A message box service implementation that is based on WPF.
by Steve 262877418
Different resource paths using in WPF XAML file
by Clifford Nelson
This behavior will select the entire text when a TextBox or PasswordBox gains focus
by K K Srinivasan
Focus on WPF Novice to easily understand Data Validation using IDataErrorInfo interface
by K K Srinivasan
Focus on WPF Novice, to do Data Validation using INotifyDataErrorInfo interface easily
by Clifford Nelson
Normally, there is no need to ensure that types exactly match when using a Binding. For instance, the Control property double to and int in a ViewModel
by Stanko Milošev
How to either migrate to the new XAML designer extensibility or write WPF custom control extensibility model based on .designtools.dll.
by Harshit Gindra
This article with help monetize your Xamarin Forms app using Google Admob. This article shares different implementations for Xamarin.iOS and Xamarin.Android.
by Harshit Gindra
Check and request for Permissions in Xamarin Forms mobile application
by Tamas Lorincz
Xamarin.Forms Circle image for iOS
by Luis Manuel Prospero Mano Batista
XAML Gauge Control for Universal Applications, Windows 8.1 (Desktop/Windows Phone), WPF, Silverlight
by MatthewThomas
Adding a watermark to a WPF TextBox by only using XAML. No extensions. No Converters.
by PSK_
Serialization of WPF Framework Elements
by Ajcek84
Overview of music notation library
by CDP1802
Serializing and deserializing objects with XamlServices class
by Herbert Lausmann
Convert between over 100 different currencies in .NET using Yahoo's APIs
by ergohack
This roguish way of moving a WorkItem, directly 'in-place', through SQL leaves all of the previous data associations intact, but portends issues with future major updates and current TFS Data Warehousing.