User Profile & Activity

Jevon Christian Member

Hi Domingo,

You can download sample from this problem from : http://git.intersoftpt.com/projects/CROS-SUPP/repos/activity-after-action/browse

The dismissing of Activity Presenter is caused by dismissed Action Presenter. Thus, you should do activity presenter on different thread. To avoid this issue, set the delay of the background thread to 500ms. Please take a look at this code :

IViewService viewService = ServiceProvider.GetService<IViewService>();
                    if (viewService != null)
                    {
                        viewService.RunOnBackgroundThread(() =>
                        {
                            viewService.RunOnUIThread(() =>
                            {
                                this.ActivityPresenter.Show("Updating...", ActivityStyle.SmallIndicatorWithText);
                            });
                        }, 500);
                    }

 

Hope this can help you.

Regards,

Jevon Christian

Dear Nick, 

Conceptually, Crosslight is assembled above Xamarin and Microsoft. Xamarin platforms enable developers to use C# language to build iOS and Android apps. Normally, if we wish to build apps for Android, we need to use Java. Likewise, if we wish to build apps for iOS, we would use Objective-C. Think Xamarin as the "translator" that allows us to achieve the same goal using a different language, which is C#.
Since Crosslight is built on top of Xamarin, it inherits the same nature. As a result Crosslight doesn't have CSS. The framework you're referring to is more compatible with hybrid mobile apps, which means, building mobile apps using HTML. Therefore, if you want to design your Crosslight mobile apps,you may refer each platform design to its corresponding native way. 

Regards, 
Jevon Christian

Hi Nick,


Please try this sample : http://git.intersoftpt.com/projects/CROS-SUPP/repos/tab-with-table-navigation/browse

The most important code for this problem is in the TabViewController.cs. See the following code :

protected override bool EnsureNavigationContext
        {
            get
            {
                return true;
            }
        }

Hope it can solve your problem. Feel free to ask if you have other thoughts.

Regards,

Jevon Chtistian

 

Hi Domingo,

We have prepared a sample for you. You may check it out here :http://git.intersoftpt.com/projects/CROS-SUPP/repos/refresh-list-view/browse

This issue came up because another ViewModel run before the process of previous ViewModel finished. As a solution, it can be solved by managing the threads. Please pay attention on this code :

IViewService viewService = ServiceProvider.GetService<IViewService>();
            if (viewService != null)
            {
                viewService.RunOnBackgroundThread(() =>
                {
                    viewService.RunOnUIThread(() =>
                    {
                        this.NavigationService.Navigate<SimpleViewModel>(
                            new NavigationParameter()
                        {
                            NavigationMode = NavigationMode.Modal, 
                            EnsureNavigationContext = true,
                            ModalPresentationStyle = ModalPresentationStyle.Default
                        });
                    });
                }, 1);
            }

 Hope this helps. Feel free to discuss it further if you have any other thought.

Regards,

Jevon Christian


Hi Domingo,

Thanks for sending out your sample. We understand your difficulties in implementing the BindableProperties, therefore we have attached a sample that might help you to understand and implement your own BindableProperties for the SignaturePad. Since this is a custom view, it might be difficult to use the built-in bindable properties that comes with Crosslight.iOS. We would like to suggest you to create your own binding adapter with your own bindable properties that will help you to achieve your goal elegantly.

Take a look at this sample : https://github.com/IntersoftSolutions/CustomBinding

First of all, I will explain a bit how this sample works. In this sample, I have created a view named UISignaturePadView. Then, the next logical step would be, I have to create the "connection" between my custom label and my custom bindable properties. This is where the binding adapter comes in. By using the binding adapter, and registering the binding adapter in the AppInitializer, this allows you to "connect" your custom view with your bindable properties.also giving you full control during the attach, detach, get, set value of each bindable properties to your custom view. Then in the binding provider, when you add your own AddBinding definition, notice that the Attach and the proper Get-Set event gets triggered in the BindingAdapter lifecycle. In this sample, I'm just creating a simple, custom bindable text property that can be bound to my custom label.

All times are GMT -5. The time now is 7:13 AM.
Previous Next