/// <summary> /// Popups initialisation. /// </summary> private void OnIntialize() { _popup = CreatePopup(); _popup.SetContent(CreateContent()); _popup.Focusable = (true); _popup.SetDisplayState(Tizen.NUI.UIComponents.Popup.DisplayStateType.Hidden); }
private void OnLogoTapped(object source, TapGestureDetector.DetectedEventArgs e) { // Only show if currently fully hidden. If transitioning-out, the transition will not be interrupted. if (!mVersionPopup || (mVersionPopup.DisplayState == Tizen.NUI.UIComponents.Popup.DisplayStateType.Hidden)) { if (!mVersionPopup) { string stream = ""; stream += "DALi Core: " + CORE_MAJOR_VERSION + "." + CORE_MINOR_VERSION + "." + CORE_MICRO_VERSION + "\n"; stream += "DALi Adaptor: " + ADAPTOR_MAJOR_VERSION + "." + ADAPTOR_MINOR_VERSION + "." + ADAPTOR_MICRO_VERSION + "\n"; stream += "DALi Toolkit: " + TOOLKIT_MAJOR_VERSION + "." + TOOLKIT_MINOR_VERSION + "." + TOOLKIT_MICRO_VERSION + "\n"; mVersionPopup = new Tizen.NUI.UIComponents.Popup(); mVersionPopup.PositionUsesPivotPoint = true; mVersionPopup.PivotPoint = PivotPoint.Center; mVersionPopup.ParentOrigin = ParentOrigin.Center; TextLabel titleActor = new TextLabel("Version information"); titleActor.Name = "titleActor"; titleActor.HorizontalAlignment = HorizontalAlignment.Center; TextLabel contentActor = new TextLabel(stream); contentActor.Name = "contentActor"; contentActor.MultiLine = true; contentActor.HorizontalAlignment = HorizontalAlignment.Center; contentActor.SetPadding(new PaddingType(0, 0, 20, 0)); mVersionPopup.SetTitle(titleActor); mVersionPopup.SetContent(contentActor); mVersionPopup.WidthResizePolicy = ResizePolicyType.SizeRelativeToParent; mVersionPopup.SetSizeModeFactor(new Vector3(0.75f, 1.0f, 1.0f)); mVersionPopup.HeightResizePolicy = ResizePolicyType.FitToChildren; mVersionPopup.TouchedOutside += HideVersionPopup; Window.Instance.Add(mVersionPopup); } mVersionPopup.SetDisplayState(Tizen.NUI.UIComponents.Popup.DisplayStateType.Shown); } }