Showing posts with label Windows Presentation Foundation. Show all posts
Showing posts with label Windows Presentation Foundation. Show all posts

Monday, March 25, 2013

WCF: From a Beginner's perspective & a Tutorial - CodeProject

Architecture of WPF
Architecture of WPF (Photo credit: Wikipedia)
 From the Intro to the article:

Well, WCF stands for Windows Communication Foundation, it was first shipped with .NET 3.0 framework along with WPF, Windows CardSpace and WorkFlow Foundation.
From a beginner's perspective, what does actually WCF mean? Let's break the abbreviation into single entities and try to debug. It consists of 3 words, a)Windows b)Communication c)Foundation.
A beginner would glance at the words and would think, well it is something which deals with Windows platform, which is used to communicate and connect applications. Hmm, well he/she ain't wrong on the first strike...
A definition which comes to mind may be summed up as: WCF is a kind of technology, which is used to develop and deploy services on Windows platform. Different books have different set of words to describe WCF, but the gist is almost the same which points to development and deployment of services on Windows Platform.
MSDN says, WCF is a framework to build service-oriented applications. So basically WCF revolves around developing applications which are greatly dependent upon services.

WCF: From a Beginner's perspective & a Tutorial - CodeProject
Enhanced by Zemanta

Friday, November 18, 2011

WPF: Webcam Control - CodeProject

Introduction to Article

I have on several occasions scoured the net for a simple to use WPF webcam control and either my search queries were awful or I just wasn't comfortable with whatever I found. This webcam interest was recently increased when I read an article, here on CodeProject, that referred to an application that made use of a webcam. It was a Silverlight article and the ease with which one could utilize a webcam in Silverlight made me envious of WPF's little brother (or is it sister?). The VideoBrush in Silverlight is especially a nice touch.
It is with this pain and envy in mind that I decided to try my hand at creating a WPF control that could;
  1. Display webcam video with little coding effort,
  2. Allow saving of webcam video to harddisk, with little coding effort,
  3. Save the webcam video in a variety of video formats.


WPF: Webcam Control - CodeProject

Monday, September 19, 2011

XAMLFinance – A Cross-platform WPF, Silverlight & WP7 Application - CodeProject

Introduction to Article


This article describes the development of XAML Finance, a cross-platform application which works on the desktop, using Windows Presentation Foundation (WPF), on the web, using Silverlight and on Windows Phone 7 (WP7). My aim in writing this article is to highlight how the XAML based technologies used for desktop, web and mobile allow you to share large quantities of code and cost-effectively distribute your application on a range of devices.



XAMLFinance – A Cross-platform WPF, Silverlight & WP7 Application - CodeProject
Enhanced by Zemanta

Thursday, August 11, 2011

MathConverter - How to Do Math in XAML - CodeProject

Graphene nanoribbon band structures for arm-ch...Image via WikipediaBackground to an article that's going to save me a lot of problems!!!!!

When working with my XAML files, periodically I run into a need of doing some simple calculations directly in XAML. For instance, what if I want this width to be exactly to thirds of that width, or what if rotation angle is a certain multiple of a particular value? This problem may be solved in a number of ways. Widths are usually better addressed via margins, paddings, or grids. At other times I put calculations into a view model. At some other times I create a special binding converter that would do the arithmetic for me.


MathConverter - How to Do Math in XAML - CodeProject
Enhanced by Zemanta

Friday, July 8, 2011

WPF/Silverlight Binding Using Flags Class - CodeProject

Silverlight LogoImage via WikipediaIntroduction to article

A flag enumeration is a very useful tool in programming. However, it is not straightforward to use flags in binding. Somehow or another, the particular flag has to be specified. This is possible using the binding "parameter". With this information, it is quite straightforward to convert for the View, but the problem is converting back. You would normally be binding to a checkbox and this value is either true or false (tri-state does not make sense). When converting back, there is no information about the state of the other flags. Without this information, it is not possible to update the flags value in the View-Model. This is one of the main reasons a special class is needed to support binding a set of flags to a View. Once there is an implementation to support flags in both WPF and Silverlight, implementations can be much cleaner.

WPF/Silverlight Binding Using Flags Class - CodeProject
Enhanced by Zemanta

Setting focus on a control in Silverlight using XAML - CodeProject

Silverlight LogoImage via WikipediaIntroduction to article

When I first started using Silverlight, I was amazed that there wasn't an easy way to set the focus of the cursor to a text box. I had just built a login page and wanted the cursor to default to the user name text box. After searching blogs and forums, I've finally come up with a solution that satisfies me. I hope this article helps you avoid the frustrations of some of the one-line responses you will see in some of the forum responses.


