你能在WPF应用程序中使用sketchflow控件/样式吗?

Mar*_*ark 16 .net wpf sketchflow

我非常喜欢Sketchflow按钮和控件的粗略描述,并且喜欢在我自己的WPF应用程序中使用这些控件/样式,这可以在任何方面完成吗?也许只是参考Sketchflow二进制文件?

小智 12

我相信如果您执行以下操作,这应该有效:

  • 将SketchStyles.xaml添加到您的wpf项目中(最简单的方法是通过创建一个wpf SketchFlow项目并从那里复制它来找到它)
  • 在项目中引用Microsoft.Expression.Prototyping.SketchControls.dll(在我的系统上找到:C:\ Program Files(x86)\ Microsoft SDKs\Expression\Blend.NETFramework\v4.0\Libraries)
  • 添加名为"Fonts"的目录
  • 在该目录中,添加SketchFlow项目中找到的3种字体
  • 要使默认的Sketch字体工作,在xaml编辑模式下打开SketchStyles.xaml,找到带有"Buxton Sketch"的行,它将引用您的旧项目,它应该更改为如下所示:<FontFamily x: Key ="FontFamily-Sketch">字体/#Buxton Sketch </ FontFamily>
  • 最后,在xaml编辑模式下编辑app.xaml并确保它看起来像这样:

    <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>
    
    Run Code Online (Sandbox Code Playgroud)