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

73+6


约克大学毕业证办本科/硕士学位证Q微707091118加拿大毕业证York毕业证成绩单修改GPA分数*教育部认证**留信认证学位证书制作York University

$
0
0

约克大学毕业证办本科/硕士学位证Q微707091118加拿大毕业证York毕业证成绩单修改GPA分数*教育部认证**留信认证学位证书制作York University

维多利亚大学毕业证办本科/硕士学位证Q微707091118加拿大毕业证UVIC毕业证成绩单修改GPA分数*教育部认证**留信认证学位证书制作University of Victoria

$
0
0

维多利亚大学毕业证办本科/硕士学位证Q微707091118加拿大毕业证UVIC毕业证成绩单修改GPA分数*教育部认证**留信认证学位证书制作University of Victoria

兰加拉学院毕业证办本科/硕士学位证Q微707091118加拿大毕业证UQA毕业证成绩单修改GPA分数*教育部认证**留信认证学位证书制作Langara Academy

$
0
0

兰加拉学院毕业证办本科/硕士学位证Q微707091118加拿大毕业证UQA毕业证成绩单修改GPA分数*教育部认证**留信认证学位证书制作Langara Academy

康卡迪亚大学毕业证办本科/硕士学位证Q微707091118加拿大毕业证Concordia毕业证成绩单修改GPA分数*教育部认证**留信认证学位证书制作Concordia University

$
0
0

康卡迪亚大学毕业证办本科/硕士学位证Q微707091118加拿大毕业证Concordia毕业证成绩单修改GPA分数*教育部认证**留信认证学位证书制作Concordia University

卡尔加里大学毕业证办本科/硕士学位证Q微707091118加拿大毕业证UC毕业证成绩单修改GPA分数*教育部认证**留信认证学位证书制作University of calgary

$
0
0

卡尔加里大学毕业证办本科/硕士学位证Q微707091118加拿大毕业证UC毕业证成绩单修改GPA分数*教育部认证**留信认证学位证书制作University of calgary

阿尔伯塔大学毕业证办本科/硕士学位证Q微707091118加拿大毕业证UA毕业证成绩单修改GPA分数*教育部认证**留信认证学位证书制作THE UNIVERSITY OF ALBERTA

$
0
0

阿尔伯塔大学毕业证办本科/硕士学位证Q微707091118加拿大毕业证UA毕业证成绩单修改GPA分数*教育部认证**留信认证学位证书制作THE UNIVERSITY OF ALBERTA

西蒙弗雷泽大学毕业证办本科/硕士学位证Q微707091118加拿大毕业证SFU毕业证成绩单修改GPA分数*教育部认证**留信认证学位证书制作Simon Fraser University

$
0
0

西蒙弗雷泽大学毕业证办本科/硕士学位证Q微707091118加拿大毕业证SFU毕业证成绩单修改GPA分数*教育部认证**留信认证学位证书制作Simon Fraser University


Listview Item Animation and Delay

$
0
0

Hi there. I'm having trouble getting each item in a ListView to show up at separate times(like half a second apart each), similar to Google+ where each item animates in separately. I have a ScaleTo animation on the ViewCell itself but they still all appear at the same time. I've also monkeyed around with Task.Delay() but might be placing it in the incorrect location. Anyone have any guidance on the issue?

How to Load cache Image in offline in xamarin forms?

$
0
0

The issue occurs in all 3 platforms:

I am downloading an image and stored in the cache(default option for an image source "CachingEnabled = true"), and I have set the time span to 1 day.

On Loading, the page in offline the image is not displayed. whereas if I open the page in online it seems the image is downloaded and shown

Initially, I am downloading and saving as follows

webImage.Source = new UriImageSource
{
Uri = new Uri("Some Http image"),
CachingEnabled = true,
CacheValidity=new TimeSpan(1,0,0,0)
};

In the new page, I am using the following to show the image

newImage.Source = new UriImageSource
{
Uri = new Uri("Some Http image"),
}

In Offline, An empty page has displayed the image is not loaded. I have a question is whether the image is cached or not.

My question here is ** Has the image is cached? If so how to load the cached image in offline.**

Property Setter set multiple times - as many times as a bound subview mentioning it is opened.

$
0
0

Hi guys, I have found an issue....

I have a viewmodel with a ToSection property on it. Both Getter and setter etc. the Viewmodel is bound to my Main View. In my main view I have the command bound that opens a new subview that has the ToSection property mentioned in the xaml - this property is not used by anything else. I set the subview bindingcontext to 'this' - being the viewmodel and I'm pusing it onto the nav stack as follows:

                ToSection = null; // Reset To Section Picker.
                await parent.Navigator.PushAsync(
                    new WmsJobItemsToView
                    {
                        BindingContext = this,
                        Title = string.Format("{0} ({1})", e as string, Items.Where(o => o.Pending > 0).Sum(o => o.Pending))
                    });

