• windows8 store控件开源,另附 打包教程(希望为windows8的发展献上绵薄之力)


     redsafi开源win8控件地址:http://www.redsafi.com/sugarui/index_cn.html

    痛苦焦急的研究两天终于把开源控件打包成功。心情无比畅快快,写篇博客园与大家分享,满网上搜了一遍没有类似的教程,本篇算是首发,希望对大家有所帮助。

    首先说明我们将要讲的是打一个vs 的Software Development Kit(sdk)包后缀名是.vsix。

    前提:windows8&vs2012&vs2012sdk

    1.新建solution,在solution上右键快捷菜单Add->New project,选择VSIXProject项目模板

    2.创建好之后咱们看一下项目的结构

    新建的项目默认情况下只有一个source.extension.vsixmanifest文件用来配置我们的安装包信息,用设计器打开:

    3.除了author,  和version默认空是必填项以为其他根据自己的需要可选择的填入。

    看下一页,Type of install 必须选择Extension SDK:

    4.到这里配置第三页之前我们要在项目中添加SDKManifest.xml配置文件,用下面内容替换。

    参考地址:http://msdn.microsoft.com/zh-cn/library/hh768146.aspx

    <?xml version="1.0" encoding="utf-8" ?>
    <FileList
      DisplayName="allanxingLibrary"
      MinVSVersion="11.0"
      TargetFramework=".NETCore,version=v4.5"
      AppliesTo="WindowsAppContainer"
      SupportsMultipleVersions="Error"
      MoreInfo="http://www.msdn.microsoft.com/">
      <File Reference="ClassLibrary1.dll">
        <ContainsControls>True</ContainsControls>
        <ToolboxItems VSCategory="allanxingSDK" BlendCategory="allanxing for Windows 8">
          <Item Type = "ClassLibrary1.CustomControl1"/>
        </ToolboxItems>
      </File>
    </FileList>

    第三页点New添加新资源按照下图添加SDKManifest.xml文件

    5.最关键的步骤到了~创建两个目录结构,记住要仔细检查这里不能出错

    Redist/CommonConfiguration/neutral

    References/CommonConfiguration/neutral

    添加事先编译好的dll和pbd文件到References/CommonConfiguration/neutral下面

    添加对应的pri文件和对应的[命名空间文件夹]到Redist/CommonConfiguration/neutral下面

    [命名空间文件夹]用来存放类库Themes/Generic.xaml。

    分别设置新添加的文件属性->Build Action=content.

    include in VSIX= true.

    6.编译生成,恭喜大家这样就完成了!

    ————————————————————————————

    最后附送一个小技巧:

    想不想让自己的控件在toolbox里显示像原生控件一样有漂亮的图标呢?

    添加步骤:

    1.制作16×16 的icon格式的图片

    2.将图片添加到项目中设置图片属性buildAction设置为wmbedded resource

    3.以控件完整的命名空间+控件的类名重命名图片

  • 相关阅读:
    VUE2.0项目实现动态修改请求的服务器地址
    el-select和data
    el-tree禁用
    国际化全部整理
    洛谷P2899 Cell Phone Network G 题解
    【nvidia jetson xavier】 Deepstream Yolov3示例模型运行
    【nvidia jetson xavier】 风扇开机自启动
    A Semisupervised CRF Model for CNN-Based Semantic Segmentation With Sparse Ground Truth
    Semi-supervised semantic segmentation needs strong, varied perturbations
    Remote Sensing Images Semantic Segmentation with General Remote Sensing Vision Model via a Self-Supervised Contrastive Learning Method
  • 原文地址:https://www.cnblogs.com/allanxyq/p/2937554.html
Copyright © 2020-2023  润新知