private double CreateSticker(double topMargin) { if (this._sticker == null) { return(0.0); } topMargin += 8.0; if (this._stickerItem != null) { this._stickerItem.Margin = new Thickness(0.0, topMargin, 0.0, 0.0); this._stickerItem.IsHorizontal = this._isHorizontal; } else { this._stickerItem = new StickerItem(this._verticalWidth, new Thickness(0.0, topMargin, 0.0, 0.0), this._sticker, this._isHorizontal, this._horizontalWidth, this._rightAlign); this.VirtualizableChildren.Add((IVirtualizable)this._stickerItem); } return(this._stickerItem.FixedHeight); }
// private static StickerGroup mStickerGroup; private void AddStickerData(StickerData data) { StickerItem item; if (!stickerDatas.TryGetValue(data.texture, out item)) { item = new StickerItem(); item.stickerName = data.texture; item.prefab = data.prefab; item.material = data.material; stickerDatas.Add(item.stickerName, item); string[] strs = data.blockModels.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); item.models = strs.ToList(); } else { Debug.LogError("has multiple >>>>>>>" + data.texture); } // item.prefab.Add(data.prefab); // item.material.Add(data.material); }