However, everytime I press the button to open the subview and then set the ToSection property its setter is being called as many times as I've opened the subview - like it isn't releasing the first one when it is popped off the stack? What am I missing?

Why are those OnPlatform lines deprecated?

$
0
0

Hey there.

<OnPlatform x:TypeArguments="Thickness"
iOS="10"
Android="10"/>

is deprecated. As far as I know this should be used:

        <OnPlatform x:TypeArguments="Thickness">
            <On Platform="iOS">10</On>
            <On Platform="Android">10</On>
        </OnPlatform>

Same here. This is obsolete:

Padding = new Thickness(0, Device.OnPlatform(20, 0, 0), 0, 0);

instead a switch case similar to this should be used:

            int tVal;
            switch(Device.RuntimePlatform)
            {
                case Device.iOS:
                    tVal = 10;
                    break;

                default:
                    tVal = 10;
                    break;

            }
            Padding = new Thickness(0, tVal, 0, 0);

And I don´t understand why. The deprecated/obsolete way is shorter. Is this performance related or something else??

ViewCell and TranslateTo animation

$
0
0
Hi,

I would like to consume the Appearing event of a ViewCell inside a Listview so that when an element is being loaded, I can do some little nice animations such as loading it from left to right inside the Listview.

I can use TranslateTo, Fade and Scale for other Views such as Image but I am really struggling to do the same for a ViewCell inside a Listview.

Thanks

Tapping on Entry in ListView doesn't select the ListView row

$
0
0

I have a Label and an Entry in a ListView, however, when I tap any given Entry in the ListView, it does not select the ListView row that contains that tapped Entry. When I tap a Label, the selected ListView row is correctly changed. Is there a known workaround for this? I need the selected ListView row to change to the row containing the Entry that receives focus.

Xamarin Android crashing after loading splash_screen

$
0
0

I dont know why has been crashing , can i help you resolve issue? thanks

using Android.App;
using Android.Content.PM;
using Android.Views;
using Android.OS;
using Android.Util;
using FormApp.Helpers;
using Acr.UserDialogs;
using FFImageLoading.Transformations;
using Xamarin.Forms.PlatformConfiguration.AndroidSpecific;
using AToolbar = Android.Support.V7.Widget.Toolbar;

namespace FormApp.Droid
{
[Activity(Label = "FormApp.Droid",
Icon = "@drawable/icon",
MainLauncher = true,
Theme = "@style/MainTheme",
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation,
NoHistory = true
)
]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
private static MainActivity _this;
public static AToolbar ToolBar { get; private set; }

    public static View RootFindViewById<T>(int id) where T : View
    {
        return _this.FindViewById<T>(id);
    }
    public MainActivity()
    {
        _this = this;
        Android.Support.V7.App.AppCompatDelegate.CompatVectorFromResourcesEnabled = true;
    }

    protected override void OnCreate(Bundle bundle)
    {
        TabLayoutResource = Resource.Layout.Tabbar;
        ToolbarResource = Resource.Layout.Toolbar;
        base.OnCreate(bundle);

        Rg.Plugins.Popup.Popup.Init(this, bundle);
        Xamarin.Forms.Forms.Init(this, bundle);
        UserDialogs.Init(this);
        FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true);          
        var ignore = new CircleTransformation();

        RequestedOrientation = Xamarin.Forms.Device.Idiom == Xamarin.Forms.TargetIdiom.Phone ? ScreenOrientation.SensorPortrait : ScreenOrientation.SensorLandscape;
        MakeStatusBarTranslucent(true);
        LoadApplication(new App());
        Xamarin.Forms.Application.Current.On<Xamarin.Forms.PlatformConfiguration.Android>().UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize);

    }

    public override bool OnCreateOptionsMenu(IMenu menu)
    {
        ToolBar = FindViewById<AToolbar>(Resource.Id.toolbar);
        return base.OnCreateOptionsMenu(menu);
    }


    public void OnTranslucentStatusRequest(StatusBarHelper helper, bool makeTranslucent)
    {
        MakeStatusBarTranslucent(makeTranslucent);
    }

    private void MakeStatusBarTranslucent(bool makeTranslucent)
    {
        if (makeTranslucent)
        {
            SetStatusBarColor(Android.Graphics.Color.Transparent);

            if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
            {
                Window.DecorView.SystemUiVisibility = (StatusBarVisibility)(SystemUiFlags.LayoutFullscreen | SystemUiFlags.LayoutStable);
            }
            else
            {
                using (var value = new TypedValue())
                {
                    if (Theme.ResolveAttribute(Resource.Attribute.colorPrimaryDark, value, true))
                    {
                        var color = new Android.Graphics.Color(value.Data);
                        SetStatusBarColor(color);
                    }
                }

                if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop)
                {
                    Window.DecorView.SystemUiVisibility = StatusBarVisibility.Visible;
                }
            }
        }
    }
}

}


