Exemplo n.º 1
0
        protected override bool Init(object controller, object binding, Sitana.Framework.Ui.DefinitionFiles.DefinitionFile definition)
        {
            if (!base.Init(controller, binding, definition))
            {
                return(false);
            }

            DefinitionFileWithStyle file = new DefinitionFileWithStyle(definition, typeof(UiEditBox));

            _fontSize          = DefinitionResolver.Get <int>(Controller, Binding, file["NativeInputFontSize"], 20);
            _nativeInputMargin = DefinitionResolver.Get <Margin>(Controller, Binding, file["NativeInputMargin"], Margin.None);
            _nativeInputAlign  = DefinitionResolver.Get <Align>(Controller, Binding, file["NativeInputAlign"], Align.Left);
            return(true);
        }
Exemplo n.º 2
0
        protected override bool Init(object controller, object binding, Sitana.Framework.Ui.DefinitionFiles.DefinitionFile definition)
        {
            if (!base.Init(controller, binding, definition))
            {
                return(false);
            }

            DefinitionFileWithStyle file = new DefinitionFileWithStyle(definition, typeof(UiEditBox));

            _textInput = new TextInput(this, _inputType);

            _lostFocusCancels = DefinitionResolver.Get <bool>(Controller, Binding, file["CancelOnLostFocus"], false);

            return(true);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Loads content object
        /// </summary>
        /// <param name="name">name of resource</param>
        /// <param name="contentLoader">content loader to load additional resources and files</param>
        /// <returns></returns>
        public static DefinitionFile Load(String path)
        {
            XNode node = XFileEx.FromPath(path);

            return(DefinitionFile.LoadFile(node));
        }