Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all 58056 articles
Browse latest View live

TapGestureRecognizer on Map. I'm I actually this dumb?

$
0
0

I've dropped a TapGestureRecognizer onto a Map in hopes of being able to trigger a legend_close method. It doesn't trigger (iOS or Android).

    <AbsoluteLayout VerticalOptions="FillAndExpand"
                    HorizontalOptions="FillAndExpand">
        <renderers:OutageMap x:Name="OutageMap"
                             MapType="Street"
                             IsShowingUser="False"
                             HasZoomEnabled="True"
                             EnablePolygons="{Binding EnablePolygons}"
                             OutageSource="{Binding Outages}"
                             AbsoluteLayout.LayoutBounds="0, 0, 1, 1"
                             AbsoluteLayout.LayoutFlags="All">
          <renderers:OutageMap.GestureRecognizers>
            <TapGestureRecognizer Tapped="OnMapTapped_CloseLegend"></TapGestureRecognizer>
          </renderers:OutageMap.GestureRecognizers>
        </renderers:OutageMap>
      <controls:_OutageLegend AbsoluteLayout.LayoutBounds="0, 0, -1,-1"
                                AbsoluteLayout.LayoutFlags="PositionProportional"
                                x:Name="LegendContainer" />
      <ActivityIndicator IsRunning="{Binding IsBusy}"
                         IsVisible="{Binding IsBusy}"
                         AbsoluteLayout.LayoutBounds="0.5, 0.5, -1,-1"
                         AbsoluteLayout.LayoutFlags="PositionProportional"/>
    </AbsoluteLayout>

Since a map tracks touches in other ways, is this just not possible? I've looked around a bit, and the only thing I've found is an old bug in a NEEDINFO state.


Slow loading times when pushing a new ContentPage onto the Navigation stack

$
0
0

I am having a problem with a Xamarin Forms project running on Android tablets (any model). Between the time I tap on a list item, which calls Nav.PushAsync(App.Locator.MyView....) to the time the page is actually finished rendering is about 14 seconds. The page is a TabbedPage with 4 ContentPage children. One of the ContentPages is using a DevExpress GridControl, which has been 3 and 5 columns depending on the scenario.

There is no CPU intensive or long running database queries in the load. If I step over each line of my code they run close to instantly. It looks like Mono hill climbing, SKIA, and the GC_*** garbage collector is what is causing the performance issues.

The runtime keeps complaining that I'm skipping frames and doing too much work on the UI thread, but there is no code that is taking time to run. It's databinding a XAML layout to a ViewModel, using a DevExpress GridControl and I think that is what is running slowly. There is no other way to do the data binding on a background thread that I'm aware of.

This is the output from my debug window:

