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

WebView Inside a ScrollView not working

$
0
0

Hi,

I have a simple WebView inside a ScrollView but the problem it's not scrolling anything.

here is my code:

<ScrollView Grid.Row="0">
    <Grid Grid.Row="0" RowSpacing="0">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <SyncfusionRotator:SfRotator x:Name="RotatorAdDetails" Grid.Row="0" EnableLooping="False" EnableAutoPlay="False" NavigationDelay="4000" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
            <SyncfusionRotator:SfRotator.HeightRequest>
                <OnIdiom x:TypeArguments="x:Double" Phone="300" Tablet="400" />
            </SyncfusionRotator:SfRotator.HeightRequest>
            <SyncfusionRotator:SfRotator.ItemTemplate>
                <DataTemplate>
                    <StackLayout ClassId="{Binding user_guid}">
                        <FFImageLoading:CachedImage Source="{Binding media_file}" ClassId="{Binding ad_guid}" LoadingPlaceholder="AdPlaceholder.png" FadeAnimationEnabled="True" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Aspect="AspectFill" DownsampleToViewSize="true">
                        </FFImageLoading:CachedImage>
                    </StackLayout>
                </DataTemplate>
            </SyncfusionRotator:SfRotator.ItemTemplate>
        </SyncfusionRotator:SfRotator>

        <WebView x:Name="WebViewAdDetailsDescription" Grid.Row="1" Margin="5" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" />
    </Grid>
</ScrollView>

How can I fix that please?

Thanks,
Jassim


How to put two or more text in a same label?

$
0
0

