Diving into the RichTextBox

 image Watch Video

  1. Overview of RichTextBox vs. TextBlock and TextBox for rich content
  2. Wire-up logic for applying formatting
  3. Inline UI elements
  4. Using text position to point for simple and complex operations  
  5. Basic "position to point/point to position"
  6. How to walk content and getting rectangle data
  7. Using rectangle data to generate line metrics/highlight bar
  8. The clipboard XAML format and that the same data is exposed in the XAML property
  9. TextAlignment=Justify on paragraph

Via Diving into the RichTextBox (Silverlight TV #31) | Silverlight TV | Channel 9

A reusable Custom Out-of-Browser Window in Silverlight 4

 

What this means is that you can turn this:

normal out-of-browser window

into this:

custom out-of-browser window

The MainWindow control derives from UserControl and is meant to replace the default layout root. It provides the following features:

  • A title bar that users can drag to move the window. The title bar consumes out-of-browser configuration data for the icon and title text.
  • A default border that users can drag to resize the window. Hovering over the border changes the cursor as you would expect. A BorderBrush dependency property lets you customize the border background from the application layout root.
  • Isolated Storage support to store the window size, position, and state on application shutdown and retrieve the values on the next startup.

Download the project here.

Via Creating a Custom Out-of-Browser Window in Silverlight 4 – Silverlight SDK – Site Home – MSDN Blogs

WCF RIA Services Essentials at codeplex

The RIA Services Essentials project contains sample applications/extensions demonstrating using and extending WCF RIA Services v1.

  • Book Club – It was written to demonstrate some aspects of writing a semi-real-worldish application (note that it is still very much a demo app), but more importantly, demonstrating how you can use RIA Services effectively by going beyond the basics.
  • Here is a list of what the application demonstrates:

  • Entity framework data model with one-to-many and many-to-many relationships as well as use of stored procedures
  • Local data model augmented/mixed with a web service-based data model (in this case Amazon).
  • CRUD and more (queries, insert, update, delete, as well as named update methods, and invoke methods)
  • Use of convention and configuration for identifying CRUD operations
  • Validation (field level, entity level, operation level, change-set scoped, server-only validation, async validation)
  • Custom authentication (i.e. using your DAL/user table, rather than asp.net membership)
  • Authorization (including custom authorization rules)
  • Using authentication service and your User object in server code
  • Usage of DomainServiceFactory
  • Exposing reference data
  • Presentation model for defining custom (non-DAL) types for use between client and server
  • Shared code between client and server for validation rules
  • Query limits, and caching
  • Using RIA Services with MVVM on the client
  • Adding computed properties on Entities on the client along with propagation of change notifications
  • "More" style paging (as seen for example on twitter.com)
  • Display of pending changes, validation errors
  • Reference data used to fill lookup dropdown lists.
  • My Favorite Visual Studio Extension

    image


    • Power Commands

      • Enable/Disable PowerCommands in Options dialog

      • Format document on save / Remove and Sort Usings on save

      • Clear All Panes

      • Copy Path

      • Email CodeSnippet

      • Insert Guid Attribute

      • Show All Files

      • Undo Close

      • Collapse Projects

      • Copy Class

      • Paste Class

      • Copy References

      • Paste References

      • Copy As Project Reference

      • Edit Project File

      • Open Containing Folder

      • Open Command Prompt

      • Unload Projects

      • Reload Projects

      • Remove and Sort Usings

      • Extract Constant

      • Clear Recent File List

      • Clear Recent Project List

      • Transform Templates

      • Close All

    • Pro Power Tools

      • * Document Well 2010 Plus
              o Tab Well UI
                    + Scrollable tabs
                    + Vertical tabs
                    + Pinned tabs
                    + Show close button in tab well
              o Tab Behavior
                    + Remove tabs by usage order (LRU)
                    + Show pinned tabs in a separate row/column
              o Sorting
                    + Sort tabs by project
                    + Sort tabs alphabetically
                    + Sort tab well dropdown alphabetically
              o Tab UI
                    + Color tabs according to their project or according to regular expressions
                    + Miscellaneous options that modify tab UI
        * Searchable Add Reference Dialog
        * Highlight Current Line
        * HTML Copy
        * Triple Click
        * Fix Mixed Tabs
        * Ctrl + Click Go To Definition
        * Align Assignments
        * Colorized Parameter Help
        * Move Line Up/Down Commands
        * Column Guides

    • VsCommands

    • Grouping items – you can group and ungroup items using IDE, something you would normally need to edit project file (DependentUpon)

    • Ungrouping items

    • Custom Grouping – you can choose any of the selected items to be a new root for others:

    • Locate in solution – some people don’t like auto tracking of current item in solution explorer but would like to locate current item on demand. It’s now easy to achieve, simply rightclick in code editor, select ‘Locate in Solution’ from context menu and current item will be highlighted in solution explorer.

    • Open in Expression Blend – open project in Expression Blend directly from Visual Studio interface

    • Copy/Paste As Link

    • Copy/Paste References – supports assembly, project and ActiveX references

    • Build Summary

    • Open File Location

    • Search Online

    • Attach To Local IIS

    • Copy Full Path

    • Build Startup Projects

    • Open Command Prompt

    • Thumbnails in IDE Navigator (Ctrl + Tab)

    • Zooming

    • Show All Items

    • Get Assembly Full Name

  • RegEx Editor

  • CodeCompare

  • tangible T4 Editor