Switch off autocorrect on Xamarin forms 'Entry' component - xamarin

Need to switch off auto correct and spell check on the Entry component in Xamarin Forms(UITextField equivalent of Cocoa)
Is there any property to do this?

Set IsTextPredictionEnabled property to False
<Entry Text="YOUR TEXT" IsTextPredictionEnabled="False"/>

Can be done by setting the Keyboard property
selectedEntry.Keyboard = Keyboard.Create(KeyboardFlags.CapitalizeSentence | KeyboardFlags.Spellcheck);

Depending on what you need to achieve, you may also set the Keyboard property of the Entry tag to Chat, Email, Numeric, Plain, Telephone, Text, and Url. Example:
<Entry Text="{Binding EmailAddressInput}" Keyboard="Email"/>

Related

Create Menu Separator for InkToolbar in Windows UWP

My Question is quite simple: I want to add a Separator to an InkToolbar like in the Windows Ink Sketchpad:
I have already tried it with <AppBarSeparator/>
but it doesn't seems to work.
It seems that you can't directly add a separator to InkToolBar,AppBarSeparator is generally used in the AppBar or CommandBar.You can try to add a CustomToolButton to InkToolBar.Then set the line image to it and disable it.If you still want to use AppBarSeparator,you can set a commandbar and put InkToolBar in it.
Use InkToolbarCustomToolButton:
<InkToolbar x:Name="toolbar" TargetInkCanvas="{x:Bind inkCanvas}">
<InkToolbarCustomToolButton Name="lassoSelectionButton" IsEnabled="False">
<Image Source="Assets/vertical_line.png"></Image>
</InkToolbarCustomToolButton>
<InkToolbarCustomToggleButton Name="mouseInkingButton">
</InkToolbarCustomToggleButton>
......
</InkToolbar>
Use CommandBar:
<CommandBar Width="300">
<CommandBar.Content>
<InkToolbar x:Name="toolbar" TargetInkCanvas="{x:Bind inkCanvas}">
</InkToolbar>
</CommandBar.Content>
<AppBarSeparator />
......
</CommandBar>

Change Password Entry text to asterisk(*) instead of dots(.) in xamarin.forms

I'm working on xamarin.forms and I've a password entry field,which displaying the text in dot(.) format but I want the password text to be shown in asterisk(*).Is there any way to change the password text from dot(.) to asterisk.
The Password entry is like this:
<Entry x:Name="Password" Text="{Binding Password}" IsPassword="True" />
I've been trying to find a way to do this but I'm unable to.Can someone please help me with this.
Thank you.
How to change password masking character in Xamarin forms - Entry
It seems to be a duplicate question.
(Since I don't have enough reputation for comment, I had to write a answer)

Change Content of a ListFooterTemplate of LongListSelector

Follow -up to the answer of this question :Add a Load More Button at the end of ListBox without losing Virtualization?
With this example :
<toolkit:LongListSelector ItemsSource="{Binding Items}">
<toolkit:LongListSelector.ListFooter>
<Grid>
<Button x:Name="btnReadMore" Content="ReadMore"/>
</Grid>
</toolkit:LongListSelector.ListFooter>
Is there a way to change his Content by the C# ? (= "ReadMore" and when the itemsource=0 "go back") thank you !
You can bind the value of the Content property to some ViewModel property. This is the best way IMHO:
You would also bind the Command property to some ViewModel command and this will ensure that you correctly set the caption and handle the result.
But beware, you are not supposed to have a button saying "Go Back" which, when pressed, acts as a hardware back button. You are not supposed to emulate such system functionality.

Windows Phone 7 Databinding Outside Attributes (Nonstatic Hyperlink text)

I currently have a listBox in a WP7 application that uses databinding to populate it. The problem I'm having though is with this particular line:
<Hyperlink NavigateUri="{Binding LinkUrl}" TargetName="_blank">{Binding Name}</Hyperlink>
It seems that I can't bind things in this way (outside of an element's attributes). All this does is create a hyperlink with the literal text {Binding Name} linked to the url. Instead what I'm looking for is for it to use the actual Name variable in its place.
I've tried googling for an answer and looked into the Inlines attribute, but I keep coming up empty handed.
Any help would be appreciated
In WPF, the space between the tags is usually the 'content' (but not always) and bindable via the Content property. I'm unfamiliar with <Hyperlink> in Windows Phone, but a <HyperlinkButton> should work just as well.
<HyperlinkButton NavigateUri="{Binding LinkUrl}" TargetName="_blank" Content="{Binding Name}"/>
EDIT: For a <Hyperlink> in a <RichTextBox> try this:
<RichTextBox>
<Paragraph>
<Hyperlink>
<Hyperlink.Inlines>
<Run Text="{Binding Name}"/>
</Hyperlink.Inlines>
</Hyperlink>
</Paragraph>
</RichTextBox>

XAML Binding in binding

I'd like to bind "MenuItemDescription"
How?
Text="{Binding Path=LocalizedRessources.MenuItemDescription, Source={StaticResource LocalizedStrings}}"
In advance thank you
edit:
I'll try to be more explicit:
I'd like to replace "MenuItemDescription" which is currently hard coded by a string dynamicly using a binding
Sorry for my English, I use google translate to help me
I'm guessing you either want to bind to a string defined in a Windows resource file (.resx), or you want to use a value defined in a WPF resource dictionary.
For the first case you need to bind to a static property, e.g.:
<TextBlock Text="{Binding Source={x:Static
MyApplication:LocalizedResource.MenuItemDescription}}"/>
Since you can only bind to public static properties you need to change the access modifier of your LocalizedResources.resx to public (defaults to internal). Open the resource file and you can change the access modifier.
For the second case you need to define the string in a resource dictionary (possibly app.xaml) and then use that as a static resource, e.g.:
In your dictionary
<System:String x:Key="MenuItemDescription">My menu item</System:String>
In your control
<TextBlock Text="{StaticResource MenuItemDescription}"/>

Resources