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

How can i save an image in sqliteconnection??

$
0
0

I want save an image in sqliteconnection, and I don't know how to do it. When I save name of Image: (image1.jpg) for exemple, and I try to implement it in another place, I don't see the Image!!

    private async void SaveBtn_Clicked(object sender, EventArgs e)
    {
        SaveExercices y = JsonConvert.DeserializeObject<SaveExercices>(ExerciceCree);
        y.ExerciceName = Exercicename.Text;
        y.ExerciceImage=ImageName;           ///////////How Can I save It??////////////
        ExerciceCree = JsonConvert.SerializeObject(y);
        TabsPage.db.Insert(new Save()
        {
            Myexercicejson = ExerciceCree
        });

        string a = TabsPage.db.Table<Save>().ToList()[TabsPage.db.Table<Save>().ToList().Count-1].Myexercicejson;
        SaveExercices x = JsonConvert.DeserializeObject<SaveExercices>(a);

        ArticleCardPage.liste.Add(x);

        await DisplayAlert("Save", "Saved with successful", "Ok");
    }``

Show a List of Frames on a ContentPage using XAML

$
0
0

Hi everyone.
I have a CarouselPage that uses the DataTemplate approach. On each ContentPage I have a different number of frames. Is there a way to show different number of frames with DataTemplate in XAML, or should I do it on code?

My CarouselPage code is the following:
(Capitulo is a sub-class of ContentPage)

<CarouselPage xmlns="http://xamarin.com/schemas/2014/forms" 
              xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:retornotemplate="clr-namespace:RetornoTemplate"
              x:Class="RetornoTemplate.MainPage">

    <CarouselPage.ItemTemplate>
        <DataTemplate>
            <retornotemplate:Capitulo>

                <ScrollView>
                    <StackLayout>


                        <Label Text="{Binding Name}" FontSize="Medium" HorizontalOptions="Center" />
                        <Label Text="{Binding Color}" WidthRequest="200" HeightRequest="200" HorizontalOptions="Center" 
 VerticalOptions="CenterAndExpand"/>

        //Here I would like to put something like a List of frames


                    </StackLayout>
                </ScrollView>

            </retornotemplate:Capitulo>
        </DataTemplate>
    </CarouselPage.ItemTemplate>
</CarouselPage>

And the class with the binding is:

namespace RetornoTemplate
{
    class DataModel
    {
        public string Name { get; set; }
        public String Color { get; set; }
        public static IList<DataModel> All { get; set; }
        public List<Frame> frames;
        static DataModel()
        {

            Frame fr1 = new Frame() { Content = new Label() { Text = "Frame 1" } };

            All = new ObservableCollection<DataModel>(); 

            for(int i= 0; i<5; i++)
            {
                List<Frame> frs = new List<Frame>();

                for(int j=0; j<=i; j++)
                {
                    frs.Add(fr1);
                }

                All.Add(new DataModel { Name = "Red", Color = "Rojo", frames = frs });
            }


        }
    }
}

It's just an example, but what I'm doing is creating lists of different lengths just to try it out. I hope it's easy to understand my goal.

How to access the Custom control Element list which is also custom control list

$
0
0

I have Created Custom Control and thats custom control himself contain custom control like listview
and when im going to use it on in my view its access only custom control not accessing custom control> costomcontrol list

//Here is custom control layout
    <StackLayout>
        <syncfusion:SfExpander x:Name="expander1" HeaderIconPosition="None">
            <syncfusion:SfExpander.Header>
                <Grid HeightRequest="50">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="30"/>
                    </Grid.ColumnDefinitions>
                    <Label
                            x:Name="HeaderName"
                                Text="Invoice Date"
                                TextColor="#495F6E"
                                VerticalTextAlignment="Center" />

                    <Image x:Name="ExpanderIcon" Source="{Binding IsExpanded,Source={x:Reference expander1},Converter={StaticResource ExpanderIconConverter}}" HeightRequest="15" WidthRequest="15" HorizontalOptions="Center" VerticalOptions="Center" Grid.Column="1"/>
                </Grid>
            </syncfusion:SfExpander.Header>

            <syncfusion:SfExpander.Content  >

//Here is the custom control listview i want to bind data to list when i use it to in my view 
                <controls:SuperListView x:Name="SuperListView" ItemsSource="{Binding Items, Source={x:Reference expander1}}"
                          IsScrollingEnable="false"
                         >
                    <controls:SuperListView.ItemTemplate>
                        <DataTemplate>
                            <ViewCell>
                                <Label Text="{Binding .}"/>
                            </ViewCell>
                        </DataTemplate>
                    </controls:SuperListView.ItemTemplate>
                </controls:SuperListView>
            </syncfusion:SfExpander.Content>
        </syncfusion:SfExpander>
    </StackLayout>

