DCSIMG
C#,Silverlight 2 - Alex Golesh's Blog About Silverlight Development

Browse by Tags

All Tags » C# » Silverlight 2 (RSS)

Thoughts about application packaging, Resources, MVVM and others

I thought a lot before decided to write this post… First - I’d like to thanks Ariel Ben Horesh for “inspiring” me to write this post and for dedicating so much time to write his post! After reading his post I thought a lot and my thoughts about the post are the follows: 1. First, I thought about the applications and the way to provide user with best experience while loading those applications… The users shouldn’t wait minutes for application to download… While authoring large Silverlight applications...

Silverlight Quick Tip: How to Perform a Hit Test

In some cases, especially when developing rich UI application developer need to identify which control were clicked or under mouse pointer at some point of time or just under some coordinate at the UI. For those purposes Silverlight provides “FindElementsInHostCoordinates” function in VisualTreeHelper class. The function gets the Point (coordinate on the screen) or Rect (rectangular area) and UIElement which will be checked recursively to have any visual child's in desired coordinate/area. The...

Silverlight Quick Tip: How to force re-binding

Today I’ll show how to do “dirty trick” to force re-binding and as a result UI value updating. First of all – the reasonable question – “Why force rebinding? Why not use INotifyPropertyChanged mechanism?” This was my questions also, but the person who asked the question had his reasons: he is using resources (Resx) to localize the application and bind the UI to those resources. Also UI gives user an ability to change the language (and code behind does it by changing CurrentThread.CurrentUICulture...

Quick Tip: LINQ & Data Binding notifications

In Silverlight & WPF we could databind to the LINQ query results: private ObservableCollection < string > someData = new ObservableCollection < string >(); //Somewhere in code someData.Add( "Alex" ); someData.Add( "Alen" ); someData.Add( "Josh" ); someData.Add( "Brad" ); var res = from data in someData            where data.StartsWith( "A" )           ...

Silverlight & Visual Studio 2010 Beta

As you probably know, Visual Studio 2010 Beta 1 was released to MSDN subscribers and soon will be released to general public here . What is new in this release for Silverlight developers? First of all – Silverlight is a first class citizen in this release, like WPF for example. More good news - now we will be able to create/manage both version of Silverlight projects (2 and 3)! When you choosing to create a new Silverlight projects, you will be prompted with dialog which allows to select the version...

Silverlight Quick Tip: How to change Tab Items order

I’ve got a question from my colleague about how he could change the order of Tab Items according to some business logic. When adding the TabItem to the Tab control dynamically (from code behind for example) the TabItems will be added in the order they added. Here is the simple solution of hot change the order of already added tabs. In my case I have simple XAML with Tab Control: < controls : TabControl Width ="400" Height ="200" x : Name ="tabs" Margin ="5">...

Silverlight Quick Tip: How to resize window from Silverlight

One of my colleagues asked me if it is possible to resize the Browser Window from within Silverlight application. Well, my answer was: “everything what is possible to do from JavaScript is possible to do from Silverlight”. Here is sample code how to do it in case someone else is also looking for the solution: if ( HtmlPage .BrowserInformation.UserAgent.ToLower().IndexOf( "chrome" ) < 0) { HtmlPage .Window.Invoke( "moveTo" , new object [] { 100, 100 }); HtmlPage .Window.Invoke...

Silverlight 2 Metro Training Event in Mumbai

I’m doing a Silverlight 2 Training for MS Metro program in Mumbai. Thanks for all participants in this event. Hope you enjoyed the course as much as I enjoyed doing it. As promised the selected samples from this event could be found here . Samples updated…   Thanks and Enjoy the samples Alex

Silverlight 2 Developer Day – a minute after

Thank you all, who participated today at Silverlight 2 Developer Day (Microsoft Israel offices). I uploaded printouts of the slides, presented during the session and the demo code so you can download it for a reference. I’m really interesting within your feedback ( leave comments ) in order for me to be able to enhance it for future events.   PowerPoint printouts here:   Demo project sources here .     Thanks and hope to see you again next time! Alex

Silverlight in the Mesh and the “Cloud” – Silverlight Mesh Enabled Web Application and Azure Services (Part 4)

Hello, In previous parts ( Part 1 , Part 2 , Part 3 ) we have seen how to create Azure Hosted Service, How to Access Azure Data Services Blob data, how to create SMEWA-like application which uses those services. While creating Silverlight application I’ve faced some problems – I couldn’t use Live Framework along with WebServices which returns non primitive types. Then I solved it by creating and hosting standard (non SMEWA) Silverlight application in the Mesh. This time I want to build “Cloud Store...

Silverlight in the Mesh and the “Cloud” – Silverlight Mesh Enabled Web Application (Part 3)

Today I’ll talk about SMEWA (Silverlight Mesh Enabled Web Application) creation. To create one (as for today) you need to be a member of Live Framework CTP. Invite to this CTP could be received through Microsoft Connect site. After receiving the invitation key and redeeming it you will be able to download Live Framework SDK and Tools for Visual Studio and at Azure Services Developer Portal create new project – Live Framework CTP After installing the Live Framework Tools for Visual Studio you will...

Silverlight in the Mesh and the “Cloud” – Hosted Service and Blob Storage (Part 2)

Hello. As I promised here I’m starting to describe my experiences in creating Silverlight Mesh Enabled Web Application (MEWA or SMEWA) with Cloud Hosted Services and Cloud Storage. Today I’ll talk about creating the storage and supported hosted services. First of all I needed to be a part of Windows Azure CTP and have at least 1 Storage account (to have persistent and non-persistent storage in Windows Azure) and at least 1 Hosted Services account (environment that provides the hosting and management...

Silverlight in the Mesh and the “Cloud” – Introduction/Teaser (Part 1)

Hello, For quite some time I’m investigating the Azure Services and Live Framework. After gaining some experience, I decided to build simple project - Content Store – to share with you how to build the next generation of applications. My “Cloud Store” project will use Windows Azure Storage Account to persist content at the cloud, will use Windows Azure Hosted Services as business logic provider (submit contents to the store, display the contents and “purchase” it). Also, my project will use Live...

Silverlight Tip: Dynamic animations

Hello, I was asked about creation of animations dynamically for various elements. Today I’ll show how to create such animations for any (almost) Silverlight element. I’ll create some of popular standard PowerPoint animations. I know that it is not the full set of animations available in PowerPoint, also the animations itself are probably not perfect but it is a good starting point to those who want to know how to do it. Generally, to create the animation on-the-fly we need to create a storyboard...

Silverlight Game of Life

Microsoft just started “<10k” coding challenge with grand prize of pass to the MIX09 event, 3 nights at The Venetian Hotel and a $1500 Visa gift card ! The rules are simple – develop cool WPF or Silverlight application with total sources under 10 kilobytes of code :) The submissions gallery here I’ve just submitted my entry: Silverlight The Game Of Life   Click to add more cells to the board and see how they will survive If you like it please vote for me!   Thanks and Enjoy, Alex
More Posts Next page »