in

ExpressionBlog.com

Microsoft Expression Studio Community

This Blog

Syndication

Mirrored Blogs

Browse by Tags

All Tags » Tools (RSS)
  • Camtasia Crash Tip

    [Updated 7/3] If you are using Camtasia (wonderful product) to create your screen captures and you do a lot of editing (especially zooms and call outs and cuts) you run the risk of overloading the project and causing Camtasia to slow and/or crash. Camtasia Studio 5: The Definitive Guide (Wordware Applications Library) ASIN : B000HCW6YE To avoid this, periodically grab a segment of your project and turn it into an AVI, cut that segment out and replace with the avi; then all the changes collapse into one as far as the project is concerned. Update follows… Pitfall #1 : if your project is complex enough, you'll find that when you mark a selection and tell it to produce an AVI it does not capture the entire selection! And, worse, it doesn't tell you. So be sure to check that you (a) back up the project before making the avi and (b) check the avi. If this does happen the work around is to mark the selection, then choose "Crop to selection" (very scary!) which deletes the rest of your timeline. Then produce your avi. Then restore (ctrl-Z to undo) the cropping. Now you can delete the selection and replace with your avi. Sounds more complicated than it is, but make sure you are backing up and giving good names to your template files. I now have a directory structure that looks like this for each project Pitfall #2: while you can edit the avi's you produce, each generation (each time you produce a video) creates some degradation in quality. Specifically if you make an AVI out of a camrec, and then edit that avi and make a 2nd generation avi which you then edit, and then make an avi out of the edited avi, pretty soon the sound quality is noticeably degraded. -j
  • Want To Follow Silverlight MicroBlog?

    SilverlightShow is featuring a brilliant Twitter tool written by Emil Stoychev that you can download here – you can grab the HTML or you can download the source. If you just get the HTML and plop it into your blog you are free to tell it whom you want to follow (e.g., SLMicroblog. Here’s the HTML: <div style= "width: 250px; height: 310px;" > < object data= "data:application/x-silverlight," type= "application/x-silverlight-2-b2" width= "100%" height= "100%" > <param name= "source" value = "http://www.silverlightshow.net/twitter/ClientBin/Silvester.xap" /> <param name= "onerror" value = "onSilverlightError" /> <param name= "background" value = "white" /> <param name= "initParams" value = "twitterUser= SLMicroBlog " /> <a href= http://go.microsoft.com/fwlink/?LinkID=115261 style= "text-decoration: none;" > <img src= http://go.microsoft.com/fwlink/?LinkId=108181 alt= "Get Microsoft Silverlight" style= "border-style: none" /> </a> </ object > </div> Suddenly, all the SLMicroblog you can eat… No muss, no fuss. Works great.  Reposted due to technical problems with the server
  • One Man’s Guide To Silverlight Nirvana

    Every day (honest) I am asked for a path through the learning material, even though the Getting Started page offers an explicit path. And that is not surprising. We all have our own way of learning. Here is the path that I personally tend to suggest to most Silverlight neophytes. Path of quick learning: Go to Getting started and get all the links shown here Then watch the video on the same page on getting started. Once Set UP, Writing Programs Read this tutorial on interface controls. Watch [forthcoming] this video on why I made the switch to coding with Silverlight and Blend and how powerfully they work together, and then watch watch these “How Do I” videos on Blend for Programmers: Part 1 Part2 Part3 and/or read this tutorial Data Next, it’s time to focus on this video on data and then this tutorial on creating n-tier applications and data binding. Follow that with a great video on Cross Domain issues and then read up on user controls which you can supplement with this video on keyboard input followed by this video on user controls. Styles and Templates You may then want to read my tutorial and watch my videos on Styles and Templates (to be posted in the next week or two) or check out Karen Corby’s excellent 4 part series on the subject. Freestyle After all that you can pretty much move freely among the other tutorials and videos . Best of luck
  • Creating a Project from xaml and xaml.cs files

    I posted the code for the PageSwitcher app described in a previous blog post , but to save space and to make the download faster, I didn't include anything but the code (no solution or project files). A reader wrote asking how to create a project and it is a more than fair question as the answer is not obvious until you've done it a couple times, so let's walk through that example. When you download the code, you'll receive a zip file named  PageSwitcher .zip. Unzip that and you'll have a folder named PageSwitcher,   Open a new Visual Studio project and to make this example as clear as possible, let's name it something else (myPageSwitcher) and locate it in a different directory. Open Page.xaml in your new project and note the name of the project (MyPageSwitcher) <UserControl x:Class= "MyPageSwitcher.Page" Open Page.xaml.cs and note the namespace namespace MyPageSwitcher This is the information you need to hold on to for the rest of this exercise. Ready To Go There are many ways to do this, but the easiest is to delete Page.xaml, Page.xaml.cs and App.xaml and App.xaml.cs from your new project. (Don't panic!) Next, right-click on the project and choose Add->Existing items and navigate to the downloaded files and add them all. They are now in your new project. Click on all 4 xaml files and change the name of the project in the x:Class tag. Click on all 4 .cs files and change the name of the namespace (ignore the smart tag) If you want to get rid of the smart tag, use Build->Clean. Build->Rebuild Solution. You're all set Here is your new PageSwitcher.xaml <UserControl x:Class= "MyPageSwitcher.PageSwitcher" xmlns= "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x= "http://schemas.microsoft.com/winfx/2006/xaml" Width= "400" Height= "300" > </UserControl>   And here is your new PageSwitcher.xaml.cs using System.Windows.Controls; namespace MyPageSwitcher { public partial class PageSwitcher : UserControl { public PageSwitcher() { InitializeComponent(); if ( this .Content == null ) { this .Content = new Page(); } } public void Navigate(UserControl nextPage) { this .Content = nextPage; } } }   Don't forget, once your code compiles, you can right click on the using statements and choose Organize Usings -> Remove Unused Using  which greatly cleans up your code.
  • Xaml vs XAML

    I received an email from Ian Griffiths who informed me that the "Xaml spec refers to Xaml as Xaml , and not XAML ." because Rob Relyea didn't like the "shouty caps" look of all upper case. After some back and forth, I contacted Rob, who wrote back that Ian is right (no surprise there) but that Rob is "...starting to use XAML" as that ship has sailed. I don't know, Rob is pretty amazing, (the image below is a link to his blog), and I'm inclined to agree with him that Xaml is a lot classier looking than XAML. I suggested that I would put the following note in Programming Silverlight A quick note on the capitalization of Xaml. Ian Griffiths (who truly knows everything) sent an email that Rob Relyea submitted the official specification with the capitalization as Xaml rather than XAML . While even Rob agrees that all upper case is the popular usage, his blog, Xamlified ( http://tinyurl.com/6h6rr5 ) is an oasis of camel case, and high quality information. This book will use both capitalizations for the sake of inconsistency. Maybe we can start a movement. I'm going to try. If nothing else, this discussion has led me to find YAAM (Yet Another Amazing Microsoftie) which makes it worthwhile. Keep an eye on his blog ; there are gems there. For those of you about to write that this is a trivial and meaningless distinction not worth the time to blog about... I pretty much agree.
  • Converting it to VB

    Just to tie the previous two blog posts together, I copied the C# into Instant VB and here is what it spit out (line break added to fit) Private Sub AnyPropertyCheckBox_Click( ByVal sender As Object , ByVal e As RoutedEventArgs) Dim isVisible As Nullable(Of Boolean ) = Not AnyPropertyCheckBox.IsChecked For Each uie As UIElement In LayoutRoot.Children Dim cb As CheckBox = TryCast (uie, CheckBox) If cb IsNot Nothing Then If cb.Tag IsNot Nothing AndAlso cb.Tag.ToString().ToUpper() = "SEARCHCRITERIA" Then cb.Visibility = If (isVisible.GetValueOrDefault() = True , _ Visibility.Visible, Visibility.Collapsed) End If ' end if tag match End If ' end if check box Next uie ' end for each element End Sub ' end method
  • My new favorite utility for .NET

    Before I say a word, let me tell you that Dave from Tangible Software has been sending me free copies of InstantVB and Instant C# for years and they posted a testimonial from me on their site. That is my only involvement with them, but there you have it. Now, don't let Dave know, but while I've been meaning to use this software for a long time, I hadn't recently, because every project that I thought would be bi-lingual wasn't. Until recently, when I switched over to writing my tutorials and videos in VB, and I wanted to be able to grab something I'd written in C# and get its equivalent in VB. Yow! this program is easy, accurate and blazingly fast (25K lines/minute) I really want to ship a copy with every book I write so that folks can stop worrying about which language the book is written in. This is not freeware (its note even all that inexpensive) but it is amazing (they state that on our 101 C# samples they convert 99.98% without adjustment!) and it is making my life a whole lot easier. I'll be interested to hear from VB programmers in coming weeks if they read any of my code and have the experience of "yes, that is technically correct code, but no VB programmer would ever write it like that." Net Net: look forward to more of my work in both C# and VB. -j
  • Expression Blend for Programmers

    I have set out on an integrated set of videos, tutorials and blog posts on the subject of using Expression Blend from the point of view of Silverlight 2 Programmers.  To get things going, I created a 3 part video series based on ScottGu's extended blog tutorial and I have a tutorial on the topic due to publish early next week. I am now in the process of creating more videos in which I will be exploring how Blend can make certain tasks far easier for the Silverlight programmer; keep an eye out for my video on Blend and Data binding. I will express a certain resistance to starting this, and I've been trying to figure out why. Part of it is that I'm very comfortable in Visual Studio and much of it is that nearly all the books on Blend are targeted at Designers rather than at Programmers. It is my goal to overcome those concerns for developers who share these concerns, and to integrate Blend into my toolset; using Blend for its strengths, and Visual Studio where it is stronger, and, eventually, to think of them as two faces of a single semi-integrated tool. I'm not sure what will happen when Visual Studio's design surface is fully read/write. I think by then I'll be so comfortable using Blend's features that I'll continue to do so for some tasks. I'd be interested in your experiences as well.
  • The Silverlight Tutorials & Book & More

    In what may be a first (at least for me) I've secured agreement with the very generous folks I work for here and at O'Reilly  to loosely join the tutorials and the chapters of our forthcoming book Programming Silverlight (co-authored by Tim Heuer, O'Reilly 2008) to create an enhanced  approach to learning tool. Let me be clear: the goal is to provide more for less ; it is not the goal to push you to buy the book; and you have my word that the tutorials will not be limited, constrained or curtailed in service to making the book somehow more worthwhile. My hope is that the book will have additional value, but the tutorials, like the videos will stand on their own. If we do it right, together they will supplement one another. Here's how it will work. Phase 1 - Tutorials and Draft Chapters During Phase 1 I will continue to publish tutorials on Silverlight.NET as well as the first drafts of chapters from Programming Silverlight for those who are curious or who would like to provide feedback (more on providing feedback to come). Note that these chapters will not have gone through technical edit nor copyedit, and will be quite rough; the final chapters will be updated for Silverlight RTW (Release To Web, as opposed to Beta), numerous rounds of technical edit, development edit and copyedit. Phase 2 - Publication and Beyond In Phase 2,  the 1st Edition of the book will be published, ideally providing cohesion, depth and detail that is simply not possible in the tutorials.  It is my plan that the tutorials will continue, supplementing the material already on line, drawing on and extending the book as Silverlight evolves, and serving as both a supplement to the existing edition and a preview of future editions. Schedule It is important to understand that the writing schedule for this book does not in any way reflect my knowledge of the timing on the release of Silverlight Beta 2 nor subsequent releases of Silverlight. Further, the current schedule is subject to change and will change. It always does. The Table of Contents will change as well.  I'll post both within a week or so.
  • Creating Controls in Code

    In my new video I demonstrate how you can create controls dynamically at run time. The technique is very straight forward, everything you can create declaratively in XAML you can also create dynamically in C#. xaml <Button x:Name="Button1" Width="50" Height="30" Content="Click Me" Grid.Row="3" Grid.Column="0" /> C# Button button2 = new Button(); button2.Width = 75; button2.Height = 30; button2.Content = "No, click me!"; button2.SetValue(Grid.RowProperty, 0); button2.SetValue(Grid.ColumnProperty, 1); LayoutRoot.Children.Add(button2);   Why Not Dynamically Instantiate All of 'Em? The case for why you must dynamically instantiate some objects is clear: there are times you just can't know at design time what kind of object you'll need: you must respond to the user's choices and actions. That of course raises the question of why not eschew the XAML altogether and dynamically instantiate all your objects. There are two answers to this. The first is that it is faster and easier to declare the button in XAML. The second, more important answer is that the XAML is "toolable" -- that is, the XAML can be read and understood by, for example, Expression Blend, while the C# cannot; which makes developing large applications far easier and far more scalable. If I open the project that created these two buttons in Blend, this is what I see:   Blend can read the grid, and the button declared in XAML but is totally unaware of the button created in code. Conclusion? The short conclusion is to create objects declaratively at design time when possible, and dynamically at runtime when necessary.  In the abstract this can seem confusing, but when writing code, it is never ambiguous.
  • Tip of the Day Microblog Launches Today

    As of today, I will attempt to add a brief Tip of the Day to the Silverlight Microblog every day. If you would like to contribute (and I hope you will) please send your tips following the directions listed here . Thanks!   -jesse
  • Small Software - Big Impact

    First, a quick note that I'm rapidly posting tutorials and videos and as soon as they are through our production process, I'll turn my blog to announcing them and expanding upon them. I do want, however, to mention one of my favorite utilities, Hypersnap which I've used for about the past 7 years to capture and annotate all of the images in my books, articles, tutorials and blog entries. It is an extraordinary utility with amazing capabilities, but the story I want to tell you is about customer service. I wrote the following to customer service yesterday (abridged...) ...The one feature that makes me crazy is the need to go through so many steps to switch between the two modes I use most often: · Don’t capture cursor, set delay to 200ms · Capture cursor, set delay to 4 seconds It would be great to be able to.... 62 minutes later I got back a message from Greg Kochaniak that said in part, Hi Jesse,...I added a “hidden” command.... find “Include Cursor With Time Delay” – drag it and drop on the top main toolbar of HyperSnap... and you’ll have a one button click to enable cursor capture with extra 4 seconds delay, or disable it and no delay... I’ll leave this command there for future releases. (The image above has the new button circled in red, taken of course in Hypersnap, by using that button!) You just don't see customer service like that every day . I have no connection to this company, but they do make a great shareware product. Every few months I'll mention some others, but here's a quick list of my current favorites: Roboform - For IE. I don't know how anyone lives without this. Fill in your information and it fills forms for you. Can be password protected. Remembers login and password info for sites you visit, can provide password generation. Exam Diff Pro - best software I know for examining differences in files and directories. Incredibly easy to use, to customize and very reliable. Instant C# / Instant VB (Full Disclosure: They gave me an evaluation copy) I am blown away by how well this product works. Put in a fairly complex program in one language and in seconds you have a fully converted program. Highly recommended if you need and can afford it. RegexBuddy - If you are creating regular expressions, nothing comes close to this utility for getting it right, fast and painless. $29. Wiki.reg -For IE: Updates your registry (back up your registry first) so that from any browser you can type w and then a phrase to look up in...
  • Back up your code!

    In 1993 I was given this brilliant cartoon - and I'd love to find out who created it...     Best Personal/ Small Business Offsite Solution I've Found While I have you, one of the better, less expensive solutions I've found for solving my own off-site backups (after struggling for years) is to use Carbonite, which works silently and effortlessly on files or folders in the background at a tiny fraction of the cost of most off-site services. The downside? They don't version your files. The solution? Have them back up your versioning database! It is amazingly easy to set up, to maintain, to use, and absurdly inexpensive ($50 for one year, unlimited data!) [This opinion is my own, does not express that of anyone else, lest of all any of my employers or publishers, I have no affiliation with the people who make carbonite, your mileage may vary, contents are hot, void where prohibited, the superman underwear will not make you fly, do not use hot irons on clothing you are wearing)
  • Source for the Tip of the Day

    The Tip of the Day occasionally will delve deep into code (other days it will just provide a bit of useful information, or a tip, etc.) When code is examined, however, I'll try to provide a complete working example, and to get us started, I've gone backwards in time and added links to complete sample applications for Master Detail in Silverlight 2 (3/15) Content - It Ain't Just Text (3/11) Routed Events (3/10)   Each article now begins with a nice big link to the source code.   The source code should run well with the Beta 1 of Silverlight, but if you encounter any difficulties, please do let us know. Just for the record, every example is tested on the public release of Visual Studio 2008 and the public release version of Silverlight 2 Beta 1.
  • Tip of the Day - Popfly

    Mix is fast upon us, and to be perfectly honest, I'm preparing frantically. That means that I've been behind in my Tip of the Day. Rather than closing it down, I want to take the three weeks between now and Mix and really focus on some areas of Silverlight 1.0 that I've not been paying enough attention to. We know that Silverlight 2 is just around the corner; while we've not announced its release date, we've said it will be in Q1, which means a matter of weeks. Let me assure you that will many of my Tips of the Day and blog posts will be on Silverlight 2, which after all will be new and exciting (and amazing) it will also be Beta, while SL 1 is a released product, and so will not be neglected. One of the areas that I personally have been meaning to pay more attention to is Popfly . With the attention it has been given by my publisher , I thoght this might be a good time to start. I decided to start with the Popfly videos . I watched the 30 second video and based my starter app on that. To begin, I grabbed the Twitter block and set its properties to my Twitter account. Clicking on the wrench (see arrow) opens the block for you to set its properties, I added some arrows to the image above to make pointing out the pieces a bit easier. The three black arrows point to the three properties for this block.. The first, set by a drop down, lets you decide which operation you want the block to perform (I chose getFriendsPosts). The second asks for your Twitter user name, and the third asks how many posts you want to get at a time. The blue arrow (near the top) points to a button that lets you see the actual JavaScript code that implements this Popfly control, As noted in the highlighted area, you are free to edit the Javascript directly if you can't help yourself, but Popfly is designed to work wihtout your having to write any code at all. At any time, you can click preview to see the results of your work so far; in this case, my one Popfly block running alone. When I click preview, the block goes out to Twitter, finds the account and returns my Twitter notification This isn't quite what I wanted, but that is not a problem. I click on Customize and the block comes back. Click on the wrench, the edit block comes back. I can edit the properties and I can count on tooltips to help me determine the meaning of the properties. Each small change is easy to test by clicking on preview Adding a 2nd Block When I have the block working the way I want...