コード例 #1
0
        public void Activate()
        {
            Window window = Window.Instance;

            window.GetDefaultLayer().Behavior = Layer.LayerBehavior.Layer3D;
            window.BackgroundColor = Color.Black;
            CreateContentView();
            //CreateToolBarView();
            CreateToolBarLayer();

            CreateLayoutButton();
            CreateEditButton();
            CreateInsertButton();
            CreateReplaceButton();
            CreateDeleteButton();

            CreateGridLayout();
            CreateDepthLayout();
            CreateSpiralLayout();

            mLayout = new PropertyArray();
            mLayout.PushBack(new PropertyValue(mSpiralLayout));
            mLayout.PushBack(new PropertyValue(mDepthLayout));
            mLayout.PushBack(new PropertyValue(mGridLayout));


            mItemFactoryWrapper = new ItemFactoryWrapper();
            mItemFactoryWrapper.GetNumberDelegate = GetNumberOfItems;
            mItemFactoryWrapper.NewItemDelegate   = NewItemView;

            mItemView = new Tizen.NUI.ItemView(mItemFactoryWrapper);
            //mItemView.BackgroundColor = Color.Blue;
            mItemView.ParentOrigin           = Position.ParentOriginCenter;
            mItemView.PivotPoint             = Position.PivotPointCenter;
            mItemView.Position2D             = new Position2D(-100, 0);
            mItemView.PositionUsesPivotPoint = true;
            window.Add(mItemView);

            window.GetDefaultLayer().Behavior = Layer.LayerBehavior.Layer3D;

            mItemView.Layout = mLayout;
            mItemView.SetMinimumSwipeDistance(MIN_SWIPE_DISTANCE);
            mItemView.SetMinimumSwipeSpeed(MIN_SWIPE_SPEED);

            SetLayout((int)mCurrentLayout);
            SetLayoutTitle();
            SetLayoutImage();

            mLongPressGestureDetector = new LongPressGestureDetector();
            mLongPressGestureDetector.Attach(mItemView);
            mLongPressGestureDetector.Detected += OnLongPressGestureDetected;
        }
コード例 #2
0
ファイル: ItemView.cs プロジェクト: vincent-kwon/TizenFX
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ItemView obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }