DCSIMG
May 2009 - Posts - David Sackstein's Blog

May 2009 - Posts

1
Comments

A Walkthrough for WCF (MOC 6461) by David Sackstein

The source code for this walkthrough can be downloaded here . I compiled this walkthrough for MOC 6461 that I am teaching these days. It corresponds to the work convered by units 1 and 2 of the MOC and will guide you through the following steps: Define the Contracts Implement the Contracts Implement a WCF Service hosted in IIS Create a Client Application Add a Self-Hosted Console Application for the Service Modify the Client Application to use the Console Host Add a Self-Hosted Windows Service for...
תגים:, ,
1
Comments

Fiddling with Fiddler 2 on localhost by David Sackstein

Fiddler 2 is a great tool to monitor the http activity on a computer, and an excellent debugging and teaching tool for WCF and ASMX. It’s free and you can download the latest version from here . What I like about it most, is that it can display SOAP messages - request and response as a DOM. You can really see what those contract attributes are doing : ) For my very simple Calculator.Add operation it displayed the following: Nice, no? The problem is, that it works best when monitoring traffic between...
0
Comments

Develop ASMX and WCF with Visual Studio 2008 and 2010 Side by Side by David Sackstein

My Visual Studio Side by Side Problem On my new laptop I had installed VS 2008 but had not done any Web Service development - so I hadn’t yet installed IIS or registered ASP.NET. Then I installed VS 2010 Beta 1. A while later I began preparing samples for a course in WCF that I am teaching these days – using Visual 2008. So I installed IIS 7.0 (I am running Vista Business) and registered ASP.Net from the Visual Studio 10.0 command prompt. I created a simple “Hello World” ASMX Web Service and a “GetData...
0
Comments

WPF, Windows Forms and ATL Part 3 by David Sackstein

Continued from Part 2 . So now for the second scenario. Hosting WPF controls in legacy containers. Well let’s start with hosting a WPF control in a Windows Form. Then we’ll have a bash at hosting a WPF control in an unmanaged application (hee, hee). Here is the source code for the three projects described in this post. Hosting WPF Controls in a Windows Form Hosting WPF Controls in a Windows Forms application is quite straightforward. The key is the ElementHost control in the Systems.Windows.Forms...
4
Comments

WPF, Windows Forms and ATL Part 2 by David Sackstein

Continuing from Part 1 . We are still discussing the first scenario for WPF Interop, namely using COM and Windows Forms User Controls in a WPF application. Here I will be giving some examples. In the next post I will discuss the second scenario – hosting a WPF control in a Windows Form application. You can download all the source code for Part 1 and Part 2 of this article here . Please note: All projects were prepared with Visual Studio 2010 Beta 1. WPF Application using a Simple COM Object (ATL...
תגים:, , , ,
2
Comments

WPF, Windows Forms and ATL Part 1 by David Sackstein

OK. I finally managed to create the sample ATL called Polygon from the ATL Tutorial on MSDN using the Visual Studio 2010 Beta 1. The problems I mention in the previous post remain; I simply hand-coded the text that the ATL wizard failed to create (well, maybe simply is not appropriate here). Anyway, back to interop. We have two scenarios to examine: WPF using COM objects and Windows Forms User Controls Windows Forms using WPF controls Let’s start with the first. In the rest of this post I will describe...
תגים:, , , ,
1
Comments

ATL and Visual Studio 2010 Beta 1 by David Sackstein

I am working on a post or two on the subject of WPF Interop with ATL and Windows Forms. I would like to demonstrate: ATL Simple Control in a WPF Window ATL ActiveX in a WPF Window Windows Form user control in a WPF Window WPF control in a Windows Form However, I encountered an unexpected setback: Its very difficult to create ATL projects with Visual Studio 2010 Beta 1! The ATL Wizard doesnt add implementations in the control to methods you add to the interface. When implementing connection points...
5
Comments

StaticResource and DynamicResource by David Sackstein

So, whats the difference, and when should I use each? I am referring of course to the difference between the behavior of these two XAML elements:       < Button Background ="{ StaticResource myBrush }"> Static Resource </ Button >       < Button Background ="{ DynamicResource myBrush }"> Dynamic Resource </ Button > Where “myBrush” is defined as a resource in a scope that contains the buttons. The Difference...
8
Comments

Security Warning for <Project Name> Dialog Box by David Sackstein

Recently, a message with this caption started popping up when I open some of my projects with Visual Studio 2008. The detailed text of the message is: The <Project Name> project file has been customized and could present a security risk by executing custom build steps when opened in Microsoft Visual Studio. If this project came from an untrustworthy source, it could cause damage to your computer or compromise your private information. Load Project for Browsing Load Project Normally A “More...
תגים:,
14
Comments

MediaElement and More with WPF by David Sackstein

Download the code for this article here . In this post I am going to describe a simple video player application written with WPF. It is not a groundbreaker, but it provides easy-to-copy demonstrations of: Databinding between a collection of objects and a control. Writing a DataTemplate for ListBox.ItemTemplate Databinding between properties of two controls. Controlling the MediaElement, in particular how to create a Position slider that works. Writing a ControlTemplate for Button.Template Animating...
Powered by Community Server (Commercial Edition), by Telligent Systems