Do you know how to create a SlideUpPanel like GoogleMaps for both Android and iOS using Xamarin?
If I use SliddingupPanel layout is only for android
Help me, please.
I would suggest you use DKSlideUpPanel
It's easy to use and fast
Steps:
First, simply reference the NuGet package in your Xamrin.Forms projects.
Second, initialize SlidingUpPanel instance either in XAML or C#.
Lastly, apply the SlidingPanelConfig for your customizations.
How to use:
Add a mainView something like this;
<DK:SlidingUpPanel x:Name="spTest">
<DK:SlidingUpPanel.MainView>
<StackLayout Orientation="Horizontal" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
**MainDesign**
</StackLayout>
</DK:SlidingUpPanel.MainView>
Set panel ratio and if you want the toolbar visible:
<DK:SlidingUpPanel.PanelRatio>0.4</DK:SlidingUpPanel.PanelRatio>
<DK:SlidingUpPanel.HideNavBar>True</DK:SlidingUpPanel.HideNavBar>
Check the following guide for an even better understanding of how it works:
https://www.c-sharpcorner.com/article/xamarin-forms-slideuppanel-app/
Related
I tried solutions from the following links but none worked.
where-to-put-images-for-xamarin-froms-application
developer.xamarin.com/guides/xamarin-forms/user-interface/images/#Local_Images
image-not-showing-in-xamarin-forms-app.html
I used below syntax
<Image Source="lock.png" HeightRequest="20" WidthRequest="20" HorizontalOptions="Center" VerticalOptions="Center" Grid.Row="0" Grid.Column="0"></Image>
Here is the image for where i've kept image
No image displays
Edit
These are the only things in my XAML page.
In my case the issue was of assembly.
when trying all the possible solutions like
1.) Changing Build Action
2.) Adding Image to all the folders within Resources
3.) Naming Convention should not include - in File/Image Name.
4.) Changing Background Color
I also got one solution while searching for embedded Images that assembly was missing here.
This change worked for me in using Local Images.
Got that solution from this link
Right click the lock.png image and see if there is an option "include in project"
If there is, project cannot find image
In my case I need to use method Forms.Init(Context activity, Bundle bundle), in my SplashScreen OnCreate method and Activity class OnCreate method. But it also important that images build action properties is set on AndroidResource.
I'm learning Xamarin.Forms PCL. I want to load image on page, i tried to load image with uri, that's OK. But i add image into project, it's don't work.
<StackLayout Margin="0,20,0,0">
<Image x:Name="img" Source="mario.jpg"/>
<Button x:Name="btnRotate" Clicked="btnRotate_Clicked" Text="Rotate" />
</StackLayout>
Any help is appreciated. Thanks!
You can not include dashes or spaces in image names for Android compatibility
Rename your image from piotr-chrobot-276746.jpg to something else, like piotrchrobot.jpg
https://developer.xamarin.com/guides/android/application_fundamentals/resources_in_android/part_1_-_android_resource_basics/
Don't forget to set the Build action to AndroidResource.
Mvvmcross version 4.4.0
xamarin forms need Xamanarin.android.support.v4/v7.x version 23.0.0
Download Cachè plugin need Xamarin.android.support.compat version 24.2.1
My app is using xamarin forms so i cant remove it, but i also need to use MvxListView to show an image from url with local:MvxBind="ImageUrl myimage"
so i need download cache plugin, but i cant install it.
Is there any other IMvxImageHelper to use instead of MvvmCross-DownloadCache plugin ? or any other solution ?
*IMPORTANT NOTE-> No code in the Android View.
We use the Xamarin.Forms Plugin FFImageLoading - Fast & Furious Image Loading. It works like a charm and the image loading is much faster than without this plugin. So just take a look at it.
You can find detailed documentation on this github wiki.
Here's a short Xaml example how to use it:
<ffimageloading:CachedImage HorizontalOptions="Center" VerticalOptions="Center"
WidthRequest="300" HeightRequest="300"
DownsampleToViewSize="true"
Source = "http://loremflickr.com/600/600/nature?filename=simple.jpg">
</ffimageloading:CachedImage>
I am trying to add some Images as Image Sets in a Xamarin.Forms project. I followed this guide . But the icon is not displayed. Is it possible actually to use Image Sets in a Xamarin Forms Solution for the iOS project?
<Image VerticalOptions="Center"
HorizontalOptions="End"
Source="check_outline_500_active.png"
WidthRequest="40">
</Image>
Yes you can.
create the Asset catalog
add Image Set and name it "check_outline_500_active" (without .png)
add the images
done
my xaml
<Image VerticalOptions="Center"
HorizontalOptions="Center"
Source="check_outline_500_active.png">
</Image>
Result
Note
You might have to delete mtbs (on the mac) and bin/obj (on your project) or the build cache can fool you :)
Try to add images in resources folder under xamarin ios project and rename file like :
check_outline_500_active.png,
check_outline_500_active#2x.png,
check_outline_500_active#3x.png
but in code use : check_outline_500_active.png
I am developing a Custom Control to be placed inside a ScrollViewer, I have Custom coded a generic.xaml for applying visual style for the Scrollviewer.
<ScrollBar x:Name="VerticalScrollBar"
Grid.Row="0"
Grid.Column="1"
Width="18"
Margin="0,-1,-1,-1"
IndicatorMode="TouchIndicator"
IsTabStop="False"
Maximum="{TemplateBinding ScrollableHeight}"
The Problem I am facing is, I need to set the IndicatorMode to TouchIndicator/MouseIndicator based on whether the user is using Touch Devices or not.
Is there a way to do it?
Thanks
Arun Selva Kumar. B
Used Visual State Manager to achieve the requirement.