Im Accessing this countrol

<custom:ExpenderControl x:Name="Profile" HeaderText="MainHeader" ImageIcon="minus" ></custom:ExpenderControl>

but the problem is that im not accessing the listview to bind data with this control

Shell Uri string too long because of base64 image

$
0
0

Hi,

in our app we have a dashboard. In this dashboard we load the latest News and preview them in a Panel.
By clicking on a Show all button a ContentPage with the list of News opens up.
As the Panel on the dashboard already loads alle news, I want to pass those news from the Panel to the NewsListPage.

I did that by simply converting the news array into a json and pass it in the GoToAsync to the Shell like this:

string modelJson = JsonConvert.SerializeObject(News); //This is a ObservableCollection with News objects = title, text and image.
await AppShell.Current.GoToAsync("//NewsPage?newsList=" + modelJson);

But now the News also contain an image, represented as a Base64 string. With that string, the URI gets too long and I get a
System.UriFormatException
Invalid URI: The Uri string is too long.

What is the best way to pass the whole information to the ContentPage or how to pass the base64 string to the contentPage as well?

Thank you!

iOS App crashing when binding to Text & IsVisible

$
0
0

I'm having issues with binding in iOS. We have numerous forms in our app and they're broadly set out as per the example with an Entry and an associated label for validation feedback - we're using FluentValidation for this. The label is hidden unless there are errors to show, this is so they take up no space on the interace when not required.

<Entry x:Name="UsernameEntry" 
    Placeholder="{Binding UILabelLoginName}"
    IsTextPredictionEnabled="False"
    PlaceholderColor="#333333"
    TextColor="#000000" 
    ReturnType="Done"
        Text="{Binding LoginName.Value}"
        InputTransparent="False">
    <Entry.Behaviors>
        <behaviors:EventToCommandBehavior
            Command="{Binding ClearValidationCommand}"
            CommandParameter="LoginName"
            EventName="Focused" />
    </Entry.Behaviors>
</Entry>

<Label
    IsVisible="{Binding LoginName.IsValid, Converter={StaticResource InverseBoolean}}"
    Style="{StaticResource ErrorLabelStyle}"
        Text="{Binding LoginName.FirstError}" />

This works lovely in Android, in iOS though the binding to IsVisible crashes the app. If we set IsVisible to true as opposed to binding it and set a fixed HeightRequest then it works fine but I don't want empty labels taking up space within the forms.

Android - On Load

Android - On Error

iOS - On Load (IsVisible set to Binding)

iOS - On Error (IsVisible set to Binding)

  • Crash

iOS - On Load (IsVisible set to True)

iOS - On Error (IsVisible set to True)

The exception at the time of the crash is,

Object reference not set to an instance of an object

at Xamarin.Forms.Platform.iOS.VisualElementTracker.UpdateClip () [0x00072] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementTracker.cs:413
at Xamarin.Forms.Platform.iOS.VisualElementTracker.UpdateNativeControl () [0x0006c] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementTracker.cs:386
at Xamarin.Forms.Platform.iOS.VisualElementTracker.HandlePropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00064] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementTracker.cs:97
at (wrapper delegate-invoke) .invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:229
at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:353
at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x00114] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:461
at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:397
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x00042] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:334
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindablePropertyKey propertyKey, System.Object value) [0x0000e] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:318
at Xamarin.Forms.VisualElement.set_Height (System.Double value) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:324
at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x0001a] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:1081
at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:316
at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:708
at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x001da] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:178
at Xamarin.Forms.TemplatedView.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\TemplatedView.cs:29
at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:266
at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:224
at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:812
at Xamarin.Forms.VisualElement.SetSize (System.Double width, System.Double height) [0x00021] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:1083
at Xamarin.Forms.VisualElement.set_Bounds (Xamarin.Forms.Rectangle value) [0x0005d] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:316
at Xamarin.Forms.VisualElement.Layout (Xamarin.Forms.Rectangle bounds) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:708
at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.View child, Xamarin.Forms.Rectangle region, Xamarin.Forms.SizeRequest childSizeRequest) [0x00225] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:319
at Xamarin.Forms.StackLayout.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00081] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:65
at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:266
at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:224
at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:812
at Xamarin.Forms.Layout.ResolveLayoutChanges () [0x0005c] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:392
at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.18.2.1/src/Xamarin.iOS/Foundation/NSAction.cs:152
--- End of stack trace from previous location where exception was thrown ---

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/13.18.2.1/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/13.18.2.1/src/Xamarin.iOS/UIKit/UIApplication.cs:65
at xxxx.iOS.Application.Main (System.String[] args) [0x00002] in C:\xxxx\xxxx.iOS\Main.cs:19

