SilverlightTips

Showing posts with label SilverlightTips. Show all posts

Do you know that, we can now search text present in ComboBox and ListBox? This feature was not available in earlier version of Silverlight. To implement it, we had to write custom behavior. Now if you are using Silverlight 5, you can easily use this feature without writing any piece of code.

 

In this Tip we will discuss about it. We don't have to add any extra code, because it is now the default behavior of those control. Read to know more.

Published by on under Silverlight | Silverlight5

Continuing to our discussion on Silverlight 5 features. In earlier post, we discussed about Text Advancement in Silverlight 5. In this post, we will discuss on another new feature called Binding on Style Setter. This feature is very useful for the XAML designer. If you are a XAML designer, you must be aware of this cool new feature.

 

Read the complete post where we will discuss how we can bind to a Style Setter.

Published by on under CodeProject | Silverlight

There are many new feature announced to support Text advancements in Silverlight 5 Beta. Among them, one is the character spacing. This feature adds spacing between characters inside a TextBlock, RichTextBox and other control elements.

 

In this post we will demonstrate the use of this new feature and also showcase a simple demo to make you understand better. Read it and start learning Silverlight 5 features.

Published by on under CodeProject | Silverlight

In my latest two tips we have seen that we can customize the string using Run, Span tags as well as StringFormat in the XAML page. What about if I want to format it for proper DateTime, Currency or Numeric style? As I told you in my last post that, we can achieve the same using the StringFormat parameter in XAML too.

 

Here in this post, I will demonstrate you the process in depth. Read to know more about it and make your life more comfortable designing your Silverlight application.

Published by on under CodeProject | Silverlight

Yesterday in this post "Tips: Formatting Silverlight TextBlock Control", I shown you how to use various tags like Run, Span, Bold, Italic and Underline to format the text of TextBlock control, present in your XAML code. I also described the use of Run to bind multiple strings inside a TextBlock control.

 

Today in this small post, I will show you a different method to concatenate multiple text content inside a single control. This tip will help you next time while doing the same. Read to know more.

Published by on under CodeProject | Silverlight

In general we use multiple TextBlock controls inside a StackPanel to format a single line. In this post I will show you a different way to format a single line. This is very useful if you want to bind any data in the middle of the text string. Also this is useful if you want to format the line with multiple formatting option. Read to know more about it.

Published by on under CodeProject | Silverlight

Many of you don't aware of it in depth, mainly the freshers who just started doing their hands dirty with the light of Silver. In this post I am going to describe you about AppManifest.xaml file and it's uses in depth. Read the complete post to know more about it.

 

Don't forget to leave your feedback and/or any queries at the end of this post. Appreciate for reading this post.

Published by on under CodeProject | Silverlight
In this post, I am going to give a Tip of using Expression Blend to create a Gradient color from any color pattern. Sometime, you might have a color pattern that you have to use in your UI and don't know how to pick the exact color to your UI. This simple post will help you to understand it properly.

After reading this post, you will be able to pick any gradient color from a pattern and use as easily as 1-2-3. Hope, this will help you. Feedbacks are always appreciable.
Published by on under CodeProject | ExpressionBlend

In this post, I will share you some important Shortcut keys of Microsoft Expression Blend 4. If you are working with Expression Blend 4, this will definitely help you to improve your daily productivity work. Keep the list with you always to best use of the Shortcut keys in Blend 4 while designing your XAML page.

 

If you have more shortcuts, please share those to me and I will include them here as the key resource. Thanks for your support.

Published by on under CodeProject | ExpressionBlend

Sometime your Silverlight application becomes too larger and creates a bigger XAP file. This causes issue while loading your XAP file for the first time as it increases the loading time for downloading the XAp. So, what will you do in this case? There is one answer: split your application in multiple projects which will create multiple XAPs and then use On Demand downloading feature.

 

Absolutely right, but you may sometime include 3rd party assembly references. In such case, storing them in a separate XAP and writing the code for downloading them on demand will be another hectic. So, what's the easy process? In this article we will learn the same. Read to know more and provide your feedback in case you need more information.

Published by on under Silverlight | SilverlightTips

image

Earlier in December 2010, I posted three articles on DataGrid titled as "Grouping Records in Silverlight DataGrid using PagedCollectionView", "Filtering Records in Silverlight DataGrid using PagedCollectionView" and "Paginating Records in Silverlight DataGrid using PagedCollectionView". If you didn't read them, go thru each articles to know more about Silverlight DataGrid.

 

