Zebble
  • About Zebble
  • Compare
  • Documentation
  • Themes
  • Plug-ins
  • Contact Us

    • What is Zebble?
    • Structure of a Zebble solution
    • Zebble Designer (UWP)
    • Installing - Introduction
    • Change log
    • Introduction
    • ViewModel development
    • VM.EXE
    • View development
    • Dialogs
    • Lists and Collections
    • Tips and shortcuts
    • List views
    • ViewModel testing
    • Automatic Views
    • View development process
    • Hello World - Core Concepts
    • Layout: Sizing & Positioning
    • Event handling
    • Navigation
    • Alerts, Dialog, Prompt and toast
    • View lifecycle
    • Managing Files & Resources
    • Config & Debugging
    • Forms
    • Page templates
    • Device API
    • Animations
    • Web Api - Part 1 (reading data)
    • Web Api - Part 2 (post and delete)
    • Web Api - Part 3 (server vs client domain model)
    • Gesture events
    • View class
    • Zebble Markup (.zbl files)
    • Data Binding and MVVM
    • Stack class
    • Sizing and positioning
    • Layout examples
    • ScrollView class
    • Page class
    • Styling in Zebble
    • CSS property mapping to Zebble
    • Supported selectors
    • Zebble CSS: Under the hood
    • Inline styling
    • CSS real-time updates
    • Dynamic expressions in CSS
    • Gradient background colours
    • CSS Pseudo-classes support
    • Using Bold and Light Fonts in Zebble
    • Rotation in Zebble
    • Using custom fonts in Zebble
    • Flashing on tap using AutoFlash
    • Button
    • Carousel class
    • Checkbox class
    • DatePicker
    • Drawing class
    • FilePicker class
    • Grid class
    • IconButton class
    • ImageView
    • ItemPicker class
    • ListView & Grid classes
    • OptionsList
    • SearchInput class
    • Slider class
    • Switch class
    • Tabs Class
    • TextInput class
    • TextView
    • TimePicker
    • TreeView
    • Waiting Indicator
    • WebView class (displaying html)
    • C# Methods and Properties Of UI Components
    • Nav.Forward() vs Nav.Go()
    • Passing parameters to the destination page
    • Going Back
    • Showing Popup pages
    • Waiting class
    • Hardware Back button (e.g. Android)
    • NavigationBar class
    • Tabs class
    • Caching (pages)
    • Navigation without event handler
    • Use the Windows version
    • Logging messages for Debugging
    • Debugging Zebble/Plugin
    • Exception handling in Zebble
    • Debugging layout and styles
    • Zebble Device API
    • Device.Screen and orientation (landscape | portrait)
    • Code that should run on a specific platform
    • Using Lamp (aka Flash, LED and Torch)
    • Using Compass (Smooth compass)
    • Using Accelerometer (device angle)
    • Using Gyroscope (device motion speed)
    • How to Vibrate the device?
    • Launching the device browser
    • Finding device model and manufacturer
    • Responding to System events
    • Handling device shake event
    • Permissions
    • Permissions declaration (manifest files)
    • Sharing
    • Prompt for rating the app
    • Finding if Internet connection is available
    • Device messaging (Make a phone call, send SMS or Email)
    • Showing a local notification
    • Copying to Clipboard
    • Accessing device contacts
    • Reading and writing into Gallery (albums)
    • Playing & Recording Audio
    • Cache and temp files and folders
    • C# async / await
    • Understanding Zebble Threading
    • Debugging - the StackTrace problem
    • Not awaiting (running in parallel)
    • Timer (interval / scheduled running)
    • Post-render changes to the UI (dynamic)
    • Introduction of Geo location
    • Map & Location Services
    • Launch directions to a location (external)
    • Getting current Location
    • Tracking user location
    • Device.Media: Taking and picking photos
    • Playing an audio file
    • VideoPlayer class
    • Augmented reality
    • Recording audio
    • Virtual Reality
    • Speech Recognition
    • Recording or picking video
    • Playing remote videos in iOS
    • Text to speech
    • Introduction to the importance of Mobile Testing
    • Why and what to test
    • Testing mobile apps on different devices
    • Testing mobile apps
    • Xamarin Profiler
    • Performance optimization
    • Moving a view to another container at run-time
    • Attaching custom data (tag) to objects
    • Saving a view as image
    • Naming best practices
    • Fastest way to update your nuget package
    • Tips for Clean and Brief code
    • Splash screen and icon generation
    • Advice for passing Approval
    • Options for iOS app distribution
    • Test Release (internal and UAT)
    • Application Icons in IOS
    • Submitting to App Store
    • Releasing to App Store
    • Crash reporting
    • Optimized Release Build
    • Android - Generating an APK for manual installation
    • Payment (subscriptions & in-app purchases)
    • Introduction to push notifications
    • Registration process (App)
    • Push notification setup - iOS
    • Push notification setup - Android
    • Push notification setup - Windows
    • Sending a push message from the web app
    • Introduction
    • Connecting Zebble to Web API
    • Installation
    • Creating an API class
    • GET APIs
    • Calling a GET API (in the mobile app)
    • POST, PUT, PATCH and DELETE APIs
    • Domain Model
    • Web API and Authentication
    • Versioning
    • Uniquely identifying installations (token)
    • Settings file: config.xml
    • Standard Zebble settings
    • Login/Register with Facebook
    • Creating a composite component / plugin
    • Creating a Zebble component using Html and Javascript
    • CustomRenderedView: Third-party native components / plugins
    • Mapbox
    • Naming considerations
    • Random problems?
    • Display Keyboard for Visual Studio Android Emulator
    • iOS goes mad?
    • Configuring a Windows phone for ad-hoc testing
    • Fixing Error DEP0001 : Unexpected Error: -2147009287 while deploying Windows UWP app on device
    • Fixing Error DEP0001 : Unexpected Error: -1988945906 while deploying Windows UWP app on device
    • Unable tp Connect to the Mac agent from Visual Studio
    • Can't connect to the Mac agent from Visual Studio?
    • Choosing the CPU architecture
    • Zebble CLI
    • How to add a Device API to Zebble source?
    • About Automated UI testing
    • What should we test in mobile applications?
    • Creating an Automated UI Test in Zebble