AccountsViewModel detaching barcode scanner event handlers...
[0:] AccountsViewModel detaching barcode scanner event handlers...
05-24 15:27:49.680 I/mono-stdout( 3687): AccountsViewModel detaching barcode scanner event handlers...
Thread started: #13
05-24 15:27:50.700 D/dalvikvm( 3687): GC_EXPLICIT freed 2330K, 30% free 12182K/17240K, paused 2ms+5ms, total 29ms
05-24 15:27:50.710 D/Mono ( 3687): GC_OLD_BRIDGE num-objects 38 num_hash_entries 77901 sccs size 46926 init 0.00ms df1 197.69ms sort 75.33ms dfs2 82.46ms setup-cb 11.38ms free-data 159.79ms links 157068/157068/97050/10 dfs passes 235007/203994
05-24 15:27:50.710 D/Mono ( 3687): GC_MINOR: (Nursery full) pause 210.91ms, total 211.11ms, bridge 0.00ms promoted 6192K major 6192K los 3068K
Attaching barcode scan events
[0:] Attaching barcode scan events
05-24 15:27:50.940 I/mono-stdout( 3687): Attaching barcode scan events
Refreshing serial cable devices on background thread...
[0:] Refreshing serial cable devices on background thread...
05-24 15:27:51.330 I/mono-stdout( 3687): Refreshing serial cable devices on background thread...
USB cable detached
[0:] USB cable detached
05-24 15:27:51.340 I/mono-stdout( 3687): USB cable detached
USB cable detached
[0:] USB cable detached
05-24 15:27:51.350 I/mono-stdout( 3687): USB cable detached
05-24 15:27:51.360 D/Mono ( 3687): [0x67bf6288] hill climbing, change max number of threads 4
05-24 15:27:51.420 I/Choreographer( 3687): Skipped 105 frames! The application may be doing too much work on its main thread.
05-24 15:27:51.480 D/skia ( 3687): Skia Error: Invalid Argument: I got -0.500000 and -0.500000 as radii to SkPath::AddRoundRect, but negative radii are not allowed.
05-24 15:27:51.490 D/skia ( 3687): Skia Error: Invalid Argument: I got -0.500000 and -0.500000 as radii to SkPath::AddRoundRect, but negative radii are not allowed.
05-24 15:27:51.490 D/skia ( 3687): Skia Error: Invalid Argument: I got -0.500000 and -0.500000 as radii to SkPath::AddRoundRect, but negative radii are not allowed.
05-24 15:27:51.500 D/skia ( 3687): Skia Error: Invalid Argument: I got -0.500000 and -0.500000 as radii to SkPath::AddRoundRect, but negative radii are not allowed.
05-24 15:27:51.510 D/skia ( 3687): Skia Error: Invalid Argument: I got -0.500000 and -0.500000 as radii to SkPath::AddRoundRect, but negative radii are not allowed.
05-24 15:27:51.510 D/skia ( 3687): Skia Error: Invalid Argument: I got -0.500000 and -0.500000 as radii to SkPath::AddRoundRect, but negative radii are not allowed.
5/24/2016 3:27:51 PM Refreshing Bluetooth DEX connection on background thread...
[0:] 5/24/2016 3:27:51 PM Refreshing Bluetooth DEX connection on background thread...
05-24 15:27:51.530 I/mono-stdout( 3687): 5/24/2016 3:27:51 PM Refreshing Bluetooth DEX connection on background thread...
Bluetooth not enabled, not going to ConnectAsync()
05-24 15:27:51.530 I/mono-stdout( 3687): Bluetooth not enabled, not going to ConnectAsync()
5/24/2016 3:27:51 PM Done loading Bluetooth DEX
05-24 15:27:51.530 I/mono-stdout( 3687): 5/24/2016 3:27:51 PM Done loading Bluetooth DEX
Thread started: #14
[0:] 5/24/2016 3:27:51 PM Done loading Bluetooth DEX
Thread started: #15
05-24 15:27:51.570 D/Mono ( 3687): [0x6b9589e0] worker starting
05-24 15:27:51.570 D/Mono ( 3687): [0x6b284490] worker starting
ServiceMachinePage OnPageAppearing()
[0:] ServiceMachinePage OnPageAppearing()
05-24 15:27:51.610 I/mono-stdout( 3687): ServiceMachinePage OnPageAppearing()
5/24/2016 3:27:51 PM LoadRestockAsync() starting ...
[0:] 5/24/2016 3:27:51 PM LoadRestockAsync() starting ...
05-24 15:27:51.710 I/mono-stdout( 3687): 5/24/2016 3:27:51 PM LoadRestockAsync() starting ...
05-24 15:27:52.600 D/dalvikvm( 3687): GC_EXPLICIT freed 219K, 23% free 13397K/17240K, paused 2ms+4ms, total 28ms
05-24 15:27:52.600 D/Mono ( 3687): GC_OLD_BRIDGE num-objects 62 num_hash_entries 97170 sccs size 56238 init 0.00ms df1 260.45ms sort 95.48ms dfs2 117.83ms setup-cb 13.77ms free-data 185.24ms links 201267/201267/224656/4 dfs passes 298499/257505
05-24 15:27:52.600 D/Mono ( 3687): GC_MINOR: (Nursery full) pause 278.15ms, total 278.37ms, bridge 0.00ms promoted 6848K major 6848K los 3741K
05-24 15:27:53.410 D/Mono ( 3687): GC_OLD_BRIDGE num-objects 62 num_hash_entries 97170 sccs size 56238 init 0.00ms df1 260.45ms sort 95.48ms dfs2 117.83ms setup-cb 13.77ms free-data 185.24ms links 0/0/0/0 dfs passes 0/0
05-24 15:27:53.410 D/Mono ( 3687): GC_MINOR: (Nursery full) pause 6.24ms, total 6.49ms, bridge 0.00ms promoted 7056K major 7056K los 3749K
05-24 15:27:54.160 D/Mono ( 3687): GC_OLD_BRIDGE num-objects 62 num_hash_entries 97170 sccs size 56238 init 0.00ms df1 260.45ms sort 95.48ms dfs2 117.83ms setup-cb 13.77ms free-data 185.24ms links 0/0/0/0 dfs passes 0/0
05-24 15:27:54.160 D/Mono ( 3687): GC_MINOR: (Nursery full) pause 10.31ms, total 10.55ms, bridge 0.00ms promoted 7472K major 7472K los 3789K
05-24 15:27:54.310 I/mono-stdout( 3687): SetupMicromarketGrid executed in 88.199 ms.
Loading service call grid
[0:] Loading service call grid
05-24 15:27:54.400 I/mono-stdout( 3687): Loading service call grid
LoadRestockAsync() took 2698.533 ms to load
[0:] LoadRestockAsync() took 2698.533 ms to load
05-24 15:27:54.410 I/mono-stdout( 3687): LoadRestockAsync() took 2698.533 ms to load
Opening barcode scanner...
[0:] Opening barcode scanner...
05-24 15:27:54.420 I/mono-stdout( 3687): Opening barcode scanner...
Opening scan API...
05-24 15:27:54.430 I/mono-stdout( 3687): Opening scan API...
Scan API opened
Attaching barcode scan events
05-24 15:27:54.430 I/mono-stdout( 3687): Scan API opened
[0:] Attaching barcode scan events
05-24 15:27:54.430 I/mono-stdout( 3687): Attaching barcode scan events
Thread started: ScanAPIHelperInit #16
Reading file contents license.json as string
05-24 15:27:54.440 I/mono-stdout( 3687): Reading file contents license.json as string
Scan API initialized!
Thread finished: ScanAPIHelperInit #16
05-24 15:27:54.450 I/mono-stdout( 3687): Scan API initialized!
ServiceMachinePage OnPageAppearing()
[0:] ServiceMachinePage OnPageAppearing()
05-24 15:27:54.470 I/mono-stdout( 3687): ServiceMachinePage OnPageAppearing()
5/24/2016 3:27:54 PM LoadRestockAsync() starting ...
[0:] 5/24/2016 3:27:54 PM LoadRestockAsync() starting ...
05-24 15:27:54.570 I/mono-stdout( 3687): 5/24/2016 3:27:54 PM LoadRestockAsync() starting ...
The thread 'Unknown' (0x10) has exited with code 0 (0x0).
05-24 15:27:57.360 D/dalvikvm( 3687): GC_EXPLICIT freed 684K, 21% free 13721K/17240K, paused 2ms+5ms, total 27ms
05-24 15:27:57.360 D/Mono ( 3687): GC_OLD_BRIDGE num-objects 78 num_hash_entries 116669 sccs size 67051 init 0.00ms df1 288.60ms sort 113.21ms dfs2 288.89ms setup-cb 16.34ms free-data 394.45ms links 241001/241001/1404038/21 dfs passes 357748/308052
05-24 15:27:57.360 D/Mono ( 3687): GC_MINOR: (Nursery full) pause 316.56ms, total 316.81ms, bridge 0.00ms promoted 8816K major 8816K los 5134K
05-24 15:27:58.220 D/Mono ( 3687): GC_OLD_BRIDGE num-objects 78 num_hash_entries 116669 sccs size 67051 init 0.00ms df1 288.60ms sort 113.21ms dfs2 288.89ms setup-cb 16.34ms free-data 394.45ms links 0/0/0/0 dfs passes 0/0
05-24 15:27:58.220 D/Mono ( 3687): GC_MINOR: (Nursery full) pause 6.35ms, total 6.57ms, bridge 0.00ms promoted 9056K major 9056K los 5134K
05-24 15:27:59.000 D/Mono ( 3687): GC_OLD_BRIDGE num-objects 78 num_hash_entries 116669 sccs size 67051 init 0.00ms df1 288.60ms sort 113.21ms dfs2 288.89ms setup-cb 16.34ms free-data 394.45ms links 0/0/0/0 dfs passes 0/0
05-24 15:27:59.000 D/Mono ( 3687): GC_MINOR: (Nursery full) pause 7.64ms, total 7.89ms, bridge 0.00ms promoted 9424K major 9424K los 5158K
05-24 15:27:59.150 D/Mono ( 3687): [0x6b284490] hill climbing, change max number of threads 5
SetupFoodOrMicromarketGrid executed in 1241.107 ms.
[0:] SetupFoodOrMicromarketGrid executed in 1241.107 ms.
05-24 15:28:00.320 I/mono-stdout( 3687): SetupFoodOrMicromarketGrid executed in 1241.107 ms.
Grid_SelectionChanged() 0
[0:] Grid_SelectionChanged() 0
05-24 15:28:00.570 I/mono-stdout( 3687): Grid_SelectionChanged() 0
LoadRestockAsync() took 6031.189 ms to load
[0:] LoadRestockAsync() took 6031.189 ms to load
05-24 15:28:00.600 I/mono-stdout( 3687): LoadRestockAsync() took 6031.189 ms to load
Opening barcode scanner...
05-24 15:28:00.630 I/mono-stdout( 3687): Opening barcode scanner...
[0:] Opening barcode scanner...
Opening scan API...
05-24 15:28:00.640 I/mono-stdout( 3687): Opening scan API...
Thread started: ScanAPIHelperInit #17
Scan API opened
05-24 15:28:00.650 I/mono-stdout( 3687): Scan API opened
Attaching barcode scan events
[0:] Attaching barcode scan events
05-24 15:28:00.650 I/mono-stdout( 3687): Attaching barcode scan events
Scan API initialized!
Thread finished: ScanAPIHelperInit #17
05-24 15:28:00.650 I/mono-stdout( 3687): Scan API initialized!
Reading file contents license.json as string
05-24 15:28:00.660 I/mono-stdout( 3687): Reading file contents license.json as string
The thread 'Unknown' (0x11) has exited with code 0 (0x0).
05-24 15:28:00.690 I/Choreographer( 3687): Skipped 545 frames! The application may be doing too much work on its main thread.
05-24 15:28:00.790 D/skia ( 3687): Skia Error: Invalid Argument: I got -0.500000 and -0.500000 as radii to SkPath::AddRoundRect, but negative radii are not allowed.
05-24 15:28:00.790 D/skia ( 3687): Skia Error: Invalid Argument: I got -0.500000 and -0.500000 as radii to SkPath::AddRoundRect, but negative radii are not allowed.
05-24 15:28:00.800 D/skia ( 3687): Skia Error: Invalid Argument: I got -0.500000 and -0.500000 as radii to SkPath::AddRoundRect, but negative radii are not allowed.
05-24 15:28:00.800 D/skia ( 3687): Skia Error: Invalid Argument: I got -0.500000 and -0.500000 as radii to SkPath::AddRoundRect, but negative radii are not allowed.
05-24 15:28:00.800 D/skia ( 3687): Skia Error: Invalid Argument: I got -0.500000 and -0.500000 as radii to SkPath::AddRoundRect, but negative radii are not allowed.
05-24 15:28:00.800 D/skia ( 3687): Skia Error: Invalid Argument: I got -0.500000 and -0.500000 as radii to SkPath::AddRoundRect, but negative radii are not allowed.
05-24 15:28:02.410 D/dalvikvm( 3687): GC_EXPLICIT freed 836K, 18% free 14243K/17240K, paused 2ms+5ms, total 29ms
05-24 15:28:02.420 D/Mono ( 3687): GC_OLD_BRIDGE num-objects 116 num_hash_entries 134092 sccs size 79636 init 0.00ms df1 332.88ms sort 172.36ms dfs2 406.29ms setup-cb 18.90ms free-data 426.90ms links 273887/273887/2380543/30 dfs passes 408095/353523
05-24 15:28:02.420 D/Mono ( 3687): GC_MINOR: (Nursery full) pause 364.93ms, total 365.13ms, bridge 0.00ms promoted 11024K major 11024K los 5855K
Thread started: #18
05-24 15:28:02.960 D/Mono ( 3687): [0x686d6a88] worker starting
05-24 15:28:02.970 I/Choreographer( 3687): Skipped 136 frames! The application may be doing too much work on its main thread.
05-24 15:28:03.160 D/Mono ( 3687): GC_BRIDGE waiting for bridge processing to finish
05-24 15:28:03.230 D/dalvikvm( 3687): GC_EXPLICIT freed 1377K, 20% free 13885K/17240K, paused 2ms+4ms, total 29ms
05-24 15:28:03.230 D/Mono ( 3687): GC_BRIDGE waiting for bridge processing to finish
05-24 15:28:03.230 D/Mono ( 3687): GC_OLD_BRIDGE num-objects 489 num_hash_entries 11591 sccs size 7202 init 0.00ms df1 27.42ms sort 9.40ms dfs2 8.81ms setup-cb 1.59ms free-data 17.23ms links 15292/15292/6732/3 dfs passes 27372/22494
05-24 15:28:03.230 D/Mono ( 3687): GC_MAJOR: (LOS overflow) pause 123.51ms, total 124.61ms, bridge 0.00ms major 9888K/0K los 469K/0K
05-24 15:28:03.240 D/Mono ( 3687): [0x6b1a9010] hill climbing, change max number of threads 4