Any guidance would be very much appreciated!

Thanks

MVVM pattern and calling an api

$
0
0

Hello community

I have three problems

1) I have a button that's get enable, if the Username and Password are filled

LoginVM

public ICommand LoginCommand { get; set; }
        public ICommand GoToRegisterCommand { get; set; }
        public User User { get; set; }
        public HttpResponseMessage Msg { get; set; }
        public JObject Obj { get; set; }
        public LoginViewModel() {

            User = new User();

            IsBusy = false;
            IsEnable = false;
            LoginCommand = new Command(async () => {
                IsBusy = true;
                IsEnable = false;

                await Task.Run(async () => {
                    Obj = new JObject {
                { "username", User.Username.ToLower() },
                { "password", User.Password.ToLower() }
                    };

                    Msg = await NetworkHelpper.SendData(Constants.AUTH, Obj);

                    if (Msg == null)
                        return;

                    if (Msg.IsSuccessStatusCode) {
                        result = Msg.Content.ReadAsStringAsync().Result;
                        var details = JObject.Parse(result);
                        string token = details["token"].ToString();
                        await SecureStorage.SetAsync("oauth_token", token);
                        IsBusy = false;
                        IsEnable = true;
                        await Application.Current.MainPage.Navigation.PushAsync(new HomeMaterPage());
                    } else {
                        IsBusy = false;
                        IsEnable = true;
                        result = Msg.Content.ReadAsStringAsync().Result;
                        await Application.Current.MainPage.DisplayAlert("Error", result, "ok");
                    }
                });
            });
            GoToRegisterCommand = new Command(async () => {
                await Application.Current.MainPage.Navigation.PushAsync(new RegisterScreen());
            });
        }


        private bool _IsBusy;
        public bool IsBusy {
            get { return _IsBusy; }
            set {
                if (_IsBusy != value) {
                    _IsBusy = value;
                    RaisePropertyChanged();
                }
            }
        }


        private bool _IsEnable;
        public bool IsEnable {
            get { return _IsEnable; }
            set {
                if (_IsEnable != value) {
                    _IsEnable = value;
                    RaisePropertyChanged();
                    if (User.Validator()) {
                        IsEnable = false;
                    } else {
                        IsEnable = true;
                    }
                }
            }
        }
    }

User class

 private string _Username;
    public string Username {
        get { return _Username; }
        set {
            if (_Username != value) {
                _Username = value;
                RaisePropertyChanged();
            }
        }
    }

    public bool Validator() {
        return string.IsNullOrEmpty(_Username) || string.IsNullOrEmpty(Password);
    }

    private string _Password;
    public string Password {
        get { return _Password; }
        set {
            if (_Password != value) {
                _Password = value;
                RaisePropertyChanged();
            }
        }
    }
}

}

2)the Button dosent get enabled

3) for some reason the loginVM is telling me that the app is doing too much work in its Main thread
4) from the other tread, I cannot touch the views on the main thread

The strange part in tha the registration is also calling the server and I don't get the message "Too much work there"

I know that when I get data from an api, I usually make an async/away method. What is diferent in this case, why do I have to call a ne thread

This is my entry point if somebody need

 public App() {
            InitializeComponent();

            MainPage = new NavigationPage(new LoginScreen());
        }

        protected override void OnStart() {
        }

        protected override void OnSleep() {
        }

        protected override void OnResume() {
        }
    }

Tabbed page custom renderer on Xamarin.Forms

$
0
0

How can I achieve something like the top bar in the screenshot ("Totale Regioni Province") using a tabbed page custom renderer?
Right now I'm using "fake tabs" made of three different labels.

I need to change font family, font size and padding of the tabs.

Label MaxLines behaves differently on Android and iOS. Is this intended, or can it be fixed?

$
0
0

In our app we want a Label to expand when it is tapped. We're trying to do this by adding a binding on the MaxLines property of the label. When the label is not clicked it is set to 2, which indeed shows two lines on both Android and iOS. But when we when the label is tapped and we want to expand it we set the MaxLines property to 0. On iOS this does exactly what we want and expand the label, but on Android it really shows 0 lines, is this intended behaviour? Will it be fixed in Xamarin, or can we somehow work around it? Any help is appreciated.


Change default navigation drawer position

$
0
0

Hello,
I want to change the default navigation drawer position to right please help