TextInput class


It allows the user to enter a text. It's similar to the Textbox control in the web world.
You can specify the line numbers, TextAlignment, Placeholder, Text Mode and Text Color.

Basic usage:

<TextInput Id="MyTextInput" Placeholder="Text here"
TextMode="GeneralText"  TextAlignment="Justify"></TextInput>
new TextInput { Id = "MyTextInput", TextMode = TextMode.GeneralText,
TextAlignment = Alignment.Justify, Placeholder = "Text here"};

 

 

 

 

 

 

 

 

 

 

PseudoCssState

PseudoCssState is a boolean value that if it will be set to "disabled", it allows you to specify a visual style for it in CSS.

 

 Font and color

MarkUp:

<TextInput Text="TextInput 1" Style.Border="3" Style.Border.Color="red" Style.BackgroundColor="gold"/>

 

 

<TextInput Text="TextInput 2" Style.Border="3" Style.Border.Color="red" Style.BackgroundColor="brown"/>

 

 

Enabled & Ignored

Stylesheet has a boolean property named Ignored, which is false by default. When set to true it works the same as "display: none" in HTML. It means that the element will not only be invisible, but also it won't occupy space on the screen.

View has a boolean property named Enabled, which is true by default. When set to false the object will not respond to UI gesture events. But it will remain visible. Also, its PseudoCssState will be set to "disabled" which allows you to specify a visual style for it in CSS.

MarkUp:

<TextInput  Style.Height="20" Text="SearchInput 1" />
<TextInput  Style.Height="20" Text="SearchInput 2" Enabled="false" />
<TextInput  Style.Height="20" Text="SearchInput 3" />
<TextInput  Style.Height="20" Text="SearchInput 4" Ignored="true"/>
<TextInput  Style.Height="20" Text="SearchInput 5" />

 

PlaceHolder:

 The placeholder text shown when Text is null or empty. The default value is null.

<TextInput Id="MyTextInput"  Placeholder="Please Enter something here...!"/>

KeyboardActionType:

If instead of "Go" you want the submit button to have a different text or icon, you can set the KeyboardActionType property to any of the following values:

  • Go
  • Continue
  • Done
  • Join
  • Next
  • Search
  • Send

Lines:

The Lines proeprty determines how many lines does InputText component have.

<TextInput Lines="5" Style.Border="1" Style.Border.Color="red"/>

Box Shadow

Zebble components have a special effect which is named BoxShadow. As you can see in next image, it has start X and Y position for effecting and the amount of radious.

MarkUp:

<TextInput Style.Height="40" Text=" SearchInput 1" Style.BoxShadow.Color ="red" Style.BoxShadow.BlurRadius="5" Style.BoxShadow.XOffset="5" Style.BoxShadow.YOffset="5" Style.Border="1"/>

Margin & Padding

You can see some information about Margin & Padding in Zebble here: http://zebble.net/docs/margin-padding

Position

The location of an object can be determined by Style.X and Style.Y.

MarkUp:

<TextInput Id="MyTextInput" Style.Height="30" Text=" InputBox 1" Style.Border ="1" Style.X="100" Style.Y="300"/>

TextAlign:

Gets or sets the horizontal alignment of the text displayed in the object.

MarkUp:

Sample 1:

<TextInput Id="MyTextInput" TextAlignment="Right" Text="My Text" Style.Border.Color="green"/>

C#:

MyTextInput.TextAlignment = Alignment.Right;

 

Sample 2:

<TextInput Id="MyTextInput" TextAlignment="TopLeft" Text="My Text" Style.Border.Color="green"/>

C#:

MyTextInput.TextAlignment = Alignment.TopLeft;

 

Sample 3:

<TextInput Id="MyTextInput" TextAlignment="TopRight" Text="My Text" Style.Border.Color="green"/>C#:

MyTextInput.TextAlignment = Alignment.TopRight;

 