Unit testing FFImageLoading and calling CachedImageRenderer.Init?

$
0
0

I am trying to create unit test that calls methods that are dependent of FFImageLoading.Forms.CachedImage
. I get this exception:
System.Exception: Please call CachedImageRenderer.Init method in a platform specific project to use FFImageLoading!
How can I call this method from a test project? Will I have to create platform specific code snippet that calls init? Or is there any other way around it?

Options to show the user how to use the application

$
0
0

Hello, I would like to know how do you guys usually make the tutorial for your Applications, I was thinking in make a guided tour like the image below but if its feasable in Xamarin but also I wanna know other options on how to make it a good user experience.

Using declarative style C# instead of XAML - should Xamarin redirect XAML efforts elsewhere?

$
0
0

Introduction

Miguel tweeted:
"I should have never added Xaml and instead invented our own ...", expressing regrets about having to deal with XAML (standardization) problems.

My response was:
"I would applaud dropping XAML altogether. Advancements in C# (declarative syntax) have eliminated any advantages of a separate markup language for years. Why would you want to hand-code an object serialization format? Why waste time on duplicating dev tools for features that c# already offers?"

David expressed an interest to see how I have been creating Xamarin Forms markup in declarative style C#, instead of in XAML, for the past few years. So I write this post to provide a concrete example, and share the reasoning behind my remark (which was deliberately lacking nuance - it is Twitter after all).

Redirecting Xamarin IDE team effort

Why do I spend time on this? In the past years I only experienced advantages from using declarative C# instead of XAML. Given that the core challenge for the Xamarin IDE teams remains to improve the developer productivity, I would love to see some of the effort now being spent on (imo redundant) XAML tooling to be redirected towards reducing IDE bugs and speeding up the dev cycle, i.e. Live Player.

I recently investigated Google's Flutter (build beautiful native apps in record time), which by design has no separate language for markup and which offers hot reload - which is like a Xamarin Live Player without any limitations and a refresh time of 400-600 ms (I checked on devices and emulators). This is what I want from Xamarin!

This is the competition Xamarin is facing today. Some developers are already switching from Xamarin to Flutter because of developer tooling productivity, which apparently can be more important than language or framework or experience. As a Xamarin veteran, I get why they do this. I feel that unless there is a significant team increase, Xamarin needs to focus and redirect existing effort towards developer productivity, meaning less IDE bugs and faster development cycle.

Example
.
Here is an unabridged example of a simple registration code page in a production app I wrote:

Content = new Grid { 
    RowSpacing = 0, 
    RowDefinitions = { new RowDefinition { Height = GridLength.Auto }, new RowDefinition {}},
    Children = {
        PageHeader.Create(PageMarginSize, nameof(vm.RegistrationTitle), returnToPreviousViewCommandPropertyName: nameof(vm.CancelEnterRegistrationCodeCommand), centerTitle:true),

        new ScrollView { Content = new Grid {
            RowDefinitions = {
                new RowDefinition { Height = 170 },

                new RowDefinition { Height = 75 },
                new RowDefinition { Height = GridLength.Auto },
                new RowDefinition { Height = GridLength.Auto }
            },
            RowSpacing = 0,

            ColumnDefinitions = {
                new ColumnDefinition { Width = 160 },
                new ColumnDefinition { }
            },

            Children = {
                new Label {
                    Margin = fieldNameMargin, LineBreakMode = LineBreakMode.WordWrap, 
                    HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.Center, HorizontalTextAlignment = TextAlignment.Center, 
                }.SetFontSize(WspFontSizes.Size15)
                 .SetColRow(0, 2, 0, 1)
                 .Bind(nameof(vm.RegistrationPrompt)),

                new Label { Text = "Registration code", VerticalOptions = LayoutOptions.End, Margin = fieldNameMargin }.SetFontSize(WspFontSizes.Size13)
                .SetColRow(0, 1, 1, 2),
                new Label { HorizontalOptions = LayoutOptions.End, VerticalOptions = LayoutOptions.End, Margin = fieldNameMargin }.SetFontSize(WspFontSizes.Size13)
                .SetColRow(1, 2, 1, 2)
                .Bind(nameof(vm.RegistrationCodeValidationMessage)),

                new Entry {
                    Placeholder = "E.g. 123456", HeightRequest = 44, Keyboard = Keyboard.Numeric, 
                    BackgroundColor = WspColors.White.ToColor(), TextColor = WspColors.Gray1.ToColor(), Margin = fieldMargin }.SetFontSize(WspFontSizes.Size15)
                .Bind(nameof(vm.RegistrationCode), BindingMode.TwoWay)
                .Id(AId.RegistrationCodePage_CodeEntry)
                .SetColRow(0, 2, 2, 3),

                new Button {
                    Text = "Verify",
                    Margin = PageMarginSize,
                    HeightRequest = 44,
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    TextColor = WspColors.White.ToColor(),
                    BackgroundColor = WspColors.ColorValueAccent.ToColor()
                }.SetFontSize(WspFontSizes.Size13)
                 .Id(AId.RegistrationCodePage_VerifyCodeButton)
                 .Bind(Button.IsVisibleProperty, nameof(vm.CanVerifyRegistrationCode))
                 .Bind(nameof(vm.VerifyRegistrationCodeCommand))
                 .SetColRow(0, 2, 3, 4),
            }
        }}.SetColRow(0, 1)
     }
 };