Xamarin Forms in a TableSection create a row of buttons.

$
0
0

I am using the MasterDetailPage and have the data working between Master and Detail page. I need a row of buttons in a TableSection. The sample I am using Xamarin Field Engineer has a custom type of DataElementCell, that works, but I can't figure out how to create a similar ButtonCell. Is there an easier way to get a button in a TableSection, or am I on the right track just missing something? The goal is to use the DisplayActionSheet to take in new data.

Sleep and Thread

$
0
0

Hi,
There are methods Sleep() and "Invoke on MainThread" in Xamarin Forms ?
Thank you.

Want to change Content Page Application goes on OnSleeep Mode for iOS and Android

$
0
0

Hello Guys,

I Want set one default image application main screen when my application goes in Background (OnSleep Mode) for iOS and android using xamarin.Forms.

           public Page myPage;
    protected override async void OnSleep ()
    {
        myPage = App.Current.MainPage;
        Device.BeginInvokeOnMainThread (() => {
            App.Current.MainPage = new NavigationPage(new BaseClass());
        });

        System.Diagnostics.Debug.WriteLine ("Sleep");
    }

    protected override void OnResume ()
    {
        App.Current.MainPage = myPage;
        System.Diagnostics.Debug.WriteLine ("Resume");
    }

I'm trying with above code and it's working fine in iOS but not working for Android.
Please suggest some solution for Android.

