Community Blogs

Browse by Tags

Related Posts

  • Silverlight BringIntoView() extension method (with OnGotFocus behavior)

    It all started because I couldn't find a way to automatically scroll any element into view in Silverlight (a feature that exists in WPF). I take that back, I could get the job done with a ListBox's ScrollIntoView(ListBoxItem item) method, but I hardly wanted everything on my screen to be wrapped as a ListBoxItem; it feels as dirty as it sounds. Anyways, here is the code. /* Extension Methods */ public static class FrameworkElementExtensions { private const int ScrollPadding = 10; public static void BringIntoView( this FrameworkElement frameworkElement) { var parent = VisualTreeHelper.GetParent(frameworkElement); while (parent != null ) { parent = VisualTreeHelper.GetParent(parent); var scrollViewer = parent as ScrollViewer; if (scrollViewer...


  • Uploaded Silverlight sample for VBScript.net compiler

    I have uploaded Silverlight sample that uses my VBScript.net compiler to http://www.codeplex.com/aspclassiccompiler . It is available under the source tag in change set 31328 or later. I am not quite using the capabilities in Microsoft.Scripting.Silverlight yet. I want to take advantages of it when its document becomes available. For the time being, I created my own little host called VBScriptHost in the SilverlightApplication1 project. I modified App.xaml.cs to create an instance of VBScriptHost and expose it. In MainPage.xaml.cs, I created a ScriptScope object. This is the object that I feed host variables to VBScript. I then parse this object to the Execute method of a CompiledCode object. In the example, I passed MainPage itself with the...


  • VM Workshop: Model View ViewModel (MVVM) and the Presentation Model Pattern in 5 UI Platforms

    For some reason the family of design patterns that exist around the Model View Controller pattern seem to be an elusive band of characters. The first time I encountered Model View Controller I studied the text hard trying to understand how the Strategy , Observer and Composite patterns worked together to accomplish some goal that – try as I might - remained fuzzy. Somehow I have a sense that I am not alone. Model View Controller (MVC) is the parent pattern to a number of contemporary patterns that seem to find a natural home in Microsoft development. Variations of MVC have appeared over the years in an attempt to work within the construct of modern event-driven programming models. One of most distinguishing differences among MVC and some of...


  • Programming Silverlight with MVVM pattern using Prism

    Here’s what I wanted to do: A Silverlight project User logs in A service runs and displays data upon successful login Quite simple right? In ‘pure’ Silverlight, one could probably do this in like 15 minutes, but I wanted to do this using Prism following the MVVM (Model-View-ViewModel) pattern. I added a couple more conditions: The main control of the Silverlight application is a TabControl with Login and Data as TabItems The first screen is the login screen When the login screen is displayed, the Data tabitem should not be displayed as it would not contain any data (information gets to the Data tabitem only after successful login) and vice versa I don’t have any intentions of writing this blog to develop the whole application; I’ll detail only...


  • Silverlight Tour Montreal in November

    The Silverlight Tour is coming back to Montreal next week. When: November 02-04 Where: Montreal, Qc Registration (Fr): http://www.runatserver.com/SilverlightTraining.aspx If you are looking for 3 days of intensive Silverlight training in French this is your chance to learn it from soup to nuts! Read More...


  • Free training on Visual Studio 2010 and C# 4.0

    Did you know that you can train yourself for what’s new in Visual Studio 2010 and C# 4.0 (also VB) ? The Microsoft Visual Studio 2010 and .NET Framework 4 Training Kit - October Preview is available for more than a week now and it includes lots of slide decks, demos and labs covering the following topics: Whats New In the .NET Framework 4 Whats New In Visual Studio 2010 Video: Downloading And Installing Visual Studio 2010 Beta 2 Demo: Hello Visual Studio 2010 Common Language Runtime Demo: System.Threading.Barrier Demo Demo: System.Threading.CountdownEvent Managed Languages What's New In C# 4 and Visual Basic 10 Video: Fixing PIA Pains with Type Equivalence Demo: Managed Languages 10-in-1 Lab: Introduction To F# Lab: Visual Studio 2010: Office...


  • Adhoc testing of .NET RIA Services

    Suddenly my Silverlight 3 application breaks during development process. Cause I have installed Visual Studio 2010 a few hours before, I was sure: must be something with 2010 . After uninstall and reinstall SP1 everything worked fine, except .NET RIA services :-( So back to structured trouble shoothing. What is the first point, the database- SQL Profiler shows no requests. Second point is Entity model. Till now I do not know any point to interactive test a model. Next point is the RIA Service. But how to call a RIA Service in Browser? I took fiddler to figure it out http://localhost:51240/ClientBin/DataService.axd/test3-Web-DomainService1/GetCustomers Server and Port: here ASP.NET Web Dev Server ClientBin directory dataservice.axd – you can...


  • …more Visual Studio shortcuts

    Bumped into some shortcut keys while playing with Silverlight. I was on the .xaml page and I pointed my mouse over the ‘<Rectangle’ tag while pressing the Control key (now why did I have the control key pressed? cos my 6th (non)sense said so). Hey wait a minute, what’s that blue underline? Turns out if you control click a tag or it’s property, it’ll take you to the definition of the tag or the property in the Object Browser. So ctrl+click on a rectangle opens the Object Browser showing the Rectangle objects definition and ctrl+click on ‘Height’ property shows the FrameworkElement.Height definition. To take it one more step, I added MouseLeftButtonUp event on the rectangle: MouseLeftButtonUp="myRectangle_MouseLeftButtonUp" Now, if...


  • Silverlight Tour coming to Switzerland!

    I am very proud to announce that the Silverlight Tour is going to Switzerland . This 3 day training focus on Silverlight and is already available in French in Québec and France, we hope to go to more French speaking countries soon. The first Switzerland class is scheduled for December 2-4 in Lausanne. More info     (Picture by Curious Expeditions ) Read More...


  • Silverlight + MVC = coolness

    Two blogs – one from Tim Heuer and the other from Joe Wardell inspired me to change my website to an MVC site. My site is basically a Silverlight application. One issue I always had was anytime there was an update to my site, say a new set of photos, users had to go to the site, click on the albums, and then find the album in the list. I wanted this to be more direct in the sense that if could send an SEO-friendly link something like: http://www.arunmahendrakar.com/albums/maui and it loads the photos of our Hawaii trip, now that’d be really cool. Or if I want to share my blog to someone, I can just say: http://www.arunmahendrakar.com/blog This is where the above articles came to help, although I used Joe’s article to implement this feature in...


Page 1 of 91 (904 items) 1 2 3 4 5 Next > ... Last »
Microsoft Communities