Setting focus on a control in Silverlight using XAML - CodeProject
Enhanced by Zemanta

Friday, July 1, 2011

Friday, June 17, 2011

WPF: P2P Chess - CodeProject

Introduction to article

The .NET Framework provides developers with a rich set class libraries that enable creation of visually compelling applications that can effectively communicate with each other. The two technologies that afford us this luxury are WPF and WCF. WPF provides the eye-candy while WCF enables communication. Some Windows (Win 7 and Vista) features also enable discovery and ad-hoc collaboration making it easier to find peers and send invitations for collaboration.
People Near Me (PNM), Windows Contacts, and Invitations are the Windows features that enable discovery and ad-hoc collaboration.
It is with all this in mind that I decided to develop an application that would make use of the previously mentioned technologies, and what better application than a Peer-to-Peer (P2P) chess game. P2P Chess specifically makes use of WPF, WCF, and PNM.



WPF: P2P Chess - CodeProject
Enhanced by Zemanta

Dental Chair Automation in WPF - CodeProject

Introduction to article

This is an article which explains briefly how to automate any device or equipment by taking a dental chair into consideration. My aim here is to give an overview of how WPF and C# can be ultimately used in the graphical designing and presentation of any automated projects.



Dental Chair Automation in WPF - CodeProject
Enhanced by Zemanta

Wednesday, May 4, 2011

WPF Elements Cloud - CodeProject

Introduction to article

I suppose everyone knows such thing as Tags Cloud. Usually you can meet it on some kinds of web-sites, where this control represents a container with certain quantity of links and when you enter a mouse cursor on it these links move on the virtual ellipsoid (or sphere) while you move the mouse.
At this article I try to explain how to create such control using WPF. Also you can export this code to Silverlight (making some adjustments) and make a Silverlight User Control.



WPF Elements Cloud - CodeProject
Enhanced by Zemanta

Saturday, April 16, 2011

NetworkView: A WPF custom control for visualizing and editing networks, graphs and flow-charts - CodeProject

Introduction to the article

I am going to assume that you already know C# and have at least a basic knowledge of using WPF and XAML. An understanding of MVVM, WPF styles, control templates and data-templates will also help, although I'll do my best to fill in some of the details along the way and provide links to learning resources.
Josh Smith's Guided Tour of WPF and Sacha Barber's WPF: A Beginner's Guide are a good place to start if you want a WPF primer. Christian Mosers WPF Tutorial.net is full of interesting snippets of WPF information and has some great diagrams that can help explain WPF concepts.
Josh Smith also has an article on MVVM and if you already know a bit of WPF and MVVM I can recommend reading Gary Hall's book, I just read it and found that it has helped progress my MVVM knowledge and experience.



NetworkView: A WPF custom control for visualizing and editing networks, graphs and flow-charts - CodeProject
Enhanced by Zemanta

Thursday, April 14, 2011

WPF : Carousel Control - CodeProject

Introduction to article

A while ago (around XMAS) Marcelo Ricardo de Oliveira and I were working on a joint article to create a custom Carousel, you know the sort of thing you see a lot in popular component manufacturers control sets. Thing was we very nearly finished our own hand cranked solution, and then I remembered the PathListBox which I had played with in the past.
So I did a bit of googling to see what people had done with the PathListBox and to my suprise there was a codeplex offering from Microsoft that seemed to get you 1/2 way to being able to implement a Carousel using the PathListBox. There are a number of classes that Microsoft have come out with to help us lowly developers, which come in the form of a bunch of Dlls which are known as the PathListBoxUtils, which are part of the Expression Blend Samples over at codeplex :


WPF : Carousel Control - CodeProject
Enhanced by Zemanta

Monday, March 21, 2011

WPF Custom Control - FilterControl for ListBox/ListView - CodeProject

Introduction to article


ComputerCastle.Demo.Controls.FilterControl is a WPF-based Custom Control which can be used as quick filter for any ItemsControl like ListBox, ListView, DataGrid, etc. This article is to tell you how easy to create a Custom Control in WPF using combination of simple framework controls.
The article focus on:
  • How to create a Custom Control in WPF briefly
  • Explanation about FilterControl
  • How to implement FilterControl


WPF Custom Control - FilterControl for ListBox/ListView - CodeProject
Enhanced by Zemanta

Tuesday, March 15, 2011

WPF 2D Image Carousel - CodeProject

Introduction