InfoWindowClicked on custom pin does not work on IOS

$
0
0

Hello guys, im stuck with a problem with the InfoWindowClicked event on Xamarin.Forms.Maps.
The event fires correctly on Android but don't fire on IOS (testing in simulator).
I made a simple CustomRenderer in order to change the pin icon, these are my files:

public class CustomMap : Map
{
public List CustomPins { get; set; }
}

public class DataPin : Pin
{
public string Icon { get; set; }
}

This is my custom renderer on IOS (pretty much the same of the doc):

public class CustomMapRenderer : MapRenderer
{

    List<DataPin> customPins;

    protected override void OnElementChanged(ElementChangedEventArgs<View> e)
    {
        base.OnElementChanged(e);

        if (e.NewElement != null)
        {
            var formsMap = (CustomMap)e.NewElement;
            var nativeMap = Control as MKMapView;
            customPins = formsMap.CustomPins;

            nativeMap.GetViewForAnnotation = GetViewForAnnotation;
        }
    }

    protected override MKAnnotationView GetViewForAnnotation(MKMapView mapView, IMKAnnotation annotation)
    {
        if (annotation is MKUserLocation)
            return null;

        var customPin = GetCustomPin(annotation as MKPointAnnotation);
        if (customPin == null)
        {
            return null;
        }

        MKAnnotationView annotationView = mapView.DequeueReusableAnnotation(customPin.Label);
        if (annotationView == null)
        {
            annotationView = new MKAnnotationView(annotation, customPin.Label)
            {
                Image = UIImage.FromFile(customPin.Icon),
                CalloutOffset = new CGPoint(0, 0)
            };
        }
        annotationView.CanShowCallout = true;

        return annotationView;
    }

    DataPin GetCustomPin(MKPointAnnotation pin)
    {
        if(customPins != null)
        {
            var position = new Position(pin.Coordinate.Latitude, pin.Coordinate.Longitude);
            foreach (var customPin in customPins)
            {
                if (customPin.Position == position)
                {
                    return customPin;
                }
            }
        }
        return null;
    }
}

Here is the sample code where i add a pin with the InfoWindowClicked event (i removed some parts):

myfunc()
{
CustomMap map = new CustomMap()
{
IsShowingUser = true,
MapType = MapType.Street,
};
map.CustomPins = new List();

DataPin pin = new DataPin
            {
                Label = stop.Nome.Replace("_", " ").ToUpper(),
                Type = PinType.Place,
                Position = new Position(stop.Coordy, stop.CoordX),
                Icon = "stop_pin.png"
            };
            pin.InfoWindowClicked += pinClickedEventHandler;
            map.Pins.Add(pin);
            map.CustomPins.Add(pin);

}

If i put a break inside the handler, only in android is executed while in IOS is ignored.
Do you have some suggestions about it? Im not sure if it is a custom renderer problem, since the event is not in the renderer, but maybe im missing something?
Thanks a lot for your help!

List all .mp3 files from Music folder of my Android device

$
0
0

Hi,
I am developing a music player app in Xamarin.Forms that uses MediaManager plugin. How can I list all .mp3 files from Music folder in my Android device and play it respectively. Also, can I get metadatas of an .mp3 files name, title, album, artist etc?

Xamarin forms: ITMS-90809: Deprecated API Usage, but no webview in my project

$
0
0

Yesterday I have pushed a new app to AppStore, but it gets rejected with the following error.

ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).

In my knowledge, this issue usually occurs due to the use of Webview. I have one Webview in my project, so I decided to remove it (Since that part is currently not using in the project). I have pushed the app again to AppStore after removing the Webview, but again my app gets rejected with the same error. After that I do a clean, rebuild, and deleted the bin, obj folders. 2 times my app gets rejected from Appstore after removing Webview.

See the below screenshot: No Webviews are available for the entire solution.

enter image description here

Are there any other reasons for this error? Please help, this is very emergency.

Vertical Scroll Inside Editor Box

$
0
0

Hi All,

I have one Editor box and i want Vertical scroll inside editor box.

Thanks in advance.

Editor with vertical scroll bar

$
0
0

Hi,

I am using Editor for Multiline text. If the text is longer than the editor height, i am able to scroll the text, but vertical scroll bar is not shown. How to make scrollbar visible in Editor if the content inside Editor is longer than Editor's height?

Below is my code.