Sample 4:

<TextInput Id="MyTextInput" TextAlignment="TopMiddle" Text="My Text" Style.Border.Color="green">C#:

MyTextInput.TextAlignment = Alignment.TopMiddle;

 

Sample 5:

<TextInput Id="MyTextInput" TextAlignment="Left" Text="My Text" Style.Border.Color="green"/>C#:

MyTextInput.TextAlignment = Alignment.Left;

 

Sample 6:

<TextInput Id="MyTextInput" TextAlignment="Middle" Text="My Text" Style.Border.Color="green"/>C#:

MyTextInput.TextAlignment = Alignment.Middle;

 

Sample 7:

<TextInput Id="MyTextInput" TextAlignment="BottomLeft" Text="My Text" Style.Border.Color="green"/>C#:

MyTextInput.TextAlignment = Alignment.BottomLeft;

 

Sample 8:

<TextInput Id="MyTextInput" TextAlignment="BottomRight" Text="My Text" Style.Border.Color="green"/>C#:

MyTextInput.TextAlignment = Alignment.BottomRight;

 

Sample 9:

<TextInput Id="MyTextInput" TextAlignment="BottomMiddle" Text="My Text" Style.Border.Color="green"/>C#:

MyTextInput.TextAlignment = Alignment.BottomMiddle;

 

TextColor

TextColor sets the color of the Text whick shown in the object.

MarkUp:

<TextInput Id="MyTextInput" Style.TextColor="white" Style.BackgroundColor="black" Text="My Text" Style.Border.Color="green"/>

C#:

MyTextInput.TextColor = Zebble.Color.Parse("#A2B044");

TextTransform

This property determine the output format of text:

  • None: The output is same to the text.
  • Uppercase: The all character of output is uppercase.
  • Lowercase: The all character of output is lowercase.
  • Capitalize: Only the first character of each work is uppercase.

 

MarkUp:

Sample 1:

<TextInput  Style.Border.Color="green" Lines="3" Text="ZEBBLE framework" TextTransform="None"/>

 

 

Sample 2:

<TextInput  Style.Border.Color="green" Lines="3" Text="ZEBBLE framework" TextTransform="Uppercase"/>

 

 

Sample 3:

<TextInput  Style.Border.Color="green" Lines="3" Text="ZEBBLE framework" TextTransform="Lowercase"/>

 

 

Sample 4:

<TextInput  Style.Border.Color="green" Lines="3" Text="ZEBBLE framework" TextTransform="Capitalize"/>

 

 

TextMode

You can set the output format of text. By default, text mode is Auto, which allows Zebble to guess the correct TextMode depending on the Id of the control.

 

sample 1:

<TextInput  Style.Border.Color="green"  Text="ZEBBLE framework" TextMode="GeneralText"/>

C#:

MyTextInput.TextMode = TextMode.GeneralText; // This affects the keyboard.

 

Sample 2:

<TextInput  Style.Border.Color="green"  Text="Farhad.abaei@gmail.com" TextMode="Email"/>

C#:

MyTextInput.TextMode = TextMode.Email; // This affects the keyboard.

 

Sample 3:

<TextInput  Style.Border.Color="green"  Text="0123456" TextMode="Password"/>

C#:

MyTextInput.TextMode = TextMode.Password; // This affects the keyboard.

 

Sample 4:

<TextInput  Style.Border.Color="green"  Text="343434343434" TextMode="Decimal"/>

C#:

MyTextInput.TextMode = TextMode.Decimal; // This affects the keyboard.

 

Actions:

This control also has various event handling methods including: FocusChanged, TextCompleted, Clear, TextChanged, FontChanged etc. Any event handler usage is similar to each other, you just have to specify the method you want to handle events in it. For example:

MyTextInput.TextChanged = TextChanged;private void TextChanged() { /* Do something here*/ }

Events:

  • on-Flashed: Raised when the TextInput is flashed.
  • on-Initialized: Raised when the TextInput object is created and rendered.
  • on-Initializing: Raised when the TextInput object is being created and rendered.
  • on-LongPressed: Raised when user clicked on the TextInput for a long time.
  • on-PanFinished: Raised when user panned on the TextInput.
  • on-Panning: Raised when user starts to pan on the TextInput.
  • on-PreRendered: Raised when the TextInput object is not started to rendered before rendering.
  • on-UserFocusChanged: Raised when user clicks on the TextInput or lost the focus of object.
  • on-UserTextChanged:Raised when the Text property is changed.
  • on-UserTextChangeSubmitted: This event is fired when the user taps the submit button on the soft keyboard, or presses the Enter key on a physical keyboard.
  • on-Swiped: Raised when user swiped on the TextInput
  • on-Tapped: Raised when user tapped on the TextInput.



‹
Zebble is a product of Geeks Ltd , a software house based in London, UK. All rights are reserved.

Telephone: +44 (0)845 643 6229

Email: hello@zebble.net

Address: 66a London Road, Morden

Greater London, United Kingdom, SM4 5BE

Privacy Statement
Terms & Conditions
Contact Us