Thanks

Change the title color of a Content Page through XML

$
0
0

Hello guys,

I am building an application testing and have the following code:

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="MenuLateral.Pages.MainPage" BackgroundColor="{StaticResource BackgroundColor}" Title="Meus Pedidos">

I want to change the title color through XML (as was done with the label), but I can not somehow. If it is not possible through XML, as do through C #? Can someone help me?

Date Picker Page doesn't shows up in Release Mode but it does in Debug Mode

$
0
0

Hi All,
I am using a date picker on my XF application,it works perfectly fine in Debug mode but the whole page remains blank in Release mode.Any Solutions?

load fonts from web on demand

$
0
0

I want to let the user choose the font in my xamarin forms application. I have around 16 fonts which size around 10 MB already my app size is too big this will cause more size. Is there anyway I can download fonts when user want to change the font ? please help.


Forms - Mobile Services Client - Detecting Changes

$
0
0

I am building a Xamarin Forms app that is utilizing mobile services for the local data store and syncing purposes. As of now that is all clear and working. From the client I want to be able to fire events when new changes are pulled down via PullAsync but only when i've received new changes. What is the best way to check that new changes have been received? Is there an efficient way?

How can i move the Tabbed page Bar to the bottom ?

$
0
0
<?xml version="1.0" encoding="UTF-8"?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:AndroidXamarin;assembly=AndroidXamarin" x:Class="AndroidXamarin.SafetyMenu">
  <local:SignUpCS Icon="fb_checked.png"/>
     <local:MainPage Icon="a.png" />
     <NavigationPage>
     <local:MenuPage />
    </NavigationPage>

    <local:MainPage />

