Thoughts about application packaging, Resources, MVVM and others

Sunday, October 24, 2010

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 (MVVM or not) the author should consider to split...

Silverlight 4 @WDC

Thursday, June 10, 2010

Thanks for all participants at WDC monthly meeting! I really enjoyed to present Silverlight 4 before such nice audience! I really enjoyed the Q&A session ah the end of the meeting. If you have more questions – keep them coming! As promised, I’m posting the links for demos and presentation for your convince. Presentation slides are here. You could see them online (guess what – pure Silverlight presentation) at my home page: http://www.devcorner.info/   Demo #1 – Webcam, Printing, Install OOB here. Demo #2 – Elevated OOB here ...

Silverlight 4 Available

Friday, April 16, 2010

Silverlight 4 finally here!!! It works with Visual Studio 2010 RTM! All downloads you need to start developing great line of business applications: Silverlight 4 Tools for Visual Studio 2010 Blend 4 RC here Silverlight 4 Toolkit (April 2010)   For those who are in Windows Phone 7 development: Do not install this build! If you need to develop for Windows Phone 7 stay with Silverlight 4 RC build and Visual Studio 2010 RC. The update for Windows Phone 7 tools is not ready yet and will be available in a few...

Silverlight at Windows Phone 7

Monday, March 15, 2010

Microsoft announced today, that new Windows Phone 7 Series will support Silverlight as one of 2 development frameworks. Second development framework will be XNA (will blog about it later). So, what’s new for Silverlight developers there? First, we have familiar tools: Windows Phone applications with Silverlight will be developed either with Visual Studio 2010, either with new “express” version called Visual Studio 2010 Express for Windows Phone. This “express” version will enable development with both frameworks (Silverlight and XNA). Full Visual Studio 2010 will also get new project types to develop with both frameworks. ...

Silverlight Tip: Enumerating embedded resources

Friday, November 13, 2009

Today I’ve got a “Call for Help” from one of Silverlight MVPs – Bill Reiss. The mail said: “I would like to enumerate all items that were marked as Content or Resource in the main XAP file. If I can’t do both I’d settle for one. Any sample code for this would be greatly appreciated. Bill”   I decided to help with embedded resources, because I did something like this in WPF. I’ve created sample application, which will display a list of resources in list box – from here it...

Silverlight Quick Tip: How to get localized resources from RESX file in code behind

Wednesday, October 21, 2009

It looks like I’m using too much resources and localizing too much applications lately :) This time I’ll show how to use localized resources from the RESX files. Here I already explained how to create the RESX files for Silverlight (by the way the article is relevant also for Visual Studio 2010 Beta 2 & Silverlight 3), and how to use those resources from XAML. In some cases, though, it is needed to use those resources from code behind. In my scenario I had to create value converter, which converts some Boolean value to string representation and for...

Silverlight Quick Tip: ChildWindow Title Customization

Thursday, September 24, 2009

Today I discovered nice feature of ChildWindow control in Silverlight 3. I was at client’s location and been asked about the ChildWindow title customization with an icon. I had to admit, that I never tried to put something different than text and immediately looked at the type of Title property. For my surprise I found that the property is an “object”, and assumed that it could behave as a ContentPresenter/ContentControl. After 5 minutes I had the client’s request solved: My code is very simple: <controls:ChildWindow x:Class="DevCorner.Samples.ChildWindow.SampleChildWindow" ...

WPF Quick Tip: How to get WPF Window client area size

Sunday, September 20, 2009

This time my quick tip will be not about the Silverlight, but about WPF. When you have WPF window, the runtime size of it could be discovered by ActualWidth/ActualHeight properties. In most cases this is enough. But what about the case, when you need to perform some mathematical calculations based on the real size of client area? What is this client area? Well, the second question is really easy one – the client area is the area available to user defined UI (controls, panes, etc.): At the screenshot - client area is...

Silverlight Quick Tip: Dynamically Updating Class Fields/Properties

Thursday, August 27, 2009

In previous post (here) I blogged about displaying values of class/control in runtime and displaying them in Visual Studio - like property window. Today I’ll show how to push them back to the class instance. In previous post I’ve stored values in “ObservableCollection<FieldsPropertiesData>” for easy databinding and connected this ListBox control. In order to get user input I’ve created TwoWay databinding in DataTemplate – here is updated data template: <Style TargetType="local:FiledPropertyData"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="local:FiledPropertyData"> <Grid ToolTipService.Placement="Mouse" Width="{TemplateBinding Width}"> ...

Silverlight Quick Tip: Dynamically Displaying Class Fields/Properties

Thursday, August 13, 2009

In one of my projects I had to create something like Visual Studio property window, for data set of different controls/data classes. Those controls/classes are still under development and I needed the way to display/change values of those properties dynamically without even knowing what is inside. For the simple case, let’s assume the following class which holds the data: public class SampleData { public SampleData() { BooleanProperty = false; } public string StringProperty { get; set; } public bool BooleanProperty { get; set; } public Button ButtonProperty { get;...