How soon we forget. A few years ago, I weaned myself off of Visual C++ and MFC and toyed (briefly) with ASP.NET
Now, I'm finally getting to grips with C#, .NET and CLR 4.0 and Silverlight.
And, all of a sudden, I'm thrust back to 1996. Why? Because we need to write a GINA (Graphical Identification aNd Authentication) component as part of a password reset application.
So, here we are, with definitely no CLR (which rules out C# and CLR) and recommended against the MFC. So, we're literally back in the days of defining dialog boxes as a set of resource definitions, and copious calls to CreateWindow. And that's before we get to the single threaded message pump that is WndProc.
Couple all of that [...]
Excellent Silverlight 4 training session [...]
Edit; 26th May 2010; This is my most favorite post! Check out related Silverlight posts here…
Just getting started in Silverlight 4 WCF RIA Services (which is astonishing, by the way – check out Brad Abram's walkthrough here) but I was getting stuck at the validation part.
When I exercise the validation (you know, red bits in the browser because you're failing metadata requirements) and SubmitChanges, it was throwing up a horrible error;
An unhandled exception ('Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRunTimError
Message: System.ServiceModel.DomainServices.Client.DomainException: And error occurred while submitting changes…
The only funny bit about this was the typo; "And error occurred"… The dialog is shown here;
OK – I got an exception, let's debug… So, I click [...]
John Papa and Adam Kinney have posted a "Silverlight 4 Technical Features Overview" on channel9 (15th April 2010). Goes into good detail about all of the new SL 4 features and gives lots of sample code.
I'm hoping to use this to finally figure out databound combo boxes…
Rush over and read / print the entire 75 pages at Channel9
Covers; Business Application Development, Silverlight Toolkit, MS SL 4 Tools for VS2010, WCF RIA Services, Richer UI design, Expression Blend, O-O-B (Sandboxed and Trusted apps), and [...]
I'm passing a POCO to a Child Window, and the very first thing it needs to do is display a couple of properties from that object. So, I rattled off the basic code;
private MachineCredentials machineCreds { get; set; }
private BackupProviderType backupProvider { get; set; }
public RemoteBrowser(MachineCredentials machineCreds, BackupProviderType backupProvider)
{
this.machineCreds = machineCreds;
this.backupProvider = [...]
The problem
Build a navigation tree that allows users to navigate to specific static pages, from static entries in the menus, and to pages that are built dynamically based on selections from the menu.
The Solution in a picture
The solution in code
Build the static menu selections in xaml, being sure to name each of the major headings with “Tag” entries;
<Grid x:Name="LayoutRoot">
<controls:TreeView x:Name="treeview"
BorderThickness="0"
Margin="0"
[...]
Obvious, really, but I spent ages chasing down how to bind some kind of POCO to a XAML display;
<Grid x:Name="LayoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="300" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
[...]
How do you handle the situation where your new Silverlight page needs to shout a warning or error, and then die? No idea, but this is how I do it…
Originally, I was quite scared of my Silverlight pages throwing an exception and then I realised that this was just another object and if we throw an exception, hopefully let the user know, and bail out, then that’s fine.
So the pattern I am now working with is this;
Constructor – set up the load operations
Page_Loaded events – bind the XAML objects to the retrieved data
On any error; display a meaningful message, in a semi-modal window
Navigate back to a safe place (e.g. /home)
What do I mean by “semi-modal”? Well, from the user’s perspective, it [...]
I’ve been toying with Silverlight over the last couple of weeks and, I have to say, it’s much more complete than ASP.Net ever was (**). Lots of new paradigms to get my head around, of course, but overall it’s a very complete solution for an RIA.
Anyway, to the point of this posting; the new (in Silverlight 3.0) Navigation Framework is great; it allows you to present a common interface and have new pages display in a know part of the browser window, supports browser back/forward, and URL rewrites. See here for more information.
If you are inside a page that is controlled by the framework, then you are able to call on the NavigationService.Navigate method to divert control to a new XAML [...]
|
|