</TabbedPage>

GestureRecognizers Not working on Map

$
0
0

I need to do something when user click on map, so is there any why to trigger events when user click on map. I am trying with GestureRecognizers Tapped event but this event does not fire. I write following code in xaml file.


<maps:Map.GestureRecognizers>

</maps:Map.GestureRecognizers>

in .cs file i have following code to visible stacklayout when user click on map.
private void MapGestureRecognizer_OnTapped(object sender, EventArgs e)
{
StackLayoutMapZoom.IsVisible = true;
}

Windows Phone back button bug?

$
0
0

Hi, in Windows Phone canceling the OnBackKeyPress event doesn't prevent backward navigation. I think this is either a bug, or a crappy feature:

Example (Windows Phone MainPage.xaml.cs):

protected override void OnBackKeyPress(CancelEventArgs e)
{
     e.Cancel = true;
}

Is there a workaround or preferred method for canceling NavigationPage.Popped in response to a back button press?

Thanks,
Gabe

Binding Converter for Custom ViewCell

$
0
0

Hi,

I am trying to Convert the Color from string to Color as mentioned in stringtocolorconverter for xamarinforms link and its working fine with Content Page.

When we try to use the same with ViewCell, it throws the exception as "{Xamarin.Forms.Xaml.XamlParseException: Position 7:6. No Property of name Resources found"

