Dev Notes

Notes on Development with Microsoft Technologies


9 Comments

Split Multi-Value Strings using XSLT

As I’m working with a client for presenting categories, I needed to build a quick and easy way to split multiple managed metadata strings into multiple hyperlinks so filters could be applied. The managed metadata is set to store multiple values — and they appear as follows:

Option 1; Option 2; Option 3; Continue reading

Advertisements


Leave a comment

Using Rules to Passively Insure Postive or Negative Values in InfoPath

Several projects that I have completed using InfoPath over the last few months have made use of numerical values for calculations. For example, a recent form was used upon employee termination to determine if the employee owed money to the organization or if the organization owed money to the employee. It makes a significant difference if the form is allowed to present both deductions and additions as positive values, so we pursued a path to transparently pick up the appropriate numbers. If the person completing the form enters a positive number into a field that expects a negative number, the value is silently converted for the employee without any prompts or error messages. If the employee enters the values as negative, then nothing needs to be corrected. Here’s how this was accomplished.

Continue reading


1 Comment

Convert Color Scheme Designer 3 to XAML Resources

In a recent project, I wanted a quick way to change out color schemes for a Silverlight project. One resource that I have used to build sample color schemes is the Color Scheme Designer 3 by Petr Stanicek. The designer allows the color scheme to be exported to an XML file, but the format doesn’t lend itself to being quickly imported as a XAML resource file — so I decided to write a little console application to convert it to a XAML resource friendly file. You could also simply to an XSLT transformation, but this was used as a way for me to learn to use LINQ to XML to both read and write XML files. If you find this useful, enjoy — but this is so I can have a reference to it at a later time.

Continue reading