Hi,
I am getting started on Xamarin and decided to use Xamarin Forms. What is the good MVVM library to use for Xamarin.Forms?
Hi,
I am getting started on Xamarin and decided to use Xamarin Forms. What is the good MVVM library to use for Xamarin.Forms?
Following this guide I'm trying to localize my app. I don't want to get system language. I have 3 resx files for the 3 languages that I want to support. I'm able to set the current culture at start and the strings are displayed correctly.
My goal is to change the language while you are using the app. TranslateExtension class is in MyApp.Resources PCL library and this is my page to select the language.
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:vm="clr-namespace:MyApp"
xmlns:t="clr-namespace:MyApp.Resources;assembly=MyApp.Resources"
x:Class="MyApp.Pages.LanguagePage"
BindingContext="{Binding Source={x:Static vm:App.Locator}, Path=Language}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ListView x:Name="contactsListView" Grid.Row="0" ItemsSource="{Binding Languages}" SelectedItem="{Binding SelectedLanguage}">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding Value}" Detail="{Binding Key}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<Button Grid.Row="1" Text="{t:Translate Accept}" Clicked="OkButtonClicked" Command="{Binding SaveLanguageCommand}"/>
</Grid>
</ContentPage>
When a item in the ListView is selected the accept button should change the text (this is what I want). How can I do that?
I worked on Android, which is very easy. Add file path for images, and if images not there, it won't error, and it will display icons etc when images are there.
However, in iOS seems to be a completely different story.
I found a couple of examples on line, but all seems too old, still using ALAsset which is obsolete.
Is there any updated examples of this?
how iOS handle when the images not there?
Can iOS locate images to load by "file name"? for example, app only knows file name, not file location or id. After user copied images with certain filenames into album, app will automatically pick them up.
Thanks in advance.
I'm seeing a crash on Android when the user presses the back button on their device while on the root MainPage of the application which happens to be a MasterDetail page. It looks to be the disposing of the Detail page that is the issue.
I'm using Xamarin.Forms 2.3.3-pre3 and building using Android 7.0 SDK.
Here is the stack trace:
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3819/96c7ba6c/source/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at Java.Interop.JniEnvironment+InstanceMethods.CallIntMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method) [0x00084] in /Users/builder/data/lanes/3819/5a02b032/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:11464
at Android.Runtime.JNIEnv.CallIntMethod (System.IntPtr jobject, System.IntPtr jmethod) [0x00000] in /Users/builder/data/lanes/3819/5a02b032/source/monodroid/src/Mono.Android/JNIEnv.g.cs:186
at Android.Support.V4.App.FragmentTransactionInvoker.CommitAllowingStateLoss () [0x00033] in <27c17fe440cf491ba8255bcefade6e02>:0
at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailContainer.Dispose (System.Boolean disposing) [0x00042] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailContainer.cs:130
at Java.Lang.Object.Dispose () [0x00000] in /Users/builder/data/lanes/3819/5a02b032/source/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:203
at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRenderer.Dispose (System.Boolean disposing) [0x00046] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailPageRenderer.cs:192
at Java.Lang.Object.Dispose () [0x00000] in /Users/builder/data/lanes/3819/5a02b032/source/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:203
at Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPage (Xamarin.Forms.Page newRoot) [0x0003f] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:226
at Xamarin.Forms.Platform.Android.AppCompat.Platform.Dispose () [0x00010] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:52
at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.OnDestroy () [0x0002f] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:195
at Android.App.Activity.n_OnDestroy (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in /Users/builder/data/lanes/3819/5a02b032/source/monodroid/src/Mono.Android/platforms/android-24/src/generated/Android.App.Activity.cs:2981
at (wrapper dynamic-method) System.Object:b4f537f5-a711-449c-9bf3-d2540956cdc2 (intptr,intptr)
--- End of managed Java.Lang.IllegalStateException stack trace ---
java.lang.IllegalStateException: Activity has been destroyed
at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1515)
at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:638)
at android.support.v4.app.BackStackRecord.commitAllowingStateLoss(BackStackRecord.java:621)
at md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsAppCompatActivity.n_onDestroy(Native Method)
at md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsAppCompatActivity.onDestroy(FormsAppCompatActivity.java:80)
at android.app.Activity.performDestroy(Activity.java:6866)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1153)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4154)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4185)
at android.app.ActivityThread.-wrap6(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1521)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Hi All,
I set entry text as a bindable property with ViewModel with TwoWay mode. Any idea how to configure it with a validator behavior so only when text is valid then binding would be enabled?
Right now I have following:
<Entry Text="{Binding Zone, Mode=TwoWay}" Placeholder="Type zone area">
<Entry.Behaviors>
<behaviors:ZoneValidatorBehavior x:Name="zoneValidator" />
</Entry.Behaviors>
</Entry>
-iKK
This is my code :
< ProgressBar Progress="0.5" WidthRequest="500" HeightRequest="15" HorizontalOptions="StartAndExpand" / >
Try and background, but I want to change the indicator color line progress
Hi there,
Has anyone used socket plugin from @RyanDavis to send and receive UDP packets? We have a requirement to use it to broadcast and receive data via UDP sockets on Xamarin Forms.
If anyone has used it in the above mentioned situation, kindly advice how to do this with socket plugin (sockets-to-pci) from @RyanDavis.
Essential I have been able to do this with python sockets (code below):
broadcast_ip = "192.168.1.255"
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
print('sending to: ', broadcast_ip, ' on: ', broadcast_port)
print('sending command: ', command)
s.sendto(command, (broadcast_ip, broadcast_port))
data = s.recvfrom(32) # buffer size is 1024 bytes
s.close()
print('data recv: ', data)
Need it to be find an equivalent for Xamarin Forms C#. Thank you.
JD
Hi All,
Please see my below code.
async void OnActionSheetSimpleClicked (object sender, EventArgs e)
{
var action = await DisplayActionSheet ("ActionSheet: Send to?", "Cancel", null, "Email", "Twitter", "Facebook");
Debug.WriteLine ("Action: " + action);
}
When I select Email I want to that selected value when DisplayActionSheet is close.
Can any one suggest how can i do that.
Hey, is it possible to capture photo from camera in background without showing it in application like redrawing from textureView? I mean to do something like notification or sth like this.
Thanks
Hello,
What is the order of execution of Behaviors, DataTriggers and Binding in Xamarin?
In one view I have:
1. Editor with custom behavior that implements some entered data validation
2. Data triggers that are bound to properties of custom behavior in order to change background color of Editor
3. Two way Binding that also shall change background of Editor from the View model.
I have unexpected behavior, and I can not tell for sure what is the order of execution of above mentioned.
Regards,
Novak
Hi,
I'm hunting memory leaks at the moment (in C++ time you knew you had to care for everything, now it's no longer clear)
On a 1GB Android Phone my App crashes with abouzt 70MB allocated private bytes. Is this normal?
I have read that you should call GC.Collect from time to time. How do you handle this?
Best
Thomas
Hi All,
Am getting the below error when trying some Forms2Native and Native2Forms witchcraft. Works OK elsewhere but was just wondering if anything jumps out at you that I may be doing incorrectly?
Essentially I need to have a Xamarin.Froms page, with a button that shows a Popover menu to select a user that is bound to the button on the toolbar. Then when clicked it should dismiss and change the data to the newly selected user.
Error is:
System.InvalidProgramException: Invalid IL code in ProjectName.vwClientMenu/c__AnonStorey7:<>m__0 (object,System.EventArgs): IL_0008: stfld 0x04000333
Code is:
`
btnDiary.TouchUpInside += (object sender, EventArgs e) => {
var pgDiary = App.GetCalendarPage(clsGlobal._clsLogin);
var vwDiary = pgDiary.CreateViewController();
vwDiary.Title = "Diary";
List<User> lstUsers = GetUserList();
List<string> lstUserCodes = GetUserCodeList(lstUsers);
List<string> lstUserNames = GetUserNameList(lstUsers);
clsGlobal.TrackEvent("Enter Diary (Forms)", pgDiary.DiaryAppointmentCount);
var bbiAdd = new UIBarButtonItem(UIBarButtonSystemItem.Add, (s, e1) =>{
})
{ Enabled = true };
var bbiUser = new UIBarButtonItem(UIBarButtonSystemItem.Organize);
bbiUser.Clicked += (object sender3, EventArgs e3) =>
{
pgListSelection pgForm = App.GetListSelection(lstUserNames);
var pgViewController = pgForm.CreateViewController();
pgViewController.ModalPresentationStyle = UIModalPresentationStyle.Popover;
pgViewController.PopoverPresentationController.BarButtonItem = bbiUser;
pgForm.ItemSelected += (int index) =>
{
pgViewController.DismissModalViewController(true);
bbiUser.Title = lstUserNames[index];
pgDiary.ChangeUser(lstUserCodes[index], lstUserNames[index]);
};
this.PresentViewController(pgViewController, true, null);
};
UIBarButtonItem[] bbis = new UIBarButtonItem[] { bbiUser, bbiAdd };
vwDiary.NavigationItem.RightBarButtonItems = bbis;
this.NavigationController.PushViewController(vwDiary, true);
};`
After upgrading my Xamarin.Forms 1.5.2 project to Xamarin.Forms 2.0.0.6484, I
keep getting the following exception whenever I try to access a page with a
Xamarin.Forms Map instance. See below.
I have tried to clean my project, deploying to a fresh Android emulator image
and debugging on a separate device. But it does not seem to be an issue related
to the platform running the app.
Is there any known solution to this isse?
Exception: Java.Lang.NoSuchMethodError:
com.google.android.gms.common.internal.zzx.zzv
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c]
in
/Users/builder/data/lanes/2098/3efa14c4/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at Android.Runtime.JNIEnv.CallStaticIntMethod (IntPtr jclass, IntPtr jmethod,
Android.Runtime.JValue* parms) [0x00064] in
/Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:1501
at Android.Gms.Maps.MapsInitializer.Initialize (Android.Content.Context
context) [0x00049] in <filename unknown>:0
at Xamarin.FormsMaps.Init (Android.App.Activity activity, Android.OS.Bundle
bundle) [0x0002b] in <filename unknown>:0
--- End of managed exception stack trace ---
java.lang.NoSuchMethodError: com.google.android.gms.common.internal.zzx.zzv
at com.google.android.gms.maps.internal.zzy.zzaF(Unknown Source)
at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
at md5470ba2f9164bfdf1461f905e050302df.MainActivity.n_onCre
ate(Native Method)
at
md5470ba2f9164bfdf1461f905e050302df.MainActivity.onCreate(MainActivity.java:28)
at android.app.Activity.performCreate(Activity.java:5231)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Unhandled Exception:
Java.Lang.NoSuchMethodError: com.google.android.gms.maps.MapView$zzb.zzrn
Hello,
I have a problem with ListView and MVVM pattern. This is my environment:
I started new Blank Xaml App (Xamarin.Forms Portable) and then I uncheck Windows Phone Silverlight 8.1 from portable library targets.
This is my model, RssSchema.cs
(nothing special, only some properties):
namespace Rss.Model
{
public class RssSchema
{
public string Id { get; set; }
public string Title { get; set; }
public string Summary { get; set; }
public string Content { get; set; }
public string ImageUrl { get; set; }
public string ExtraImageUrl { get; set; }
public string MediaUrl { get; set; }
public string FeedUrl { get; set; }
public string Author { get; set; }
public DateTime PublishDate { get; set; }
}
}
My view model, FeedViewModel.cs
with FeedTitle
and Items
properties. To test, in the constructor I fill Items
property with 3 RssSchema
objects:
namespace Rss.ViewModel
{
public class FeedViewModel : ViewModelBase
{
private ObservableCollection<RssSchema> items = null;
public ObservableCollection<RssSchema> Items
{
get { return this.items; }
set
{
if (this.items == value) { return; }
this.items = value;
this.RaisePropertyChanged(nameof(this.Items));
}
}
private string feedTitle = string.Empty;
public string FeedTitle
{
get { return this.feedTitle; }
set
{
if (this.feedTitle == value) { return; }
this.feedTitle = value;
this.RaisePropertyChanged(nameof(this.FeedTitle));
}
}
public FeedViewModel()
{
List<RssSchema> list = new List<RssSchema>();
for (int i = 0; i < 3; i++)
{
RssSchema item = new RssSchema();
item.Title = $"Title {i}";
list.Add(item);
}
this.Items = new ObservableCollection<RssSchema>(list);
this.FeedTitle = "My blog feed";
}
}
}
As I'm using MVVM Light I have a ViewModelLocator.cs
(nothing special, only Feed
property):
namespace Rss.ViewModel
{
public class ViewModelLocator
{
public ViewModelLocator()
{
ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
SimpleIoc.Default.Register<FeedViewModel>();
}
public FeedViewModel Feed
{
get
{
return ServiceLocator.Current.GetInstance<FeedViewModel>();
}
}
public static void Cleanup() { }
}
}
And I create an instace of it in App.xaml
:
<?xml version="1.0" encoding="utf-8"?>
<Application xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Rss.App"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
d1p1:Ignorable="d"
xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006">
<Application.Resources>
<ResourceDictionary>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" xmlns:d4p1="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:vm="clr-namespace:Rss.ViewModel" />
</ResourceDictionary>
</Application.Resources>
</Application>
Finally, this is my view, FeedPage.xaml
with one Label
and one ListView
:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Rss.Pages.FeedPage"
BindingContext="{Binding Source={StaticResource Locator}, Path=Feed}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Text="{Binding FeedTitle}" HorizontalOptions="Center"/>
<ScrollView Grid.Row="1" Padding="10">
<ListView ItemsSource="{Binding Items}" VerticalOptions="Start">
<!--<ListView.ItemTemplate>
<DataTemplate>
<Grid>
<Label Text="{Binding Title}"/>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>-->
</ListView>
</ScrollView>
</Grid>
</ContentPage>
The Label
shows the feed title, so the BindingContext
is properly set. As you can see I have the ListView.ItemTemplate
in comments. In this way when I run the app I see the 3 items with the default ToString()
value (the class complete name):
Rss.Model.RssSchema
Rss.Model.RssSchema
Rss.Model.RssSchema
You can imagine that I don't want to see this content, but if I uncomment the ListView.ItemTemplate
part and run the app I get this exception in runtime:
Unhandled Exception:
System.InvalidCastException: Specified cast is not valid.
Do you know what is happening?
Hi,
I have an issue that the DependencyService is not working in iOS, while the same works perfectly in Andorid and UWP.
Example code:
using System.IO;
using Foundation;
[assembly: Xamarin.Forms.Dependency(typeof(FontHelper))]
namespace Controls.iOS
{
public sealed class FontHelper : IFontHelper
{
public string GetFontPath(string fontName)
{
var fileName = Path.GetFileNameWithoutExtension(fontName);
var extension = Path.GetExtension(fontName);
return NSBundle.MainBundle.PathForResource(fileName, extension);
}
}
}
When calling var fontHelper = DependencyService.Get<IFontHelper>();
I only get a null
result.
Registering the service manually in AppDelegate.OnActivated(UIApplication uiApplication)
did not help either. I tried this variants:
DependencyService.Register<IFontHelper, FontHelper>();
DependencyService.Register<FontHelper>();
The same problem applies to ViewRenderer, which are declared as follows:
[assembly: Xamarin.Forms.ExportRenderer(typeof(TestView), typeof(TestViewRenderer))]
namespace Controls.iOS
{
[Preserve(AllMembers = true, Conditional = false)]
public sealed class TestViewRenderer : ViewRenderer<TestView, UIView>
{
[Preserve]
public TestViewRenderer()
{
}
}
}
Linker behavior
is set to Don't link
. Xamarin.Forms.Forms.Init(string[] assemblies)
method seems to be missing. However, the Application Output (NSLog) confirms that all necessarily assemblies got loaded. ViewRenderer
and EntryRenderer
seems to be missing. There is only the declarative method using the ExportRendererAttribute
. I am wondering if this is a problem with the DependencyService
or an mistake in the documentation.
Hi guys!
Well, here is my problem: I have a View containing some element whose type and number varry during the runtime. I want to set a tap gesture recognizer which would work no matter what's inside the view. For this reason I want to add a tap gesture recognizer to the "super" view, but, it seems to work properly only when I click outside the child views (in the margin and so on) which made me think that children's TapGestureRecognizers would not let the tap arrive to the parent...
Any ideas?
Hi
I have a listview with which should display a list of data, but for each view i have added an image to be added as a background.
I am using ffimageloading:CachedImage, with a URL source. It is rendering the images for some cells, but not others.
Below is a screenshot of what I am getting:
<ViewCell>
<ViewCell.View>
<Grid Padding="5, 0, 5, 10">
<Grid.HeightRequest>
<helpers:OnCustomPlatform
x:TypeArguments="x:Double"
iOS="180"
Android="200"
WinPhone="150"
Windows="160"/>
</Grid.HeightRequest>
<AbsoluteLayout>
<ffimageloading:CachedImage
Source="http://assets.fodors.com/destinations/1128/central-park-manhattan-new-york-city-new-york-usa_main.jpg"
Aspect="AspectFill"
CacheDuration="30"
CacheType="Disk"
DownsampleToViewSize="True"
AbsoluteLayout.LayoutFlags="All"
AbsoluteLayout.LayoutBounds="0, 0, 1.0, 1.0">
</ffimageloading:CachedImage>
</AbsoluteLayout>
</ViewCell.View>
</ViewCell>
Any ideas as to why this is happening?
I am Use Zxing for scanner the QR the Problem is Why the Button Text and Top Text is not show
Xamarin.Forms 2.3.3 depends on a Xamarin installation of Cycle 8. Users upgrading from Xamarin.Forms 2.3.2 (or earlier) will experience numerous compile errors if they attempt to build without first upgrading their Xamarin installation.
When upgrading Xamarin.Forms take care not to simply "update all" as that will update the Xamarin.Android.Support packages to an incompatible version. More info here.
FormsPresenter
instead of TabbedPagePresenter
. This is an internal change only that will only affect users explicitly targeting TabbedPagePresenter
in the UWP project.Nuget package here.
Add authenticode signing.
No other changes.
Nuget package here.
47707 - "47707 – Page.Toolbar is covering page.content with XF.UWP on Windows 10 phone" (PR)
47295 - "[UWP] Toolbar is Clipped When Using a NavigationPage" (PR)
Nuget package here.
Nuget package here.
44338 - "Displaying context action causes ArgumentNullException when another item's context actions are already displayed on iOS10." (PR)
"[Win] Toolbar placement works with initial value" (PR)
Nuget package here.
44129 - "[Forms Android] Removing and adding items to TabbedPage BindingContext crashes the app when VM uses MvvmLight property Set()-method" (PR)
44166 - "41166 - Fix MasterDetailPage/NavigationPage leaks on iPad" (PR)
43993 - "iOS: ListView size does not return to normal after keyboard disappears" (PR)
39768 - "PanGestureRecognizer sometimes won't fire completed event when dragging very slowly" (PR)
Nuget package here.
The following Xaml is valid, and works as expected:
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:ios="clr-namespace:UIKit;assembly=Xamarin.iOS;targetPlatform=iOS"
xmlns:androidWidget="clr-namespace:Android.Widget;assembly=Mono.Android;targetPlatform=Android"
xmlns:formsandroid="clr-namespace:Xamarin.Forms;assembly=Xamarin.Forms.Platform.Android;targetPlatform=Android"
xmlns:win="clr-namespace:Windows.UI.Xaml.Controls;assembly=Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime;targetPlatform=Windows"
x:Class="Xamarin.Forms.Controls.XamlNativeViews">
<ContentPage.Content>
<ios:UILabel Text="{Binding NativeText}" View.HorizontalOptions="Start"/>
<androidWidget:TextView Text="{Binding NativeText}" x:Arguments="{x:Static formsandroid:Forms.Context}" />
<win:TextBlock Text="Foo"/>
</ContentPage.Content>
</ContentPage>
UpdateSourceEventName
parameter to the binding expression.Introducing Platform Specifics! Features or behaviors that apply to one platform only can now be implemented without requiring custom renderers. These new features/behaviors can then be accessed easily via a fluent code API or XAML.
Vendors can easily add their own Platform Specifics by attaching Effects to them (see 63a924d and 1f9482e for complete example).
This feature implements the framework that enables the new API and also includes several examples of platform specific features, which can be previewed using the Platform Specifics gallery page:
Blur support for any VisualElement on iOS
Translucent navigation bar on iOS
32733 - "32733 – Switching Activity crash in 1.4.4.6392" (PR)
35132 - "35132 – Pages are not collected when using a Navigationpage"
Only internal. There were no public artifacts/nuget packages for pre1.
Hello all.
I have the following code, this one does not present errors, but it does not perform as desired, it connects in a good way to the bluetooth device but at the time of printing it does not, someone can tell me what to change or what to do to make this code Print me on my Intermec PR2 printer.
try
{
string bt_printer = (from d in adapter.BondedDevices
where d.Name == pStrNomBluetooth
select d).FirstOrDefault().ToString();
device = adapter.GetRemoteDevice(bt_printer);
UUID applicationUUID = device.GetUuids()[0].Uuid;
socket = device.CreateRfcommSocketToServiceRecord(applicationUUID);
socket.Connect();
outReader = new BufferedWriter(new OutputStreamWriter(socket.OutputStream));
outReader.Write(pStrTextoImprimir);
return "True";
}
catch (Exception ex)
{
return ex.Message;
}
finally
{
socket.Close();
}