ViewCell Code:

<?xml version="1.0" encoding="utf-8" ?>
<ViewCell xmlns="http://xamarin.com/schemas/2014/forms"
          xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
          xmlns:locals="clr-namespace:UserControlSample;assembly=UserControlSample"
          x:Class="UserControlSample.UCViewCell">
  <ViewCell.Resources>
    <ResourceDictionary>
      <locals:StringToColorConverter x:Key="stringToColorConverter"/>
    </ResourceDictionary>
  </ViewCell.Resources>
  <!--<ViewCell.BindingContext>
    <locals:StringToColorConverter x:key="stringToColorConverter"/>
  </ViewCell.BindingContext>-->
  <StackLayout VerticalOptions="FillAndExpand" Orientation="Vertical">
    <Grid Padding="0,5,0,5">
      <Grid.RowDefinitions Padding="0,3,0,3">
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>
      <Label x:Name="lblItemtemplate6" Text = "{Binding Itemtemplate6Text}" HorizontalOptions="FillAndExpand" VerticalOptions="Center" Grid.Row="0" Grid.Column="0" />

      <!--EndBarColor = #FF8B66 and its working fine with Content Page-->
      <StackLayout x:Name="stkl_SearchEnd" IsVisible="False"  BackgroundColor="{Binding EndBarColor, Converter={StaticResource stringToColorConverter}}"
          HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Grid.Row="1" Grid.Column="0" >
      </StackLayout>
    </Grid>
  </StackLayout>
