Welcome to witters:World     Sign in

A few good custom WPF controls

I stumbled on this blog post with links to some pretty cool and extremely useful custom WPF controls.  Enjoy!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by martin on Tuesday, February 02, 2010 12:26 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Zoom and PageChanged Events for FlowDocumentPageViewer

My app contains several screens that have content displayed in FlowDocuments, contained in the FlowDocumentPageViewer control.  The problem that arose is that when the user changed the Zoom level on one screen, then navigated to another screen, the content on the new screen would be displayed at the default zoom level.  And when navigating back to the original screen, the content would be revert to the default zoom there too.  My approach to solving this problem was to save the zoom level in a "preferences" class and set each viewers zoom to the saved value.  However, a problem with this approach is that there was no way to know when the zoom level changed on the out-of-the-box FlowDocumentPageViewer control.

Some quick Bing-ing led me to an extended control downloadable from this page.  The control overrides the FlowDocumentPageViewer's OnIncreaseZoomCommand and OnDecreaseZoomCommand methods.  This solution works great, but only when the user clicks the '+' or '-' to control the FlowDocument's zoom.  The commands are not executed when the user uses the slider control to adjust the zoom, and no overridable methods or events are specific to the slider.  So how can I know when the user uses the slider to adjust the zoom instead of the buttons?

For that, I had add another override to the extended control, this time OnPropertyChanged.

protected override void OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e)
{
    base.OnPropertyChanged(e);
    switch (e.Property.Name)
    {
        case "Zoom":
        OnZoomChanged();
        break;
    }
}

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Posted by martin on Wednesday, January 13, 2010 11:08 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Intellisense in SQL Server Management Studio

One of my favorite new features with SQL Server 2008 is the addition of intellisense to the query windows in SQL Server Management Studio.  But I have been a little bit frustrated by its behavior at times.  For example, after I create a new table, I often want to write stored procedures that use that table.  But the query window would not show the table or its columns in intellisense.  Once I typed out the table and column names completely, they would have the red squiggly underline indicating that they were invalid.  The query would execute fine, but the red squigglies would remain. 

I just discovered that this problem was not overlooked by Microsoft.  They included a menu option to refresh the local cache for intellisense.  Find it under Edit > Intellisense > Refresh Local Cache, or just use the keyboard shortcut (Ctrl + Shift + R).  I probably should have found this sooner, and many of you may have already known about it, but for those of you who have felt the same frustation, I hope this helps.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by martin on Wednesday, November 25, 2009 12:43 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Fishbowl : Facebook client for Windows 7

I just read about this in a blog post by Rob Relyea.  It's a cool facebook client written to show off some of the features of Windows 7 and WPF/XAML.  I just downloaded and installed the app, and after a little poking around, I really like it.  It's clean, responsive, and easy to use.  I don't hate Facebook's web interface, but I do sometime have problems with images not loading, or screens loading half-way and never finishing.  So far nothing like that in Fishbowl, but I'll keep you posted.  Check it out here: http://www.fishbowlclient.com/

Anyone else tried this app or similar apps?

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Posted by martin on Monday, November 23, 2009 3:07 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Mozilla Weave

I've been a huge fan of the Firefox browser for several years, and the folks at Mozilla just keep making it better.  The latest enhancement I'm taking advantage of is called Mozilla Weave.  I just started using it a few days ago, but so far it's amazing.  The stated goal is to "broker rich experiences while increasing user control over their data and personal information."  I haven't read much detail on what their vision entails, but the first component released for testing certainly lives up to that goal. 

The first component is a service called Weave Sync, "a prototype that encrypts and securely synchronizes the Firefox experience across multiple browsers, so that your desktop, laptop, and mobile phone can all work together.  It currently supports continuous synchronization of your bookmarks, browsing history, saved passwords and tabs. " 

This is extremely useful for me because I use Firefox on three different computers at various times and often find myself frustrated with the experience.  For example, I might find and bookmark a useful site at work, then struggle to find the site when I'm at home and using a different laptop.  I've been using the GMarks add-on to handle this for me, but Weave Sync makes the feature more integrated with the browser.  The synching of saved passwords is also a time saver, because I will be less likely to use the "forgot my password" feature of sites that I visit on multiple computers.

Of course, all this additional convenience would be pretty much useless if it required a lot of configuration or constant user intervention.  But so far, I haven't noticed any of that.  Initial configuration was amazingly simple.  Once you install the service (similar to installing an add-on in Firefox), you simply set up an account with a username, password and passphrase.  Then setting up another computer requires the same steps, but there is additional wait time for first-time synching.  Once each computer is set up, the synching is automatic and unnoticed by the user.

 As other browsers continue to try and play catch-up with Firefox, I've experimented with them to see if they've closed the gap.  So far, none have come close.  In fact, some of the latest versions, such as IE8 and Google Chrome, seem to be taking steps backwards. Meanwhile, Firefox marches forward with more and more intelligent and useful features.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Posted by martin on Thursday, August 06, 2009 2:05 PM
Permalink | Comments (0) | Post RSSRSS comment feed