Hi guys ... a simple question : Could we have a masked image in xamarin forms ?? is it possible ?? in another word ... could we show an image inside an irregular shape ?
Masked Image
Change Tabbed Page From Button
Hello,
I was currently working with Tabbed Page :
<?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:me="clr-namespace:Let_s_go_out.Views.Pages;assembly=Let_s_go_out"
x:Class="Let_s_go_out.Views.MainPage"
>
<TabbedPage.Children >
<me:PlacesList />
<me:PlaceSearch />
</TabbedPage.Children>
</TabbedPage>
And in the PlaceSearch content I have a button :
<StackLayout Grid.Row="9" Orientation="Horizontal" > <Button Text="Rechercher" HorizontalOptions="Center" VerticalOptions="Center" Command="{Binding Search}"></Button> </StackLayout>
So my question is : How I can go on the "PlaceList" Tabbed page when the Button is clicked ?
Thanks
Universal Links not working in my Xamarin.Forms iOS app
I followed these instructions, but I can't get my app to respond when clicking on specific web links.
https://xamarinhelp.com/ios-universal-links/
Here is my apple-app-site-association file. It has no extension. The file downloads when I access it with Google Chrome using a link like this. https://portal.mydomain.com/.well-known/apple-app-site-association
{
"applinks": {
"apps": [],
"details": [
{
"appID": "MYAPPID.com.mydomain.appname",
"paths": [ "/PublicOffers/OffersPage" ]
}
]
}
}
Here are my applink settings.
applinks: portal.mydomain.com
Here are URL examples.
https://portal.mydomain.com/PublicOffers/OffersPage?id=SOMEGUID&cid=SOMEGUID
https://portal.mydomain.com/PublicOffers/OffersPage/SOMEGUID
When in Debug mode, I've noticed that ContinueUserActivity and OpenUrl never get called.
Here is my current development environment. I'm in the process of configuring a newer MacBook Pro, but at this time I'm connecting to an older MacBook running XCode 8.2.1 (can't go any higher).
Microsoft Visual Studio Enterprise 2015
Version 14.0.25422.01 Update 3
Microsoft .NET Framework
Version 4.7.02556
Installed Version: Enterprise
Xamarin 4.3.0.789 (4d2ed3d)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.iOS 10.4.0.128 (ba11e48)
Visual Studio extension to enable development for Xamarin.iOS.
Any ideas why this is not working? Thanks!
How to block the resizing of the application view in uwp?
Hello, is it possible to prevent the user in UWP from being able to modify the size of the window? Is there a way to configure a minimum size of the application view or otherwise, is it possible to configure that the UWP application is always in full screen? thank you.
draw a dot on image
Does any one know how to add a dot on an image?
In xml file, I use to display a image, now I want to add a dot on this image by giving a x, y value and directly draw a dot at the location I want.
Anyone know how to achieve this?
Rare behavior of the stack layout
Hi, i'm using SfDataform plugin, from h ttps /www.syncfusion.co m .
when I launch the application, the layout gives error, but when I upload an image, it is fixed, could anyone know what is happening?
Video Error: http s://youtu.be/ gXgzqnWh39A (i can't post links, so please, put together) hoping this video helps to clear up the problem
Code:
<ContentPage.BindingContext>
<local:CrearEventoVM/>
</ContentPage.BindingContext>
<ContentPage.Resources>
<local1:GooglePlaceVM x:Key="googleplace"/>
<ResourceDictionary>
<DataTemplate x:Key="itemTemplate">
<StackLayout Orientation="Horizontal">
<Label Text="{Binding Address}" TextColor="Black" LineBreakMode="TailTruncation"/>
</StackLayout>
</DataTemplate>
</ResourceDictionary>
</ContentPage.Resources>
<ContentPage.Content>
<ScrollView>
<StackLayout>
<Grid IsVisible="{Binding ImageVisible}">
<Grid.RowDefinitions>
<RowDefinition Height="100" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="8*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image
Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
VerticalOptions="Fill"
x:Name="image"
Aspect="AspectFill"
BackgroundColor="Gray" IsVisible="{Binding ImageVisible}">
<Image.GestureRecognizers>
<TapGestureRecognizer Tapped="Button_TouchImage" Command="{Binding TouchImageCommand, Mode=TwoWay}">
</TapGestureRecognizer>
</Image.GestureRecognizers>
</Image>
<Label
Grid.Row="0" Grid.Column="1"
TextColor="Black"
Text="X"
FontSize="30"
HorizontalTextAlignment="Center" HorizontalOptions="End"
IsVisible="{Binding DeleteImageVisible, Mode=TwoWay}">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="Button_DeleteImage" Command="{Binding DeleteImageCommand}">
</TapGestureRecognizer>
</Label.GestureRecognizers>
</Label>
</Grid>
<BoxView Color="Gray" Grid.Row="0" VerticalOptions="Fill" IsVisible="{Binding BoxViewVisible, Mode=TwoWay}">
<BoxView.GestureRecognizers>
<TapGestureRecognizer Tapped="Button_TouchImage" Command="{Binding TouchImageCommand}">
</TapGestureRecognizer>
</BoxView.GestureRecognizers>
</BoxView>
<Entry x:Name="asd" ></Entry>
<autocomplete:SfAutoComplete VerticalOptions="Fill" x:Name="autoComplete"
BindingContext="{Binding Source={StaticResource googleplace}}"
DropDownItemHeight="35"
HeightRequest="50"
LoadMoreText="Ver Más."
MaximumSuggestion="4"
HighlightedTextColor="Red"
ClearButtonColor="Red"
DisplayMemberPath="Address"
ImageMemberPath="ImageIcon"
SuggestionBoxPlacement="Bottom"
ItemTemplate="{StaticResource itemTemplate}"
SelectionChanged="Selection_Changed"
MultiSelectMode="Token"
FocusChanged="AutoComplete_FocusChanged"
SuggestionMode="Custom"
ValueChanged="AutoComplete_TextChanged"
Watermark="Busque por curso, grupo o persona."
NoResultsFoundText="Sin Resultados"
Text="{Binding AddressText}"
DataSource="{Binding Addresses, Mode=TwoWay}">
</autocomplete:SfAutoComplete>
<dataForm:SfDataForm x:Name="dataForm" LabelPosition="Top"
DataObject="{Binding ContactsInfo}" VerticalOptions="FillAndExpand"/>
<Button VerticalOptions="End" Clicked="Button_Guardar_Todo" Text="Guardar"/>
</StackLayout>
</ScrollView>
</ContentPage.Content>
~~~~
Sorry for my bad english
How to resolve errors in Resource.designer.cs when building for Android
My Android build has been reporting errors in Resource.designer.cs, an automatically generated file. The errors result from a full-stop (aka period) being in a couple of entries in the .cs file, as per the image below.
If I look in G:\tfs\myapp\myapp\AndroidForForms\AndroidForForms.Android\Resources\Resource.designer.cs
I see:
// aapt resource value: 0x7f0b008c
public const int bottomtab_navarea = 2131427468;
// aapt resource value: 0x7f0b008d
public const int bottomtab_tabbar = 2131427469;
But if I look in G:\tfs\myapp\myapp\AndroidForForms\AndroidForForms.Android\obj\Debug\81\designtime\Resource.designer.cs
I see the erroneous
// aapt resource value: 0x7F030180
public const int bottomtab.navarea = 2130903424;
// aapt resource value: 0x7F030181
public const int bottomtab.tabbar = 2130903425;
Any idea what might be causing this, and how I can fix it? (it was happening before I changed my PCLs to .Net Standard 2, and is still happening afterwards)
Can we create a custom callout like grid in xamrin.forms. Please provide me an example Ask
The map callout should appear as a grid which shows the all the attributes of feature tabbed in web map view and we can edit the features too.
How to hide a stack layout when scrolling up in the listview?
Proper format for date
I try to follow the instructions for format for date but I am getting error here is my code
Label Text="{Binding Date, StringFormat='{0:MMMM dd, yyyy}'}">
because I tried it and it has blue lines below 0, dd and yyyy
Is there a way to render the Zxing ScannerPage in Xaml?
I'm using the MVVM approach to make a small scanner app. I have a startPage.Xaml with one button binded to a command in the viewModel that opens my scannerPage.Xaml On the scannerPage I have just a simple footer, and want the scanner object to fill the rest of the page. However, when I add the scanner object to my stackPanel I get the following exception: "System.MissingMethodException: Default constructor not found for type ZXing.Net.Mobile.Forms.ZXingScannerPage". I'll list my xaml code below. Any help will be much appreciated. Thanks
<?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:forms="clr-namespace:ZXing.Net.Mobile.Forms;assembly=ZXing.Net.Mobile.Forms"
xmlns:custom="using:MobiNative_Forms.Views"
x:Class="MobiNative_Forms.Views.BarcodePage"
BackgroundColor="Transparent">
<ContentPage.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="8.5*" />
<RowDefinition Height="1.5*" />
</Grid.RowDefinitions>
<StackLayout x:Name="layout2" Grid.Row="0" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
<forms:ZXingScannerPage></forms:ZXingScannerPage>
</StackLayout>
<Label Grid.Row="1" Text="MOBI" FontSize="Large" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" BackgroundColor="Blue"/>
</Grid>
</ContentPage.Content>
</ContentPage>
How to mix the pinch and pan gesture for image control together?
I try to mix the pinch and pan gesture code (https://developer.xamarin.com/samples/xamarin-forms/WorkingWithGestures/PinchGesture/ and https://developer.xamarin.com/samples/xamarin-forms/WorkingWithGestures/PanGesture/) for my image control but failed. The image just acting weirdly while zooming/panning. I think some of the code are conflicting in the OnPinchUpdated and OnPanUpdated fucntions.
My PinchToZoomAndPanContainer class is shown below:
public class PinchToZoomAndPanContainer : ContentView
{
double currentScale = 1;
double startScale = 1;
double xOffset = 0;
double yOffset = 0;
double x, y;
public PinchToZoomContainer()
{
var pinchGesture = new PinchGestureRecognizer();
pinchGesture.PinchUpdated += OnPinchUpdated;
GestureRecognizers.Add(pinchGesture);
var panGesture = new PanGestureRecognizer();
panGesture.PanUpdated += OnPanUpdated;
GestureRecognizers.Add(panGesture);
}
void OnPinchUpdated(object sender, PinchGestureUpdatedEventArgs e)
{
if (e.Status == GestureStatus.Started)
{
// Store the current scale factor applied to the wrapped user interface element,
// and zero the components for the center point of the translate transform.
startScale = Content.Scale;
Content.AnchorX = 0;
Content.AnchorY = 0;
}
if (e.Status == GestureStatus.Running)
{
// Calculate the scale factor to be applied.
currentScale += (e.Scale - 1) * startScale;
currentScale = Math.Max(1, currentScale);
// The ScaleOrigin is in relative coordinates to the wrapped user interface element,
// so get the X pixel coordinate.
double renderedX = Content.X + xOffset;
double deltaX = renderedX / Width;
double deltaWidth = Width / (Content.Width * startScale);
double originX = (e.ScaleOrigin.X - deltaX) * deltaWidth;
// The ScaleOrigin is in relative coordinates to the wrapped user interface element,
// so get the Y pixel coordinate.
double renderedY = Content.Y + yOffset;
double deltaY = renderedY / Height;
double deltaHeight = Height / (Content.Height * startScale);
double originY = (e.ScaleOrigin.Y - deltaY) * deltaHeight;
// Calculate the transformed element pixel coordinates.
double targetX = xOffset - (originX * Content.Width) * (currentScale - startScale);
double targetY = yOffset - (originY * Content.Height) * (currentScale - startScale);
// Apply translation based on the change in origin.
Content.TranslationX = targetX.Clamp(-Content.Width * (currentScale - 1), 0);
Content.TranslationY = targetY.Clamp(-Content.Height * (currentScale - 1), 0);
// Apply scale factor
Content.Scale = currentScale;
}
if (e.Status == GestureStatus.Completed)
{
// Store the translation delta's of the wrapped user interface element.
xOffset = Content.TranslationX;
yOffset = Content.TranslationY;
}
}
void OnPanUpdated(object sender, PanUpdatedEventArgs e)
{
switch (e.StatusType)
{
case GestureStatus.Running:
// Translate and ensure we don't pan beyond the wrapped user interface element bounds.
Content.TranslationX = Math.Max(Math.Min(0, x + e.TotalX), -Math.Abs(Content.Width - App.ScreenWidth));
Content.TranslationY = Math.Max(Math.Min(0, y + e.TotalY), -Math.Abs(Content.Height - App.ScreenHeight));
break;
case GestureStatus.Completed:
// Store the translation applied during the pan
x = Content.TranslationX;
y = Content.TranslationY;
Debug.Write("x=" + x.ToString() + " y=" + y.ToString());
break;
}
}
}
I noticed that the way to instantiate this PinchToZoomAndPanContainer class is a little bit different in the sample code from my above hyperlinks, pinch is put in a Grid, while pan is put in an AbsoluteLayout. I tried both for my code, but neither works. I would really appreciate it very much if someone can help me fix it.
Hello.I creat app that add an item to list but when i close app it gone.how can i save it.help

TabbedPage switching page with button
Hi guys,
I am looking for how to change pages(on tabbedPage) with a button
My tabbedPage (XAML)
i try something like this :
My button:
But no result..
thx in advance
Not able to create a xaml file properly
Hi,
I am not able to create xaml file properly .I am getting cross sign after creating the xaml file,Can anyone provide a solution for this. Please find a attached screenshot here
TabbedPage Pop to Main page
So I have an app that has a LoginPage which is a simple NavigationPage and after the credentials are validated I have a TabbedPage as a MenuPage and when I want to log out it dosen`t do anything, here is my code:
private async void ButtonLogout_Pressed(object sender, EventArgs e) { await Navigation.PopAsync(); }
I also tried PopToRootAsync
Is there any Bluetooth plugin for Xamari.Forms? Not Bluetooth LE.
I want to creat an application to connect a Bluetooth 2.0 device, I had tried to use a Bluetooth LE plugin for Xamarin in my project but it doesn't help.
Looking to add Intercom to a professional app
Greetings everyone.
Is there anyway to add intercom to my xamarin.forms application? I have tried a lot but I couldn't find a way to add it to my project. They don't offer official support and some third party libraries I tried did't help either. Has anybody done it before? If not, are there any compatible alternative choices?
Thanks in advance.
System Crash when I swipe to Delete a ListView item and then Select another Item
Latest stable version of Xamarin.Forms and Visual Studio 2019.
Stack trace shows error originates in Xamarin.Forms.Platform.iOS.ContextScrollViewDelegate. I did some research and it shows this bug was fixed long ago.
Is there a fix for this?
Stack Trace:
[0:] Outer
[0:] Outer.Message: Object reference not set to an instance of an object
[0:] Outer.Source: Xamarin.Forms.Platform.iOS
[0:] Outer.StackTrace: at Xamarin.Forms.Platform.iOS.ContextScrollViewDelegate+<>c__DisplayClass25_0.b__1 (UIKit.UIGestureRecognizer recognizer, UIKit.UIGestureRecognizer r) [0x00000] in \a\1\s\Xamarin.Forms.Platform.iOS\ContextScrollViewDelegate.cs:178
at UIKit.UIGestureRecognizer+_UIGestureRecognizerDelegate.ShouldRecognizeSimultaneously (UIKit.UIGestureRecognizer gestureRecognizer, UIKit.UIGestureRecognizer otherGestureRecognizer) [0x0000a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.10.0.153/src/Xamarin.iOS/UIKit/UIGestureRecognizer.g.cs:908
at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.10.0.153/src/Xamarin.iOS/UIKit/UIApplication.cs:86
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.10.0.153/src/Xamarin.iOS/UIKit/UIApplication.cs:65
at XamAppGrandLife.iOS.Application.Main (System.String[] args) [0x00002] in C:\Development\GLH\Administration\XamAppGrandLife\XamAppGrandLife.iOS\Main.cs:15
Xamarin.Forms on IOS - DidReceiveRemoteNotification doesn't execute code
In my Xamarin application where I have implemented push-notifications, I have some executeable code in the DidReceiveRemoteNotification function. The function is not being called when I receive a notification while the application is running on the background, but when I press the received notification in the notification bar then the DidReceiveRemoteNotification function runs. How can I run DidReceiveRemoteNotification right when I receive a notification instead of pressing on the notification to make that function run?
public override void DidReceiveRemoteNotification(UIApplication application,
NSDictionary userInfo, Action completionHandler)
{
//executeable code
}