예제 #1
0
        public RollBoneView(Row row) : base(row)
        {
            boneData = row.Components.Get <BoneRow>();
            var contentExpandButton          = CreateContentExpandButton();
            var contentExpandButtonContainer = new Widget {
                Layout = new StackLayout {
                    IgnoreHidden = false
                },
                LayoutCell = new LayoutCell(Alignment.Center),
                Visible    = true,
                Nodes      = { contentExpandButton }
            };

            Widget.Nodes.Insert(2, contentExpandButtonContainer);
        }
예제 #2
0
        Row AddBoneRow(Row parent, Bone bone, Bone parentBone)
        {
            var row = Document.Current.GetRowForObject(bone);

            if (!row.Components.Contains <NodeRow>())
            {
                row.Components.Add(new NodeRow(bone));
                row.CanHaveChildren = true;
            }
            var boneRow = row.Components.Get <BoneRow>();

            if (boneRow == null)
            {
                row.Components.Add(boneRow = new BoneRow(bone));
            }
            boneRow.HaveChildren = bone.Parent?.AsWidget.Nodes
                                   .OfType <Bone>()
                                   .Any(b => b.BaseIndex == bone.Index) ?? false;
            AddRow(parent, row);
            return(row);
        }