</ViewCell>

Can anybody help on this to achieve the expected?

Does anyone know how to publish Xamarin Forms for iOS from Visual Studio

$
0
0

Invalid value for 'TargetFrameworkVersion'. This error has been plaguing me for the last 2 days. I've googled and googled and nothing turns up. There is absolutley no video/document/forum post which explains details steps on deploying iOS apps using Xamarin Forms. Is it even possible? Or should I just give up working on Xamarin. Being a C# developer who has been developing WPF apps and Asp.Net mvc websites for the last 10 years I'm a little sad. Can someone help please.......................

On Android phone with small screen not all items in stacklayout are displayed

$
0
0

Hi,
I am building a cross-platform Xamarin forms application. One of the pages is a data entry form with a stack layout that contains 6 views (datepicker, pickers, an entry and a switch) and at the bottom some buttons in a grid for saving or cancelling. On a 5 inch android screen this all displays fine. On a smaller screen, the buttons are not displayed. I thought all views would resize to fit on the screen, but apparently not? Please help.
Bert-Jan


Peer-to-peer communication between Xamarin.Forms apps

$
0
0

With users typically having both a smartphone and a tablet, and now even having wearables, I am curious about which technologies can be used to have Xamarin.Forms apps on these different devices (iOS, Android, Windows) communicating with each other, both with and without separate servers.

Without separate servers, I am particularly interested in locating any samples that show how to code peer-to-peer communications (whether Bluetooth or otherwise) between nearby devices, such as a tablet communicating with a phone, or a phone with a wearable etc. Ideally, I would be looking for something that allows nearby (let’s say in the same room) devices to communicate even if in a dead-zone for mobile signals.

Any thoughts or samples much appreciated.

Regards,

John H.

Can I use Entity Framework 6 in Xamarin.Forms?

$
0
0

I have a legacy WPF project that uses Entity Framework to consume Sqlite database, and I want to transfer it to a mobile app with Xamarin. Is it possible to use Entity Framework 6 or any type of ORM easily in Xamarin, or XaSQLite.Net is the only way to consume Database in Xamarin?

Many thanks,

Wei

UI layouts question

$
0
0

Hi folks,

I had this xaml code in an old Android app:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/widget28"
    android:layout_width="fill_parent"
    android:layout_height="150px">
    <ImageView
        android:id="@+id/BOLLogo"
        android:layout_width="100px"
        android:layout_height="100px"
        android:layout_gravity="center_vertical" />
    <LinearLayout
        android:id="@+id/linearText"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        android:layout_marginLeft="10px"
        android:layout_marginTop="10px">
        <TextView
            android:id="@+id/BOLLine1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <TextView
            android:id="@+id/BOLLine2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <TextView
            android:id="@+id/BOLLine3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
        <TextView
            android:id="@+id/BOLLine4"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>
</LinearLayout>

I'm trying to port it into a XamarinForms Shared Project as a DataTemplate. Please can you help me to port? I have tried with grid but it is confusing

Cheers

How can i keep the Tab bar static throughout the App?

$
0
0
public partial class TabbedPageTwo : TabbedPage
{
    public TabbedPageTwo()
    {

        Children.Add(new SignUpCS());
        Children.Add(new MapPage());
        Children.Add(new SafetyMenu());
        Children.Add(new SignUpCS());
        InitializeComponent();
    }
}

Xamarin.Forms XAML onPlatform for windows desktop?

$
0
0

Hi everyone!

I am trying to show an Image in my Xamarin.Forms app using a resourcedictionary directly in my XAML file.

I use onPlatform to set where the image is for ios, android and winphone.

I also want this to work on Windows platform (desktop UWP) but I do not know how to do this.

Tried to use Onplatform Default but it's not working.

Here is my XAML code: (Sorry tried to paste code but for some reason some blocks of code did not show up when posting)

Thank you and sorry for my English.

Viewing all 58056 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>