<?xml version="1.0" encoding="UTF-8" ?>
<ContentPage
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    x:Class="HelloXamarinForms.EditNote"
    Title = "EditNote">
    <ContentPage.Content>
    <ScrollView>        
         <StackLayout Spacing="10"
               VerticalOptions="FillAndExpand"
               Orientation="Vertical">

                   <Editor
                        BackgroundColor = "#FFFFCC"
                        HeightRequest = "100"
                        IsFocused = "True"
                        x:Name="noteArea"
                            >
                   </Editor>    


         </StackLayout>

    </ScrollView>


    </ContentPage.Content>
</ContentPage>

TimePicker catch ok event

$
0
0

I have already created a class for ios which i can catch ok click, is anyone who knows how to create a same class for android?

 public class MyRenderer2 : TimePickerRenderer
    {
        TimePicker _timePickerElement;

        protected override void OnElementChanged(ElementChangedEventArgs<TimePicker> e)
        {
            base.OnElementChanged(e);

            if (e.NewElement is TimePicker timePickerElement && Control != null)
            {
                _timePickerElement = timePickerElement;

                var toolbar = Control.InputAccessoryView as UIToolbar;
                foreach (var button in toolbar?.Items)
                {
                    if (button.Style == UIBarButtonItemStyle.Done)
                    {
                        button.Clicked -= OnDoneButtonClicked;
                        button.Clicked += OnDoneButtonClicked;
                    }
                }
            }
        }

        private void OnDoneButtonClicked(object sender, EventArgs e)
        {
            MessagingCenter.Send<object>(this, "Hello");
        }
    }

Placing Label beneah ListView (It runs to the bottom)

$
0
0

I have a ListView with few items.
I would like to place a label, RIGHT AFTER the end of the list (beneath the ListView)
Of some reason, the label shows in the BOTTOM of the screen.

 <StackLayout>
        <RefreshView Command="{Binding Commandy}"  IsRefreshing="{Binding IsRefreshingNow}">
            <ListView >
                <ListView.ItemsSource>
                    <x:Array Type="{x:Type x:String}">
                        <x:String>Item 1</x:String>
                        <x:String>Item 2</x:String>
                        <x:String>Item 3</x:String>
                        <x:String>Item 4</x:String>
                        <x:String>Item 5</x:String>
                        <x:String>Item 6</x:String>
                    </x:Array>
                </ListView.ItemsSource>
            </ListView>
        </RefreshView>
        <Label VerticalOptions="StartAndExpand" FontSize="Title" Text="{Binding Booly}"  d:Text="Hello"  />
</StackLayout>

This is how it looks like (The label is in the bottom).

Move/drag and resize annotations with SkiaSharp

$
0
0

Hi, ( @mattleibow )

I am working and experimenting on making annotations, like lines and circles, on documents. Drawing these annotations works perfectly, but I also want to be able to move/drag the annotations around separately. So for example, if the user makes a couple of circle annotations (draw a few circles on canvas) and one of the circles is not in the correct position or not the correct size, the user must be able to drag the circle to the correct position and have the ability to resize the circle. I am not sure if this is possible with SkiaSharp and how to achieve this.

Hoping to find some help.

Basserd

How to implement Vungle Ads in Xamarin.Forms?

$
0
0
  1. How to implement Vungle Ads in Xamarin.Forms?
  2. I have search on Internet few day ago, I still not found a sample about Vungle Ads for Xamarin.Forms?

If you have a sample, could you please share it?

Thank you!

Xamarin.Forms Entry reading from barcode reader with enter key gives empty result

$
0
0

I have a problem that is happening in Xamarin Forms UWP and perhaps also will happen in Android and iOS.

I have on XAML side a entry text field called for example textEntry.

I have on code side the definition textEntry.Completed += textEntry_Completed

on my textEntry_Completed I should have the content of the textEntry.Text.

When I write via keyboard something and press return, on the textEntry_Completed I get the textEntry.Text value correctly.

When I use a barcode scanner with keyboard emulation that after reading is also appending a return code, I get a textEntry.Text empty string inside the textEntry_Completed.

How can I solve this situation ?

Thanks, Paulo

Layout system changes in Forms 4.1?

$
0
0

Good day all,

We have been using a control in our application which attempts to scale down a layout based on the size given to the control, this worked fine in Forms 4, however we are looking to update to 4.7 and it seems something may have changed around 4.1 and our scaling converter does not appear to be getting the height and width which are being defined in the heightrequest and widthrequest for the control.

Interestingly when working on this in visual studio, the hot reload function seems to provide this information, so if we open the control xaml and hit ctrl+s the hot reload will trigger something and pass through the required height and width values, meaning it scales correctly!

Any advice on how this may have changed or any way we can replicate the hot reload behavior would be much appreciated.

Many thanks

Viewing all 79144 articles
Browse latest View live


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