Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you use sketchflow controls/styles in a WPF application?

I really love the sketchy-ness of the Sketchflow buttons and controls, and would love to use those controls/styles in my own WPF app, can this be done in anyway? Perhaps just reference the Sketchflow binaries?

like image 960
Mark Avatar asked Jun 29 '10 23:06

Mark


1 Answers

I believe this should work if you do the following:

  • Add SketchStyles.xaml to your wpf project (easiest way is to find it by creating a wpf SketchFlow project and copying it from there)
  • Reference Microsoft.Expression.Prototyping.SketchControls.dll in your project (found here on my system: C:\Program Files (x86)\Microsoft SDKs\Expression\Blend.NETFramework\v4.0\Libraries)
  • Add a directory named "Fonts"
  • In that directory, add the 3 fonts found in a SketchFlow project
  • To make the default Sketch font work, open SketchStyles.xaml in xaml editing mode, and find the line with "Buxton Sketch", it will have a reference to your old project, it should be changed to look like this: < FontFamily x:Key="FontFamily-Sketch">Fonts/#Buxton Sketch< /FontFamily>
  • Last, edit app.xaml in xaml editing mode and make sure it looks like this:

    <Application.Resources>
        <!-- Resources scoped at the Application level should be defined here. -->
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Microsoft.Expression.Prototyping.SketchControls;component/ScrollViewerStyles.xaml"/>
                <ResourceDictionary Source="SketchStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
    
like image 107
Chuck Hays Avatar answered Sep 26 '22 02:09

Chuck Hays