I implemented a Entry effect which only needs to be applied on iOS. Right now, I'm attaching it in code-behind by making sure the current platform is iOS. Is it possible to do this easily in XAML instead (i.e. do not attach it on other platforms)?
Is it possible to attach an effect in XAML on only one device platform?
Provisioning profiles in visual studio 2017
I have a problem with my new provisioning profile created in the apple developer portal I can see it in the Xcode but no in visual studio I already reconnect the Mac server I don’t know why the profile don’t show up
Thanks in advance.
Tailwind Traders TwoProductItemTemplate Binding
Hi! I've been going through the Tailwind Traders app, examining their code and learning a bunch, attempting to replicate a lot of their stuff to gain the experience. I'm currently stuck on how they're databinding their ProductView XAML to their ProductViewModel? I notice in the codebehind for the ProductCategoryPage in their WireProductsUpWithListView
method that they are merely setting their ListView
's source to basically a list (tuple) of ProductViewModel
s.
I similarly have a ListView
that is successfully binding to my custom ItemTemplate, and I even get each item to show in the ListView, the data isn't being bound however.
I have a feeling it lies in their ItemTemplate, the code I'm having a hard time understanding:
<local:ProductView BindingContext="{Binding Item1}" />
<local:ProductView
Grid.Column="1"
BindingContext="{Binding Item2}"
IsVisible="{Binding ., Converter={StaticResource IsNotNullConverter}}" />
I understand this is just for creating 2 columns of ProductView
, and an empty space for if there is an odd number, but I cannot for the life of me figure out how they are BindingContext = "{Binding Item1}"
. I can't figure out what exactly that Item1 or Item2 is, I have searched the entire solution for what it's binding to, with no luck. From my understanding, shouldn't their BindingContext's be to the ProductViewModel? I haven't managed to find anything substantial online for this kind of binding, unless I suck at Google haha, any help would be appreciated!
Binding Two Properties from a list in XAML
I have a list that I am getting from a Database with TimeStarted and TimeEnded. I would like to combine them both into a Timespan for a listView. How can I make a new property in my ViewModel that combines those two properties (or maybe do it directly in XAML with a value converter)?
买美国Emory文凭毕业证成绩单加Q微(9105133)埃默里大学毕业证成绩单本科硕士学历/留信认证/使馆认证/真实教育部留服认证Emory University
买美国Emory文凭毕业证成绩单加Q微(9105133)埃默里大学毕业证成绩单本科硕士学历/留信认证/使馆认证/真实教育部留服认证Emory University
买美国Rice文凭毕业证成绩单加Q微(9105133)莱斯大学毕业证成绩单本科硕士学历/留信认证/使馆认证/真实教育部留服认证Rice University
买美国Rice文凭毕业证成绩单加Q微(9105133)莱斯大学毕业证成绩单本科硕士学历/留信认证/使馆认证/真实教育部留服认证Rice University
How to access ContentView objects (x:Name) when you include this contentview in a page?
Hello,
I got this page:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Manager.Pages.EstablishmentCreateUser"
xmlns:local="clr-namespace:APP.Views;assembly=APP"
Title="Create user">
<local:UserInfos/>
</ContentPage>
And i got this ContentView:
<?xml version="1.0" encoding="UTF-8"?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="APP.Views.UserInfos">
<ContentView.Content>
<StackLayout Orientation="Vertical">
<Entry x:Name="E_Firstname" Placeholder="Prénom"/>
<Entry x:Name="E_Lastname" Placeholder="Nom"/>
<Entry x:Name="E_RegistrationNumber" Placeholder="Matricule"/>
<Entry x:Name="E_Phone" Placeholder="Téléphone fixe"/>
<Entry x:Name="E_Mobile" Placeholder="Téléphone mobile"/>
<Entry x:Name="E_Email" Placeholder="Adresse électronique"/>
<Entry x:Name="E_Adress" Placeholder="Adresse du domicile"/>
<Picker x:Name="P_Job"/>
<Picker x:Name="P_WeeklyHours"/>
<StackLayout Orientation="Horizontal">
<Label x:Name="L_Intermittent" Text="Intermittent"/>
<Switch x:Name="S_Intermittent"/>
</StackLayout>
</StackLayout>
</ContentView.Content>
</ContentView>
My design works fine but i'm trying to access :xName entries from my ContentView when i'm in my Page.
How i can access it?
Best regards
Button Text Color
My button text color is changing which I dont want to do on disabling the font button. Here is my code
IconButton.Clicked += (sender, e) =>
{
((FontButton)sender).IsEnabled = false;
((FontButton)sender).TextColor = Item.IconColor;
SelectedItem(((FontButton)sender).ClassId);
};
Remove page from Navigation
In my app structure is like below,
List Page -> Detail Page -> Edit Page
and in edit page there is button "Delete" which removes data from database.
Now my problem is to navigate user from Edit page to List Page,
I'm using Navigation.popasync 2 times for this, but on detail page i'm getting error from service that no such record exist.
How can i properly navigate user from Edit page to list page?
Having a hamburger menu on tabbedpage
The title kinda already describes my problem.
is it possible to have an hamburger menu on my tabbedpage? could someone help me how i can do this... i have no idea
Button color
I am developing application using xamarin.forms. it is supporting API level 19 to 26 in Android. Previously it was supporting till API level 24 then we have upgraded packages to support till API level 26. After that I am facing issue for button background color. In one of my device which is supporting API level 19, button is rendering with background color greish. I am not able to identify issue. Same code is working fine to device which is supporting API level 24.
Can anyone help me here to resolve this issue?
Xamarin Picker
After selecting a Picker ,I want to truncate the selected picker text in end if It's not coming in single line with ....
In ios it's working automatically but I'm unable to do the same in android.
E.g.
Seleced Picker Text should come like this: xyz...
Forcing the Media Plugin picker/camera to close
Just what the title says, when I background the app I'd like to force the camera picker to close and not sure if there is a built in way to do this?
Just to be clear, calling TakePhotoAsync
or PickPhotoAsync
shows a popup that I'd like to be able to close without user intervention.
Any help/suggestions would be appreciated!
Image Performance in Xamarin forms
Hi Everyone. I'm working with an Application which deals with a lot of Images from Server. Sometimes (I thought due to less memory but it's the same in all devices) the images are not showing and getting disappear from the view. I can't understand why it's happening. I have gone through Glidex but unable to install it due to Package conflictions. If anyone knows how to increase the performance of the app which deals with images, please help me.
Any help is appreciated.
Get image thumbnail from a video file.
Hey, I tried a lot of tutorials and some of the NuGet packages (most of them are not free, instead I need a free one) and yet I failed to find a solution for this "get thumbnail from a video file in Xamarin (or c#)", so can anyone provide me a solution on how to create a thumbnail image from a video file (when pick existing video or take a new one), it would be much appreciated.
REPL Not Working
public void SearchBar()
{
app.Repl();
app.Screenshot("Welcome screen");
app.PressEnter();
app.Tap(x => x.Marked("AIDSearchBarButton"));
app.Screenshot("SearchBarButton Tap screen");
}
Have anyone got HardwareAndro's "Xamarin-Firebase Real Time Database" to work - The observable one?
https://youtube.com/watch?v=dop8IiZfl4w&t=215s
I can't get it to work- so im just wondering if anybody else had the same problem or if anyone has an solution for it?
Listview's activity indicator sometimes leaves space on top of the listview
Hi all,
I have an issue with the xamarin forms IOS listview. Sometimes randomly the space of the listview's activity indicator remains after a pull refresh of a listview. Only the space and not the activity indicator itself. If you make another pull refresh to that listview the space is disappeared as it should normally do. Of course on Android device this never happens. I could guess that the refresh indicator on android doesn't create an extra space above the list as it seems when you make the pull refresh.
I describe below what happens when a pull refresh is activated in my app.
In my code for each pull refresh the following steps are followed :
1) the listview.ItemsSource = null;
2) fill an ObservableCollection object with data from a server
3) listview.ItemsSource = ObservableCollection_Object;
4) listview.EndRefresh();
In the listview xaml tag i have set the following properties :
IsPullToRefreshEnabled="True" IsRefreshing="{Binding IsRefreshing}"
I can't figure it out why that happen.
So, Has someone faced a similar problem ?
Could anyone show me into the right direction in order to find a solution for that issue?
Thanks in advance!
QueryAsync is not returning columns using Sqlite-net-pcl
Hello ,
I am trying to get List of rows using Sqlite.QueryAsync() method. something like this. I am getting correct number of rows but there are no values in those rows. Database is created outside project using (DB browser) and used in PCL project. I am facing this problem with all Query or QueryAsync, rest of functions Table,deleteAsync, updateAsync etc. all are working fine. Did anyone faced similar problem? Or Is there any other way to fetch column from sqlite database?
var t= databaseAsync.QueryAsync<int>("Select distinct HospitalId from HospitalServices where ServiceId in (1,2,6)");
Somewhat like this
I am using sqlite-net-pcl 1.5.231 and sqlitedatabase in android asset.
FrameRenderer crash with Binding
Hy, i'd create a Android Custom control for frame to create a gradient background. It works fine if i set static color(StartColor and EndColor) but if i bind with converters, app crashes. This is my code:
Renderer
public class FrameGradientRenderer : VisualElementRenderer
{
private Color StartColor { get; set; }
private Color EndColor { get; set; }
protected override void DispatchDraw(global::Android.Graphics.Canvas canvas)
{
var gradient = new Android.Graphics.LinearGradient(0, 0, Width, 0,
this.StartColor.ToAndroid(),
this.EndColor.ToAndroid(),
Android.Graphics.Shader.TileMode.Mirror);
var paint = new Android.Graphics.Paint()
{
Dither = true,
};
paint.SetShader(gradient);
canvas.DrawPaint(paint);
base.DispatchDraw(canvas);
}
protected override void OnElementChanged(ElementChangedEventArgs<Frame> e)
{
base.OnElementChanged(e);
if (e.OldElement != null || Element == null)
{
return;
}
try
{
var frame = e.NewElement as FrameGradient;
this.StartColor = frame.StartColor;
this.EndColor = frame.EndColor;
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine(@"ERROR:", ex.Message);
}
}
CustomControl
:
public class FrameGradient : Frame
{
public Color StartColor { get; set; }
public Color EndColor { get; set; }
}