DCSIMG
Csharp,Visual Studio - Alex Golesh's Blog About Silverlight Development

Browse by Tags

All Tags » Csharp » Visual Studio (RSS)

Teaser: Multi-Screen

Something big is coming… Imagine PC, imagine phone, imagine game console… Image all of them playing same game… Imagine player with phone playing versus player on console or player on PC… Imagine player starting the game in public transport at the way home and resuming it after arriving home on the console… Imagine that everything is possible…   Just imagine… and enjoy the photo meanwhile :) Stay tuned for more to come!   Enjoy, Alex

Silverlight 3 Quick Tip #6: Navigation Framework and Uri Routing

Silverlight 3 introduced the Navigation Framework and URI Routing features. Today I’ll show how to use those features. To use navigation features you could either create a new “Silverlight Navigation Application” or simply add relevant references to standard “Silverlight application” In case of standard “Silverlight Application” you need to add reference to “System.Windows.Controls.Navigation” assembly and relevant XAML introduce namespace: xmlns : navigation ="clr-namespace:System.Windows.Controls;assembly...

Quick Silverlight Tip: Silverlight Events in JavaScript and JavaScript Events in Silverlight

Lately I've been asked couple of times about catching managed events in JavaScript and catching JavaScript events in Silverlight managed code. In fact it is very easy, but seems not so obvious... Here it goes. To catch JavaScript event in Silverlight managed code, all your application need to do is to "attach" to event from some HtmlElement you have on hosting page and define some managed EventHandler to handle the event. Sample page as it was auto generated by Visual Studio 2008, MyApplicaitionTestPage...

Silverlight & Streaming Media

Lately I'm getting a lot of questions what could be done with Silverlight in in terms of work with streaming media. Today I'll show what could be done. I've built very simple media player based on MediaElement object and prepared some stream to use in my application. The major focus of this post it to briefly show what could be done with stream in Silverlight and not how specifically do it. I'll be glad to answer any specific questions there will be any. First about the stream. I've...

Silverlight application performance - refresh rate & CPU usage

You just wrote great Silverlight application? How about CPU usage? Do you have pretty static application UI and it still consumes 25-30% of your CPU? Probably you have to control how fast Silverlight should redraw the UI. To do it, you need to specify MaxFrameRate property in object initialization, like follows: 1: < asp:Silverlight ID ="Xaml1" runat ="server" 2: Source ="~/ClientBin/ShowFPS.xap" 3: MinimumVersion ="2.0.30523" 4: Width ="100%"...

Silverlight Tip: How to reflect ScriptObject content in runtime

Today I want to show how Silverlight application could "understand" which objects form HTML DOM from hosting page it deals with. The minute before I start, let me show why many of Silverlight developers need it. Lets assume we have some simple HTML/ASPX page, with some JavaScript functionality and JavaScript objects, like follows: 1: < html xmlns ="http://www.w3.org/1999/xhtml" style ="height:100%;" > 2: < head runat ="server" > 3: < title >...

Quick Silverlight Tip: Communicating between two Silverlight objects on a single page

Today I'll show how two Silverlight objects (Silverlight applications) could communicate while been hosted on one page. Earlier today I've seen some blog post by Joel Neubeck about Silverlight objects communication. The way Joel does it is pretty traditional, by providing some JavaScript functionality on host page to communicate with each Silverlight application. I'll show slightly different approach: each Silverlight application will communicate directly with another (giving the fact...

My Presentation at IDF Developers Forum

I will present at next IDF developers forum, which will take a place in Tel-Aviv, 27/07/2008. If you are an IDF developer, interested in Silverlight and/or want to get some practical tips & tricks about .NET reflection you more than welcome. See you there, Alex

Path.Data Dependency Property Initialization from String - Take 2

Day or to ago, I've blogged how to initialize Path.Data property in Silvelright 2 Beta 2 from string. In this post I've mention, that probably the best and the right way to do it is develop functionality similar to WPF's PathFigureCollectionConverter object. Now it exists: the porting of PathFigureCollectionConverter functionality for Silverlight 2 Beta 2 in my CodePlex project . Here is usage sample (just add reference to your project): XAML < Path x:Name ="path" Canvas...

Path.Data Dependency Property Initialization From String

In Silverlight 2 Beta 1 I used to build dynamic UI with drawing portions. For example, I used to draw Path dynamically like in following example: Path myPath = new Path(); myPath.SetValue(Path.DataProperty, "M 50,50 L 50,100 L 100,100 L 100,50 L 50,50 Z" ); myPath.SetValue(Path.NameProperty, "myPath" ); myPath.Width = 100; myPath.Height = 100; myPath.Fill = new SolidColorBrush(Colors.Black); LayoutRoot.Children.Add(myPath); This gave me nice rectangle... Everything was fine, until...

Quick Tip: Isolated Storage in Silverlight 2 Beta 2

One of changes in new Silverlight 2 Beta 2 , is new "Silverlight Configuration" screen. Now we can take control over DRM and Application Storage. Application storage screen controls isolated storage data and quotas for application being used it: But what could be stored in this storage? What if default quota (1Mb) is not enough? Could it been changed? The isolated storage could store files and application settings. Working with isolated storage is pretty much like with file system: First...

Silverlight 2 Beta 2 available

As was announced earlier this week at TechEd 2008 in Orlando, new Beta 2 for Silverligth 2 has arrived! Here download links: Runtime only Silverlight 2 Beta 2 Tools for Visual Studio 2008 (includes Silverlight SDK, Developers runtime, project templates in single chained installation) Belnd 2.5 June preview Deep Zoom Composer Beta 2 Many samples and tutorial videos here   Enjoy, Alex

Visual Studio 2008 SP1 Beta & .NET 3.5 SP1 Beta are available

The SP1 Beta for Visual Studio 2008 and .NET 3.5 has arrived. The beta of service pack holds a few improvements . There is also WPF speed improvements with this upcoming service pack. Tim Sneath has very detail information at his blog about this release here . Download links: VS 2008 SP1: http://download.microsoft.com/download/7/3/8/7382EA08-4DD6-4134-9B92-8585A5B07973/VS90sp1-KB945140-ENU.exe .NET 3.5 SP1: http://download.microsoft.com/download/8/f/c/8fc1fe13-55de-4bf5-b43e-375daf01452e/dotNetFx35setup...

ColorConverter in Silverlight 2

Do you miss ColorConverter class in Silverlight? I do... Really... I today bind Background property to some color value received from JavaScript. JavaScript provides a value in string format, something like "#FFDEDEDE". The way to bind to background property is to prepare SolidColorBrush, and the way to SolidColrBrush lies via Color. And how one can make Color object from string? In full .NET framework there is a handy class, called ColorConverter which provides such functionality... In...

Tech-Ed 2008 is over

Tech-Ed 2008 Israel is over, and I'd like to thanks Microsoft for making it happen. I'd also like to thanks all, who was on my and Tamir 's "show". I hope that all attendees enjoy watching it like we enjoyed making it! Don't forget the survey ;) Also, great thanks to Tamir ! Stay tuned on videos of how we put all this session together - hope it will here in day or two.   UPDATE #1: My video already posted here UPDATE #2: Tamir's video already posted here  ...
More Posts Next page »