This article describes how I went about creating a 2D image carousel. The reason for creating it,... I just wanted to see if I could. I was actually watching a Blackberry Playbook video and I wondered whether I could create a carousel like control that replicated the carousel features in the video. The Playbook's though is more elegant and I may all but envy. My carousel UserControl, aptly named ImageCarousel, only deals with images and five images at that. Sad as that may be you'll hopefully pick up something useful from this article so read on if you're still interested.


WPF 2D Image Carousel - CodeProject
Enhanced by Zemanta

Sunday, March 6, 2011

WPF/MVVM Quick Start Tutorial - CodeProject

Introduction to Article

Assuming that you have a decent understanding of C++ and a modest understanding of C#, getting started in WPF shouldn't be too difficult. I started looking at WPF 6 months ago, and after probably causing a spike in Google's searches, I finally started to understand and become productive with WPF (whether I've missed the boat on this one, is another story for another day).
As with learning any new technology, you get the benefit of hindsight. From my perspective, almost every tutorial on WPF I've come across is inadequate for one of several reasons:
  • the example is all in WPF
  • the example glosses over the key facts that would actually make your life easier.
  • the example tries to show off WPF's capabilities with lots of pointless effects that aren't helping you.
  • the example uses classes that have properties that appear far too similar to framework keywords and classes, and are therefore difficult to idenfity in the (XAML) code as being user defined (ListBox GroupStyle's Name is a complete headache for novices).
So to address this, I've written this based on what I would have liked to have found as the #1 hit on Google after typing 'WPF Tutorial'. This article may not be 100% correct, or even do things 'the one true way', but it will illustrate the main points that I wish I had found in one place 6 months ago.
I will quickly introduce some topics, then show an example that explains or demonstrates each point. Accordingly, I haven't really attempted to make the GUIs pretty, that's not the point of this article (see the bullet points above).
As this tutorial is quite long, I've elided quite a lot of code for brevity, so please download the attached zip file, and look at the examples (.Net 4.0/VS2010). Each example builds on the previous one.


WPF/MVVM Quick Start Tutorial - CodeProject
Enhanced by Zemanta

Tuesday, February 15, 2011

Data and Command Bindings for Silverlight MVVM Applications - CodeProject

Introduction to article

This article summarizes two utility classes used for data and command bindings in Silverlight MVVM applications and demonstrates how to use the two classes with a running example.


Data and Command Bindings for Silverlight MVVM Applications - CodeProject
Enhanced by Zemanta

Saturday, February 12, 2011

WPF : A Weird 3d based control - CodeProject

A 3D projection of an 8-cell performing a doub...Image via WikipediaIntroduction to article

This article is basically about a control that I have written for WPF, that allows users to create their own data items, which will be layed out in a layed out in a 3D Viewport in layers. You can almost think of supplying a list of trees to a control that lays these items out in layers in 3D space. The control presented in this article also supports transparency and allows the DataTemplating of your custom data items, and allows full 2D interaction with the DataTemplated data items when the corresponding DataTemplate applied Visual is created and hosted on a 3D Viewport ViewPort2DVisual3D.Visual. So you get the best of both worlds, you get to use powerful techniques such as DataTemplating, but you also get to see you items layed out in 3D, and you can still interact with them.
The rest of this article will demonstrate the custom control which I have called "LevelTree3D".


WPF : A Weird 3d based control - CodeProject
Enhanced by Zemanta

Sunday, February 6, 2011

DataGrid in WPF using Sql Server Compact 3.5 Sp1 - CodeProject

Introduction to the Article

Windows Presentation Foundation shortly known as WPF is a technology which is betterment of Windows Forms. The main advantage of WPF is User Interface design a developer can have good design using 2D and 3D rendering and adaptive documents, typography, vector graphics, runtime animation, and pre-rendered media.


DataGrid in WPF using Sql Server Compact 3.5 Sp1 - CodeProject
Enhanced by Zemanta

Monday, January 31, 2011

Amble Avalona - CodeProject

Introduction to article

Following in the footsteps of my previous article it would have been improper not to take on the task of xamlizing a four-legged creature. In short I decided to work on a WPF project that replicated a walking four-legged animal.


Amble Avalona - CodeProject
Enhanced by Zemanta

Thursday, January 20, 2011

Simple Drag Selection in WPF - CodeProject

Introduction to article

This is a short article that examines the implementation of a technique for drag selection of multiple items in a Canvas or ItemsControl derived class. In this article I use a ListBox to host the drag-selectable items.
In addition I look at how to make the selected items draggable. This felt like a natural addition as dragging the items is often what you would want to do after drag selecting them.


Simple Drag Selection in WPF - CodeProject
Enhanced by Zemanta