Archive for the ‘WPF-WCF-WF’ Category

Simple WPF ViewModel implementaion with VisualBasic.NET

This is my trial for applying View-ViewModel concept in WPF Windows application. I do not have a Model for this sample so omitting that word
This is the XAML code which I used. Here I tried to do text binding with a TextBox and Command binding with a Button.
File 1: Window1.xaml

<Window x:Class="Window1"
[...]

Leave a Comment

WPF - How to use Image Embeded Resource from c# code?

Add your image (I take a png file) to your solution
Use this code:

Assembly myAssembly = Assembly.GetExecutingAssembly();
Stream myStream = myAssembly.GetManifestResourceStream("WpfApplication1.testimage.png");
 
PngBitmapDecoder bd = new PngBitmapDecoder
(myStream, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
Image1.ImageSource = bd.Frames[0];

Name spaces needed are System.Reflection and System.IO.
VN:F [1.1.6_502]Rating: 0.0/5 (0 votes cast)

Leave a Comment

WPF – Cube rotation - animation

This program animates a cube in black background. My company logo is used as texture.
Here is the XAML file:

<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="pitScrnSaver 1.0" Height="300" Width="300" Loaded="Window_Loaded" Background="Black" ResizeMode="NoResize" ShowInTaskbar="False" WindowState="Maximized" WindowStyle="None" Icon="/pitScrnSaver;component/favicon.ico">
<Grid MouseMove="Grid_MouseMove">
<Viewport3D Margin="4,4,4,4">
 
[...]

Leave a Comment

Composite Application Guidance for WPF (Prism)

The Composite Application Guidance (from Microsoft patterns & practices) for WPF is designed to help you more easily build enterprise-level Windows Presentation Foundation (WPF) client applications. This guidance will help you design and build flexible composite WPF client applications—composite applications use loosely coupled, independently evolvable pieces that work together in the overall application.

Check this: http://msdn.microsoft.com/en-us/library/cc707819.aspx
Using [...]

Leave a Comment

Windows Workflow Foundation - Tutorials

Here is a good link from JoeOn.net which is a series of tutorials on Windows Workflow Foundation

http://joeon.net/post/2008/02/Windows-Workflow-Foundation-Tutorial-Series.aspx
Another good link is (always from :)) ScottGu’s Blog:
http://weblogs.asp.net/scottgu/archive/2006/08/31/Windows-Workflow-Foundation.aspx
VN:F [1.1.6_502]Rating: 0.0/5 (0 votes cast)

Leave a Comment

Beginner’s WPF Animation Tutorial - on Codeproject

My “Beginner’s WPF Animation Tutorial” articke on CodeProject available at http://www.codeproject.com/KB/WPF/WPFAnimation.aspx

(I reported this here earlier with another link which was under - non-edited contributions of codeproject)
VN:F [1.1.6_502]Rating: 0.0/5 (0 votes cast)

Leave a Comment

What’s this (Code Name) Avalon?

WPF or Windows Presentation Foundation… formerly known as Avalon.
VN:F [1.1.6_502]Rating: 0.0/5 (0 votes cast)

Leave a Comment

Beginner’s WPF Animation tutorial

My article for ‘Beginners WPF Animation’ is availble on codeproject.com.
Check the CodeProject article at http://www.codeproject.com/KB/WPF/WPFAnimation.aspx
VN:F [1.1.6_502]Rating: 0.0/5 (0 votes cast)

Leave a Comment

WPF - running wheel animation

We can make a rotate animation with image1.RenderTransformOrigin = new Point(0.5, 0.5); so that we will make the feeling wheel is rotating. Here is the code:

DoubleAnimation da = new DoubleAnimation(360, 0, new Duration(TimeSpan.FromSeconds(3)));
RotateTransform rt = new RotateTransform();
image1.RenderTransform = rt;
image1.RenderTransformOrigin = new Point(0.5, 0.5);
da.RepeatBehavior = RepeatBehavior.Forever;
rt.BeginAnimation(RotateTransform.AngleProperty, da);

More detailed version is available at http://www.digitalmanic.com/index.php?title=Beginners_Animation_tutorial_-_Rotate_2
VN:F [1.1.6_502]Rating: 0.0/5 [...]

Leave a Comment

Beginners Animation tutorial - Rotation

My second WPF animation tutorial is available at http://www.digitalmanic.com/index.php?title=Beginners_Animation_tutorial_-_Rotate

DoubleAnimation da = new DoubleAnimation();
da.From = 0;
da.To = 360;
[...]

Leave a Comment