.Net
There are 58 entries for the tag
.Net
I was a bit surprised when I got an email from the Mix11 team congratulating me on my session proposal making the first cut. So now it’s up to the you to vote on your favorite sessions. After voting for mine, you can vote on 9 other sessions . The entire list can be found here. The voting period ends on February 4, 2011. My session will be focused on Expression Blend. I’ll be talking about the Visual State Manager, Sample Data and Behaviors. And I show some helpful features along way. So go and vote...
You are reading an old version of my weblog. Please update your bookmarks to http://www.timmykokke.com If you often use open source libraries you probably have a large library with various tools, like I do. NuGet is an extension for visual studio that enables you to install, uninstall and upgrade open source packages into your application very easily. Say for example you want to use MvvmLight or Ninject in your project, with NuGet it’s nothing more that tell it to add the package to your project....
You are reading an old version of my weblog. Please update your bookmarks to http://www.timmykokke.com Intro Visual States are an easy way to change the looks of your controls based on certain states. This state can be something like a mouse hover, some invalid state or any state you need in a control. For this tutorial I chose a traffic light control that can be one of four states. Green, Orange, Red and Inconclusive (blinking orange). In the end I show you how to use behaviors on buttons to set...
You are reading an old version of my weblog. Please update your bookmarks to http://www.timmykokke.com In the projects I’m doing I often use controls from my own library or use control from third party vendors. I don’t like the process of doing this. Rather I would like to have the libraries available inside Expression Blend, like the controls that came with the Silverlight Toolkit or Blend itself. One way is to add the custom assemblies containing the controls to one the folders in your Program...
Intro Adobe Photoshop offers people the possibility to share gradients through .GRD files. These files can be found very easily on various sites. This extension for Expression Blend allows you to import these files and use them in your Silverlight or WPF projects. The extension makes use of some changes to Expression Blend made in SP1. You must have Blend SP1 installed to use this extension. Know limitations The extension isn’t finished yet. I haven’t worked out all the bugs yet, but this first release...
PivotViewer series Building your first PivotViewer application Runtime PivotViewer collection creation PivotViewer - Working with Facets Handling PivotViewer events PivotViewer - Custom actions PivotViewer and MVVM Intro In this tutorial about the Silverlight PivotViewer control I would like to explain how to make use of Custom Actions. Small labels are placed on top of items in the viewer and clicking them will trigger an event. --> The only downside of these actions is that they aren’t fully implemented....
PivotViewer series Building your first PivotViewer application Runtime PivotViewer collection creation PivotViewer - Working with Facets Handling PivotViewer events PivotViewer - Custom actions PivotViewer and MVVM Intro In this next tutorial about the Silverlight PivotViewer control I would like to give a little more depth on Facets. What are facets, and how are they used in runtime generation of collections using the PivotServerTools library. This tutorial continues on techniques from last tutorial...
PivotViewer series Building your first PivotViewer application Runtime PivotViewer collection creation PivotViewer - Working with Facets Handling PivotViewer events PivotViewer - Custom actions PivotViewer and MVVM Intro Today I would like to show you how you can consume web services in the PivotViewer control for Silverlight and build a collection at runtime. This tutorial is based on examples found on www.getpivot.com and the getting started tutorial I posted earlier this week. This tutorial used...
PivotViewer series Building your first PivotViewer application Runtime PivotViewer collection creation PivotViewer - Working with Facets Handling PivotViewer events PivotViewer - Custom actions PivotViewer and MVVM Intro If you haven’t had a chance to look at the new PivotViewer control for Silverlight, have a look here or here. The PivotViewer enables visitor of you website to search large amounts of data very easily. The control takes a lot work out of your hands. Basically you tell it to load...
Intro Often extensions for Expression Blend need to store some global variables. Why not use the mechanisms Blend itself offers? I’d like to show you how to add a custom options page to the options dialog. I’ve started the example project by creating a new C# WPF Custom Control Library project and naming it ExtendingBlendOptionsTutorial. The details on how to create a new Blend Extension can be found here. You need to make sure the Microsoft.Expression.Extens... and Microsoft.Expression.Framework...
Since today XamlResource.com is officially in beta. Its purpose is to create a platform to find and share resources for Silverlight and WPF, resources in the form of Xaml. Have a look around and if you run into issues, please let us know at xaml@hotmail.nl. Beta 1: In Beta 1 only a few of the final categories are supported: Colors; Resources of type SolidColorBrush Gradients; Resources of type GradientBrush Color sets; 2 to 5 resources of type SolidColorBrush Vectors; Resources of type StreamGeometry...
Intro Today I would like to explain something about customizing the window chrome in Silverlight 4 OOB. For an example of customizing the window have a look at my open source demo application SilverAmp which is available on http://SilverAmp.CodePlex.com. Choosing style Running the application without the default window chrome requires running out-of-browser with elevated trust. How to set elevated trust is explained in this earlier post. To set the window style, go to the Out-Of-Browser settings...
Intro This is the second article in a series of small articles about what is new in Silverlight 4 and Expression Blend 4. The series is build around a open source demo application SilverAmp which is available on http://SilverAmp.CodePlex.com. Setting elevated trust A number of new features in Silverlight 4 require more permission, to gain access to the local file system for example. The elevated trust feature is only in available when running outside the browser. To enable elevated trust right click...
Intro This is the first in a series of small articles about what is new in Silverlight 4 and Expression Blend 4. The series is build around a open source demo application SilverAmp which is available on http://SilverAmp.CodePlex.com. MVVM Project and Item Templates Expression Blend has got a new project template to get started with a Model-View-ViewModel project easily. The template provides you with a View and a ViewModel bound together. It also adds the ViewModel to the SampleData of your project....
Event On June 7th Expression Studio 4 will be launched at the Internet Week in New York. One day later, on June 8th, the Dutch Silverlight and Expression User Group SIXIN organizes the Dutch Community Launch in collaboration with Microsoft and Centric at Centric's office in IJsselstein. To celebrate the 4 Expression release we have two interesting speakers. In addition, we give three packages Expression Studio and more great gifts away. Program The preliminary program for the evening is as follows:...
Last Tuesday the Software Developers Network – SDN organized another SDE. I’ve had the opportunity to present a session about Silverlight 4. I talked about lots of new features in Silverlight 4 and Expression Blend 4, focused on the Out-Of-Browser features. The slides of my presentation can be downloaded here. In my presentation I demonstrated a couple of features from my new pet project “SilverAmp”. This project is based on the legendary WinAmp, but made entirely in Silverlight. I use it to try...
Introduction With the recent news about Silverlight on the Windows Phone and all the great Out-Of-Browser features in the upcoming Silverlight 4 you almost forget Silverlight is a browser plugin. It most often runs in a web browser and often as a control. In many cases you need to communicate with the browser to get information about textboxes, events or details about the browser itself. To do this you can use JavaScript from Silverlight. Although Silverlight works the same on every browser, JavaScript...
.Last time I showed you how to get started building extensions for Expression Blend. Lets build a useful extension this time and go a bit deeper into Blend. Source of project => here Compiled dll => here (extract into /extensions folder of Expression Blend) The Extension When working on large Xaml files in Blend it’s often hard to find a specific control in the "Objects and Timeline Pane”. An extension that searches the active document and presents all elements that satisfy the query would...
Introduction Although it was possible to write extensions for Expression Blend and Expression Design, it wasn’t very easy and out of the box only one addin could be used. With Expression Blend 4 it is possible to write extensions using MEF, the Managed Extensibility Framework. Until today there’s no documentation on how to build these extensions, so look thru the code with Reflector is something you’ll have to do very often. Because Blend and Design are build using WPF searching the visual tree with...
Getting started with the basics Validation in Silverlight can get very complex pretty easy. The DataGrid control is the only control that does data validation automatically, but often you want to validate your own entry form. Values a user may enter in this form can be restricted by the customer and have to fit an exact fit to a list of requirements or you just want to prevent problems when saving the data to the database. Showing a message to the user when a value is entered is pretty straight forward...
I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. When writing the demo for the code-camp I ran into issues getting back on the UI thread after calling a webservice. The call to the webservice was made from the UI thread, but the callback was made on a different thread. The System.Threading.Synchroniz...
Below is a list of downloads for Silverlight 3. It includes all necessary downloads together. The majority are new updates and releases since the Silverlight 3 release. A few are older releases but should work with Silverlight 3. I’ll try to keep the list up to date when new releases follow. If you know a tool, library or framework for Silverlight that isn’t on the list, please let now by commenting, mailing or thru twitter. Development/Design Silverlight 3 RTW (3.0.40818.0) Microsoft® Silverlight™...
StarterKits for Silverlight and the Expression Tools Lately I’ve seen some tweets passing by with links to various StarterKits. I’ve decided to "Bing” around a little and find out what these people were talking about. There are quite a few StarterKits available on various topics. I’ve listed a few below, old and new ones, that I find relevant to my fields of interest: Silverlight and the Expression Blend, Design and Web. Building a Zune Website with Expression Blend 3 StarterKit In this lab you will...
A few months ago I received an email from Rob Houweling explaining his ideas for a new Dutch usergroup, focused on Silverlight, Expression Design and Expression Blend. I’ve had been playing with the idea of a Silverlight usergroup myself at the time, so I didn’t have to think very long about joining. After meeting and numerous emails between six silverlight enthusiasts(Rob Houweling, Mark Monster, Koen Zwikstra, Antoni Dol, Eric van den Hoek and me, Timmy Kokke) the plans are worked out and it’s...
For a long time I’ve been wondering how to create a smoke effect like used in the Silverlight Logo for example. There are some techniques to render smoke by using 3D modeling software. But creating this effect in a tool like Expression Design is easier than it looks. Below is an example of what the end result might look like. After opening expression Design start by creating a new document.The size of the document isn’t very important as long as you have a bit of space to play with some paths, so...
I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. This time I would like a little helper class to your attention. When working in a web environment ever so often you need to encode/decode a Url or a piece of Html. In Silverlight you need to look for the System.Windows.Browser.Http...
Today I would like to show you how to create lines like above in Expression Design. After opening Expression Design, start by creating a new .design document. Now, zoom in a bit to the upper left corner of the document. Draw a small rectangle and give it some easy numbers. Move the rectangle to 10, 10 and change it width and height to 10 too. Change the stroke of the rectangle to none, and change the fill color to black. Copy the black rectangle and move it to position 10,20. Change its color to...
I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. Occasionally it’s required to use an Rss or an Atom feed in your projects. Just to show some news, or the latest update on the stock exchange. Working with these, often large, chucks of xml directly can be a pain. In Silverlight...
I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. When showing text to a user it's often necessary to show a few words in Italic or Bold. To do this, use the System.Windows.Documents.Run class. This class provides a small bit of HTML - like features inside a Silverlight TextBlock....
I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. When developing applications, especially graphic intensive web applications you want to monitor the performance when running. The System.Windows.Analytics class can help you with that. The class has no methods of any significance...
I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. Although the Silverlight security model prevents access to the local file system, it is very easy to open and save or import and export files to and from the file system. It is not possible to gain any information about the local...
A few days ago I wanted to monitor all routed events fired in my application. Because I am running an XBAP application inside a browser windows, Snoop wasn’t very helpful (it usually is). Because all routed events are basically the same, you can handle them all with one singe event handler. Using the EventManger it is possible to get all routed events and register a class handler for every one of them. The code below is a stripped down version of the code I’ve got implemented. When loaded, it gets...
I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. Most often Silverlight applications take up the whole screen and the page that is hosting the application contains only one control. It is possible to split you application into smaller controls. This can be valuable when you are...
When working on some projects and articles in Expression Blend 3 I noticed a few differences with Blend 2 right away. Here are 9 improvements and new features I really like or enjoy having now. 1. Expression Blend now shows the size of your controls even when the width and height are set to Auto: 2. The assets are placed in a panel now. Although the “old” way of working with asses is still available, this new panel can be left open. Beside that, the assets are grouped in different ways in a tree,...
Below is a list of downloads for Silverlight 3. It includes all necessary downloads together. The majority are new updates and releases since the Silverlight 3 release. A few are older releases but should work with Silverlight 3. I’ll try to keep the list up to date when new releases follow. If you know a tool, library or framework for Silverlight that isn’t on the list, please let now by commenting, mailing or thru twitter. Development/Design Silverlight 3 RTW (3.0.40818.0) Microsoft® Silverlight™...
I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. There are situations when you would like to start an animation as soon as your application is loaded. The EventTrigger class is what you need in that case. You may know this class from WPF, but the Silverlight version is very limited....
I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. When running Silverlight outside the browser, there’s the possibility that the computer that is running the applications is disconnected. This is where the System.Windows.ApplicationS... class comes in. This class represents...
Introduction Today I would like to show you how to style a TreeView control in Silverlight 3 using Expression Blend 3. The TreeView is a control to visualize hierarchical data structures. If you haven’t got Silverlight 3 and Blend 3, you can find all downloads for Silverlight 3 and Blend 3 here. The TreeView control is available in WPF natively and styling is only a small bit different than in Silverlight. I try to explain one way of doing this and there are others. If you have any questions what...
I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. One of the great new features of Silverlight 3 is the so called “Out of Browser” support. This means you can run your application without the browser, but still using the browser secure sandbox. The ApplicationIdentity class can...
I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. The System.Json namespace provides support for Javascript Object Notation or JSON. By using the classes in this namespace you are able to use Json objects in your C# or VB code. These object are often used in JavaScript and to...
I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. There are situations where you want to know which UI element has focus. One way of doing this is handling the GotFocus and LostFocus events. These events are only raised when an element gets or looses focus, and are handled asynchronously....
I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. This first SilverBullet™ I would like to give you is the Environment class. It’s in the System namespace and provides information about the environment your application is running in. Use it to get information about the system,...
The last thing I wanted to do for my WinPHP contest entry BlogSnor is publishing some kind of manual. Instead of walk you thru in text and images, I would like to show you a few videos. The first video shows the registration process of a new user. He comes to the site and hits register. He logs in with his Live ID and is redirected back to BlogSnor where he has to fill out a form. After submitting this his account awaits activation by one of the administrators. The second video shows the next step...
Introduction The WinPHP challenge is running towards it’s closing time. Only a few days before entering I came with the idea to enter the contest. I had to put a lot of my spare time into it, but it was worth it. I learned a lot from exploring the realm of php. It’s fun to work in a language I normally do not work in. And to find ways to implement some thoughts that have been on my mind for a while. Here’s the story about the what, the where and the how of BlogSnor, my entry for the WinPHP challenge....
Introduction In an earlier article I explained how to use .NET assemblies in php. This concept is the basis of the image generation as used in my entry for the WinPHP challenge. Because the user is in control of selection colors, all images used throughout the weblog need to be generated. Php provides a number of graphical functions, but none is capable of creating rounded corners an gradients with ease. Everything has to be done by hand. WPF on the other hand uses xaml which supports everything...
The blog engine I’m writing for the WinPHP Challenge is really getting shape. At certain points in the application I would like to send an email. Luckily SMTP is supported by IIS. Here’s a small how-to to get it up and running and send an email from your php app using IIS. Setting Up and Configuring IIS Start by going to the ServerManager on you Server. Most often this is the server you’ll be running your php website on. Go to Add features in the Features summary section. Check SMTP Services in the...
Introduction For my entry for the WinPHP challenge, my personal Blog Engine “BlogSnor”, I wanted to make use of Ajax to retrieve posts, comments, color data and more from the server. I’ve used Microsoft Ajax in ASP.NET before, so why not try that in PHP too. Here’s how… Installing For the simplicity of this tutorial I make the assumption you have php 5.2 or higher running in iis7 and that your localhost points to c:/wwwroot/inetpub. (If you have not, and you have questions about this, just send me...
Introduction For my entry in the WinPHP Challenge I need to use some .Net assemblies I wrote a while ago. It wasn’t clear to me how this can be done. Here’s an example on how to do this. In short: First we create an assembly in visual studio, than we sign it, add it to the Global Assembly Cache or GAC and access it using PHP from there. Details Inside visual studio, create a new project. For the purpose of explanation I named the project DotNetTest. Add the following method to the newly created Class1...
Yesterday I got the email welcoming me to the First Annual WinPHP Challenge. Microsoft, ibuildings and Leaseweb are sponsoring this contest to show Windows is now a first class citizen for development and deployment of PHP projects. The idea of this contest is very simple, just build an application running on Windows and IIS7. But, do this with PHP. The contests ends June 1st. Until then all contestants have to blog about their progress. On June 13th the winner will be announced at the DPC closing...
Introduction A lot of sites use Rss feeds to provide others with information. For security reason Silverlight doesn’t allow cross domain calls. With your own servers you can overcome this by specifying access via a crossdomain.xml file. In most cases you want to read a Rss feed that is not on your domain, and it is not possible to add or change the crossdomain.xml file. Because Silverlight can communicate with Asp.NET, and Asp.NET can access almost any Rss feed, that would be a great option. The...
The Bubble Chart is part of the Silverlight toolkit and is available for Silverlight 2 and Silverlight 3 at http://silverlight.codeplex... This chart uses the size of the “bubbles” to display more data. For this article I used the Silverlight 3 version of the toolkit and the newly released Expression Blend 3 and Silverlight 3. Creating the Chart Start by creating a new Silverlight 3 project in Expression Blend. Add a reference to the Silverlight toolkit by going to Project in the menu and click...
(Note: If you are looking for info on the new Silverlight 3 release(July 10th 2009) goto here) Just this morning I saw the download locations on twitter. If you haven’t found those, here’s how to get your first silverlight 3 app running in notime. First, got to the Microsoft® Silverlight™ 3 Tools Beta 1 for Visual Studio 2008 SP1 download location and click the download button. It’s a 31.1Mb download which includes everything you need to get going. Now, run the installer and click thru. After that’s...
A nice thing about Silverlight is the ability to redesign almost everything. Today I would like to show you how to make a Glass Orb style button in Expression Blend. The example below shows the result. You can start in any Silverlight 2 project, for the sake of simplicity I started an empty project. Just add a standard silverlight button on the panel. The glass button style we’re about to create looks best on a square button, thus give the button a width and height of the same value, like 64. To...
Everybody knows those lottery games where you have to scratch a card to reveal some symbols that tell you if you’ve won money. Here’s an easy way to achieve the same effect in WPF, using xaml only. Wpf has a control that let’s the user draw on it’s surface, the InkCanvas. By placing this exactly behind an image it's invisble to the user, but can be used. To make sure all mouse-clicks will come thru to the InkCanvas, the IsHitTestVisible property on the Image has to be set to false. Now, by adding...
Introduction: When I read about the Mix09 10k Challenge I immediately thought of doing something with 3d. I’ve started programming simple, rotating 3d applications years ago, in the MS-DOS era. In those days, basic 3d was used a lot in demos and intros. And, because Silverlight doesn’t support 3d natively (yet), I made it my own challenge to see if I use my experience with 3d to fit a 3d engine in 10k. Instead of using the original Rubik’s Cube colors, I chose to use the Mix09 colors. The colors...
It’s done! Finally! My entry for the Mix09 10k Challenge is submitted. Drag your mouse on the area surrounding the cube to rotate the entire cube. Click the cube itself to turn the sides of the cube. From the moment I got notice of this challenge I thought of doing something in 3D. I decided to build a Rubik’s Cube. I started out with the classes to make the 3D possible. To do this, I made a Vector3D class for position all vertices in the 3D world and a Matrix3D class for doing the rotations. Next...
There are a lot of situations in Silverlight and WPF where you would like to get a list of items from a collection of a certain type. For example all textboxes in a Grid, or all customer records from a ListView. LINQ provides us with an extension method to do this very easily, the OfType<T>() extension on IEnumerable: public static IEnumerable<TResult> OfType<TResult>( this IEnumerable source ) Let me explain the use of this method thru some examples. Say you have a grid with some...
Ofter there are situations where it’s needed to pass parameters to Silverlight. For example a webshop where you would like to display a product, or a Twitter application where you would like to show information about a certain user. The Silververlight control has an string property InitParameters. When passing any string to this property it can be read by the Silverlight application. Where the query parameters property in Asp is a string, in Silverlight this is changed into an IDictionary<string,...