One of my reader "Dan" asked me to write an article on "Group Row Header customization of Silverlight DataGrid" and here is that article for you. If you want to do UI customization of Row Group Header, this article will definitely help you. Here, I will show you how to modify the XAML to add different content to create a multi level row group header too.

Published by on under DataGrid | ExpressionBlend

Sometime we need to reset the position of the Silverlight Child Window at the center of the screen. This generally require when you have a static instance of the ChildWindow and you want to use the same instance to show various messages in the screen. When you loads the ChildWindow for the first time, by default it loads at the screen center. But think when your user reposition that ChildWindow to a different location in the screen, closes and reopens it, what will happen?

 

What will you see is, the ChildWindow opens at the same location where the user closes it last time. So, how can we reset it to the center of the screen? This small tip will help you to achieve the functionality. Read it to know more details. Code is available for use.

Published by on under CodeProject | Silverlight

One of my reader “Girish” recently contacted me with a problem statement. His problem is, he wants to show a TextBox on selection of “Others” from a ComboBox and I informed him to use a ValueConverter and also told him, I will do a blog post on it, so that he can understand each step from that.

 

This post I am dedicating to him. May be, some other people who are new to Silverlight can get benefit from it. Read the full post to learn the process to do it.

Published by on under MVVM | Silverlight

image

I have seen people writing Code Behind a lot while they are working in the MVVM framework. A huge lines of code in their xaml.cs file actually creates problem to the designers to change anything present in the XAML. Why is this so? Because, lots of people don’t know how to use Triggers to call the MVVM methods to complete their business need.

 

Michael Washington has a nice article on DataTrigger to reduce the Code behind file. It definitely reduces the problem of MVVM that world faces generally. Also, we need to do some additional things to reduce the code behind.

 

In this article, I will show you how to fire Triggers to call some methods present in your ViewModel, instead of writing in the code behind file. Read more to learn about it.

Published by on under MVVM | Silverlight

In all of my earlier articles on Silverlight Out-of-Browser (OOB) applications, I demonstrated you creating the OOB application using Visual Studio. There are plenty of steps you have to follow there. Today I found another way to change the settings for it.

 

image

 

In this post, I am going to discuss about both the processes and at the end tell me which one is best & simple.

Published by on under ExpressionBlend | Silverlight

Are you looking for a Silverlight Child Window, which can’t move from it’s actual position? Then this article will help you to understand & create a non-movable child window in Silverlight.

 

Child Window is available inside the System.Windows.Controls.dll assembly. By default, it is movable. You can drag the Title Bar of the Window and position it anywhere in the screen. But, you may face some situation when you need to fix the position of the Window by restricting the user to drag it. So, how will you do this?

 

In this article, I will show you the simplest mechanism to make your child window not movable.

Published by on under Silverlight | SilverlightTips

In this small Tips & Tricks, I will guide you changing the Style of Caret of a Silverlight TextBox control. It is very simple and you can easily do it using Visual Studio or Expression Blend. Here is a screenshot of the same:

image

In general, styling the caret is not require. But in some cases, you may need to change it to give your UI the look & feel of your entire application.

Published by on under .Net | Silverlight

Recently, I wanted to detect the Silverlight version for one of my on going R&D. I wanted to detect the version from batch file and depending upon that I wanted to execute one file. Searching over internet I came to know that, HTML Application has some additional power for execution of any local file as it runs under fully trusted mode. I did more research on HTA files and successfully completed my basic analysis.

 

Here I will demonstrate you the process of detecting the Silverlight installation status using JavaScript from the .hta file. Read it and at the end, if you have any suggestion to improve the steps, please let me know.

Published by on under .Net | Silverlight
In various forums (mainly in Silverlight.Net Forum) I have seen people asking a question: “How to implement Session Management in Silverlight?” The simple answer is: “Session Management is not available in Silverlight”. Why? If it is not there, how can we implement it?

Ok, If you are new to Silverlight, you need to know about this. Hence, I will describe you in this post about Silverlight Session Management. The targeted audience for this post is mainly the beginners of Silverlight. Read it and if you have any queries, let me know.
Published by on under .Net | Silverlight