I want to put in the same label something like this --> $ 300.56 where this symbol "$" its always a constant and just the number change with {Binding Price} for example. Can I do something like that? or just have to use to different labels, one for the symbol and the other for the price(??

Handle focus on entry in custom made autocomplete

$
0
0

I have made a autocomplete control - but are not completely happy with how the unfocus of the entry happens

The actual autocomplete consists of a scrollview. Slow dragging inside the ScrollView works, but swipe/swipedragging more aggressively like you would do in a ListView - makes the Entry lose focus. The Autocomplete then closes as I have programmed it to be.

Is there some way I could manually handle the deselection of the entry when the user is interacting with the autocomplete (inside the scrollview)?

EfganHuseynov

$
0
0

in 1st Xaml Page selected Picker item (Country) I want to Bind 3rd Xaml Page ...
Please help me!!

Mono.AndroidTools.RequiresUninstallException: The installed package is incompatible.

$
0
0

When I change the target version from android 9 to 10, everything works fine deploying on a device hasn't got the previous version of the app but I have on my phone installed previous version and I am getting below error message.

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(607,2): error ADB1000:  Deployment failed
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(607,2): error ADB1000: Mono.AndroidTools.RequiresUninstallException: The installed package is incompatible. Please manually uninstall and try again.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(607,2): error ADB1000:   at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess (System.String output, System.String packageName) [0x00136] in /Users/runner/runners/2.159.2/work/1/s/external/monodroid/tools/msbuild/external/androidtools/Mono.AndroidTools/Internal/AdbOutputParsing.cs:339 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(607,2): error ADB1000:   at Mono.AndroidTools.AndroidDevice+<>c__DisplayClass95_0.<InstallPackage>b__0 (System.Threading.Tasks.Task`1[TResult] t) [0x00016] in /Users/runner/runners/2.159.2/work/1/s/external/monodroid/tools/msbuild/external/androidtools/Mono.AndroidTools/AndroidDevice.cs:753 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(607,2): error ADB1000:   at System.Threading.Tasks.ContinuationTaskFromResultTask`1[TAntecedentResult].InnerInvoke () [0x00024] in <8786ba7ca96d408c8c0d5c5e15ea3164>:0 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(607,2): error ADB1000:   at System.Threading.Tasks.Task.Execute () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-08/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(607,2): error ADB1000: --- End of stack trace from previous location where exception was thrown ---

anyone else seeing this error. it worries me if I make a new release on google play store and existing users will not able to update the app.
I found below report but I am not sure if that should be VS 2019 issue or Xamarin issue.

https://developercommunity.visualstudio.com/content/problem/790804/marjor-issue-on-new-builds.html

Xamarin.forms Firebase analystics.

$
0
0

I have implemented Firebase analytics tool in Xamarin.forms application, and i unable to create custom event

**public partial class FeedPage : ContentPage
{
IFirebaseAnalytics eventTracker;
public FeedPage()
{
InitializeComponent();
eventTracker = DependencyService.Get();
}

    void Handle_Clicked(object sender, System.EventArgs e)  
    {  
        eventTracker.SendEvent("Click1");   // Custom event 
    }  
}**

This custom event throw the error System.NullReferenceException: 'Object reference not set to an instance of an object.'

What can I put into the blue area at top of app?

$
0
0

There's a blue rectangle above my first control in my pages. My question is whether I can put things, for example a menu or picture. Also, what is this are called? Here, the Xaml for my opening page (the blue rectangle is above the label with the text "Welcome to Rodney Pix":

<?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:local="clr-namespace:TestXamarinFormsProject"

         x:Class="TestXamarinFormsProject.MainPage">

<ScrollView>
    <StackLayout  x:Name="sl" Orientation="Vertical">
        <Label Text="Welcome to Rodney Pix" HorizontalOptions="Center"
       VerticalTextAlignment="Start" VerticalOptions="Start"></Label>

        <ListView x:Name="lstDirectories" ItemTapped="LstDirectories_ItemTapped"
                  SelectedItem="{Binding SelectedListItem,Mode=TwoWay}">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <ViewCell>

                        <StackLayout Padding="5" Orientation="Horizontal">
                            <Label Text="{Binding FriendlyDirectoryName}" TextColor="Black"/>
                        </StackLayout>

                    </ViewCell>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>

    </StackLayout>

</ScrollView>


why navigation between pages in xamarin forms is slow on Android


Can I have more than one ResourceDictionary?

$
0
0

I have now one ResourceDictionary with all my styles for buttons, frames, labels.. etc.
but I want to have now two or more then I would choose one of then to use.

CarouselPage: How to move to other page clicking on a button in the nav bar?

$
0
0

this is my CarouselPage:

My first page

If I slide "Right to left"

Goes to my second page

I want to move from the first page to the second in the same way as now but also clicking on that button (shopping cart) and if I click it send me to the other. That's possible?

how do i make xamarin forms connect to a node js server on firebase hosting

$
0
0

im making a cross platform ios and android app and have a node js backend with firebase hosting and saving information to firebase database. how do i connect the xamarin forms front end to the node js backend and make them communicate. i can save info from the clientside but its not secure and i can save info in node js but i need to take strings from clientside such as username and email. how do i do this securly such as using crypto?

Get file path from content.

$
0
0

Hi everyone,

I have a Xamarin.Forms (iOS, Android) app and I open it as option to Open PDF documents. For Android app, I set an intent-filter with mimetype: pdf.

  <intent-filter>
          <action android:name="android.intent.action.VIEW" />
          <category android:name="android.intent.category.DEFAULT" />
          <data android:mimeType="application/pdf" />
        </intent-filter>

Is there any way to do the same thing on iOS?

And I have another problem. After I open my app, I want to retrieve the file's path from intent, but I get something like that:
content://com.android.providers.downloads.documents/document/22

Is there any way to get the file path from that content?

Thank you.

Xamarin.Forms Events vs UWP Events

$
0
0

I am a UWP developer and am attempting to convert my apps to Xamarin.Forms for use by Android. I supposedly found enough of the XAML controls to make the UI, but the events are much more challenging. Is there anywhere that I can find a list with a comparison of UWP events & their suggested replacements in Xamarin.Forms? Some of the events that I have been told require the most rewriting for are the lifecycle (such as Page.Loaded). Are there pages anywhere with guidelines on portability for events? Thanks.

Shell MenuItem binding problem

$
0
0

Hi all.
My Label in Shell MenuItemTemplate can't see property from ViewModel (last item in XAML)

<?xml version="1.0" encoding="UTF-8"?>
<Shell xmlns="http://xamarin.com/schemas/2014/forms" 
       xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
       xmlns:d="http://xamarin.com/schemas/2014/forms/design"
       xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
       mc:Ignorable="d"
       xmlns:views="clr-namespace:BillingMobile.Views"
       xmlns:markupextensions="clr-namespace:BillingMobile.Xaml.MarkupExtensions"
       xmlns:materialIcons="clr-namespace:BillingMobile.Icons"
       xmlns:rounded="clr-namespace:BillingMobile.Controls.Rounded"
       Title="BillingMobile"
       x:Class="BillingMobile.AppShell"
       Style="{DynamicResource BaseStyle}">

    <FlyoutItem Title="Меню" FlyoutDisplayOptions="AsSingleItem" FlyoutIcon="wallet.png">
        <Tab Title="{markupextensions:TranslateExtension Wallet}" Icon="wallet.png">
            <ShellContent ContentTemplate="{DataTemplate views:AccountPage}" />
        </Tab>
        <Tab Title="{markupextensions:TranslateExtension MyCompany}" Icon="account_group.png">
            <ShellContent Title="{markupextensions:Translate Services}" ContentTemplate="{DataTemplate views:AccountPage}" />
            <ShellContent Title="{markupextensions:Translate Users}" ContentTemplate="{DataTemplate views:AccountPage}" />
            <ShellContent Title="{markupextensions:Translate Departments}" ContentTemplate="{DataTemplate views:AccountPage}" />
        </Tab>
        <Tab Title="{markupextensions:TranslateExtension Notifications}" Icon="bell_ring.png">
            <ShellContent ContentTemplate="{DataTemplate views:AccountPage}" />
        </Tab>
    </FlyoutItem>

    <Shell.FlyoutHeader>
        <Grid Padding="15">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Image Grid.Row="0" HeightRequest="70" HorizontalOptions="Start" VerticalOptions="Center" WidthRequest="70" x:Name="image">
                <Image.Source>
                    <FontImageSource FontFamily="{DynamicResource MaterialFontFamily}" Glyph="{x:Static materialIcons:MaterialDesignIcons.AccountCircle}" Size="70" Color="{StaticResource PrimaryColor}"/>
                </Image.Source>
            </Image>
            <Label Grid.Row="1" Text="Кравченко Ігор Андрійович" FontAttributes="Bold" TextColor="{StaticResource PrimaryColor}"/>
            <Label Grid.Row="2" Text="{Binding SelectedTheme}" TextColor="{StaticResource PrimaryColor}"/>
        </Grid>
    </Shell.FlyoutHeader>

    <MenuItem>
        <Shell.MenuItemTemplate>
            <DataTemplate>
                <StackLayout Orientation="Horizontal" Padding="15">
                    <Image Grid.Row="0" HeightRequest="24" HorizontalOptions="Start" VerticalOptions="Center" WidthRequest="24">
                        <Image.Source>
                            <FontImageSource FontFamily="{DynamicResource MaterialFontFamily}" Glyph="{x:Static materialIcons:MaterialDesignIcons.Brush}" Size="24" Color="{StaticResource PrimaryColor}"/>
                        </Image.Source>
                    </Image>
                    <Label PropertyChanged="OnLabelPropertyChanged" Text="{Binding ThemeTitle}" VerticalOptions="Center" VerticalTextAlignment="Center" TextColor="Black"/>                       
                </StackLayout>
            </DataTemplate>
        </Shell.MenuItemTemplate>
    </MenuItem>
</Shell>

ViewModel:

public class ShellViewModel : BaseViewModel
    {
        public string ThemeTitle
        {
            get { return "Light"; }
        }

        public ShellViewModel()
        {

        }        
    }

The text in Label is always empty.
BUT!
In method OnLabelPropertyChanged I see how the text is binded to label.

Another BUT
When I set Text without binding all works:

<Label PropertyChanged="OnLabelPropertyChanged" Text="Light" VerticalOptions="Center" VerticalTextAlignment="Center" TextColor="Black"/>

I am using Xamarin 4.3.0.819712-pre2

Does Xamarin.Forms have a replacement for UWP's RoutedEventArgs?

$
0
0

I am working on converting my apps from UWP to Xamarin.Forms. A large number of my event handlers' second parameter was of type RoutedEventArgs (or a descendant of it). I often used the Handled property of this to control which controls' events were triggered. I am still very new to Xamarin.Forms, but it seems like it uses EventArgs instead (in the GestureRecognizers), which does not include this property. Is there anything I can do to gain functionality similar to that provided by RoutedEventArgs in Xamarin.Forms? Thanks.


The type or namespace name 'Android' does not exist in the namespace 'Xamarin.Forms.Platform'

$
0
0

Hi guys.
I Updated my nuget packages few days ago to new versions.
but my Android project has 2 errors in MainActivity.cs:
1:
The type or namespace name 'Android' does not exist in the namespace 'Xamarin.Forms.Platform' (are you missing an assembly reference?) Sama.SamaApp.Android MainActivity.cs

2:
'MainActivity.OnCreate(Bundle)': no suitable method found to override MainActivity.cs

i search it in google and find solutions.

But i tested all solutions in two up links but not worked for me.
i tested clear nuget and dotnet caches . removing bin & obj folders . restore nuget packages . remove and reinstall Xamarin.Forms .finally clean rebuilding the solution.
But I could not fix it.
thanks...

美国罗切斯特大学文凭毕业.证/成绩单#薇信6956.40122办理美国Rochester毕业.证成绩单;文,凭/留信网认.证/使馆认证公.证

$
0
0

美国罗切斯特大学文凭毕业.证/成绩单#薇信6956.40122办理美国Rochester毕业.证成绩单;文,凭/留信网认.证/使馆认证公.证

美国威斯康星大学文凭毕业.证/成绩单#薇信6956.40122办理美国WISC毕业.证成绩单;文,凭/留信网认.证/使馆认证公.证

$
0
0

美国威斯康星大学文凭毕业.证/成绩单#薇信6956.40122办理美国WISC毕业.证成绩单;文,凭/留信网认.证/使馆认证公.证

美国内布拉斯加大学文凭毕业.证/成绩单#薇信6956.40122办理美国UNL毕业.证成绩单;文,凭/留信网认.证/使馆认证公.证

$
0
0

美国内布拉斯加大学文凭毕业.证/成绩单#薇信6956.40122办理美国UNL毕业.证成绩单;文,凭/留信网认.证/使馆认证公.证

美国伦斯勒理工学院文凭毕业.证/成绩单#薇信6956.40122办理美国RPI毕业.证成绩单;文,凭/留信网认.证/使馆认证公.证

$
0
0

美国伦斯勒理工学院文凭毕业.证/成绩单#薇信6956.40122办理美国RPI毕业.证成绩单;文,凭/留信网认.证/使馆认证公.证

Viewing all 91519 articles
Browse latest View live


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