Nothing advanced is going on here, I use standard C# language features to reuse controls (e.g. PageHeader.Create method ) and to simplify data binding (.Bind extension methods). In my eyes the above reads similar to equivalent XAML.

Which is not very surprising given that XAML is at its heart just an object serialization format in XML. In other words, XAML does what the new keyword in C# does.

Now, C# is designed for humans; while XML is better for tools such as visual designers. As a matter of fact, that was the vision for (WPF) XAML: that human designers could use a tool (Blend) to create a UI that developers could consume. However, I experienced how that vision, even in the best possible time and scenario, failed to deliver (I Built a WPF app for Windows tablet together with a XAML book authoring, leading designer, who was a master in Blend, when that was THE tool. The UI was beautiful and totally unmaintainable). So even if there would come an ultimate visual designer tool for Xamarin Forms, equivalent to the best that Blend ever was, it would still fail for the same reasons. Time to move on, like Flutter?

So, anyone (Xamarin devs and Xamarin team) wants to chime in on either XAML versus C# or redirecting Xamarin IDE efforts?
I'm really curious how Xamarin devs (especially experienced ones) see this.

Thanks!

Property I change from the UI and then submit before popping a page gets changed to null when popped

$
0
0

I have a fairly complex model which I is bound to my UI but also is an object for my SQLite-Net table.

Here is the property I'm trying to change

[Table("MyObjectModel")]
public class MyObjectModel: INotifyPropertyChanged
{
    ...
    public string ObjectsType
    {
        get
         {
              return _objectsType;
         }

         set
         {
               _objectsType= value;
               OnPropertyChanged();
         }
      }
    ...
}

I change it by taking a copy of it using a shallow copy:

EditingItem = originalItem.NewCopy();

public MyObjectModel NewCopy()
{
  return (MyObjectModel)this.MemberwiseClone();
}

I then change the ObjectsType property as I want to, let's say to "STRINGVALUE".

The submit button then saves it to my repository and pops the page, passing the item back as a parameter:

        private async Task SubmitObjectEdit()
        {
              _objectItemRepository.UpdateObjectItem(EditingItem);
              await CoreMethods.PopPageModel(data: EditingItem, modal: true);
        }

On the popped to screen, I immediately put this passed object into a previous objects place in the observable collection. ObjectsType can be anything, let's say "PREVIOUSVALUE". It correctly gets set to "STRINGVALUE". However before execution is complete, the ObjectsType setter is called a final time and set to NULL. I check the call stack and see that this is still happening from the popped pages SubmitObjectEdit() method.

Why does this happen? It seems to be a binding issue or some type of problem with FreshMvvm's PopePageModel. But I'm not explicitly setting the item to null in code, so what gives?

Things I've tried:

Changing to oneway binding in both directions (does not work)
Setting the object property directly instead of copying the passed object into the observable collection (works, but I have to do this with many fields and it's very messy).

How to set Width and Height to 'Entry' tag for platform specifics.

$
0
0

we want to Change Width and Height of Entry tag in XAML file with platform specifics.
to Change width , i am going with below process-
<Entry>
Entry.Width> <OnPlatform x:TypeArguments="GridLength"> <On Platform="iOS">8*</On> <On Platform="Android">9*</On> </OnPlatform> </Entry.Width>
</Entry>

But i getting below error during project build -

Error Position 31:26. No property, bindable property, or event found for 'Width'

is it possible to set width and Height to Entry tag with platform specifics?

Viewing all 91519 articles
Browse latest View live


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