示例#1
0
        public override void Load()
        {
            string tmpXML4 = @"
<div el-bind:padding-top=""pt"" 
    el-bind:width=""w"" 
    el-bind:height=""styleObj.StyleHeight""
    id=""root""
    flex-wrap=""wrap"" justify-content=""center"" flex-direction=""row"" >
    <div el-for=""item in list"" el-if=""item != '2' "" el-bind:margin=""mt"" el-bind:id=""item"" width=""100px"" height=""100px"">
        my id is {{item}}
    </div>
</div>
";

            var list = new List <string> {
                "1", "2", "3", "4", "5", "6"
            };

            for (int i = 0; i < 1000; i++)
            {
                list.Add("xx" + i);
            }
            stage = new ShadowPlaySimple();
            stage.Build(tmpXML4);
            stage.SetData(new Dictionary <string, object>()
            {
                { "styleObj", this },
                { "w", "620px" },
                { "mt", "5px" },
                { "pt", "15px" },
                { "list", list },
            });
        }
示例#2
0
        public override void Load()
        {
            string tmpXML3List = @"<root>
<div el-bind:padding-top=""pt"" el-bind:width=""w"" el-bind:height=""styleObj.StyleHeight"" flex-wrap=""wrap"" justify-content=""center"" flex-direction=""row"" >
    <div el-for=""item in list"" el-if=""item != '2' "" el-bind:margin-top=""mt"" el-bind:id=""item"" width=""100px"" height=""100px""/>
</div>
</root>";

            stage = new ShadowPlaySimple();
            stage.Build(tmpXML3List);
            stage.SetData(new Dictionary <string, object>()
            {
                { "styleObj", this },
                { "w", "620px" },
                { "mt", "5px" },
                { "pt", "15px" },
                { "list", new List <string> {
                      "1", "2", "3", "4", "5"
                  } },
            });
        }