User Profile & Activity

Hans Kristian Member
Page
of 69
Posted: October 10, 2014 7:26 AM

Hello,

I apologize for the late response.

UXGridViewSelectColumn type provides an easy way to enable selector column which allows you to check or uncheck a row in UXGridView. The checked items are accessible in the CheckedItems property. This column type also automatically adds a checkbox in the column header, allowing users to easily toggle the checked state of all the rows in the view.

For more information regarding ‘UXGridViewSelectColumn’, you could follow this link below:
http://www.intersoftpt.com/Support/ClientUI/Documentation/UXGridView.html

Hope this helps.

Regards,
Hans K.

Posted: October 8, 2014 10:45 AM

Hello,

Thank you for the question regarding UXGridView.

I will investigate this scenario further more and I will back as soon as posible.

Regards,
Hans K.

Posted: October 7, 2014 8:34 AM

Hello,

Thank you for waiting.

I got news from the developer team about how to achieve your scenario.

To show you how to do that, I will use one of UXGridView sample in ClientUI. I will modify the default page of ‘UXGridView/Reference’ samples, named ‘Baseball Hall of Fame’ page.
You could found the ClientUI Samples in “C:\Program Files (x86)\Intersoft Solutions\Intersoft Premier Studio 2014 R1\Samples\SL5\cs\ClientUI Samples\”.

In the page, I will try to collapse the ExpanderButton’s UXGridView 2nd row.

Here’s the several file that I modified:
1) Player.cs. You could found the file, under ‘Models’ folder in ‘Assets’ project (Intersoft.ClientUI.Samples.Assets\Models).
In this page, I add new Properties, named ‘Visible’.

public Visibility Visible{
    get
    {
        // To collapse the 2nd row UXGridViewExpanderButton
        if (_ID == "PL02")
            return Visibility.Collapsed;
        else
            return Visibility.Visible;
    }
}

2) HallOfFameStyles.xaml. You could found the file, under ‘Assets -> Styles’ folder in ‘UXGridView’ project (Intersoft.ClientUI.Samples.UXGridView\Assets\Styles).
In this page, I will add new Setter under ExpanderButtonStyle.

<Style x:Key="ExpanderButtonStyle" TargetType="Intersoft:UXGridViewExpanderButton">
    …
    <Setter Property="Visibility" Value="{Binding Visible}"/>
    …
</Style>

I attached the modified files and the screenshot about the result.
Please kindly have review on the attached files and let me know your response.

Thank you for your help.

Regards,
Hans K.

Posted: October 3, 2014 10:26 AM

Hello,

Thank you for the question.

I will investigate this scenario further more with the developer team. And I will back to you as soon as possible.

Thank you for waiting.

Regards,
Hans K.

Posted: October 2, 2014 9:37 AM
Hello,

Yes, there is a way to add icon to the navigation menu.

To show how to add the icon in navigation menu, I made a Crosslight project using Business Template.

In this Crosslight Business project (CustomNavigatioNemu application), I will modify the last Navigation Item (‘About This App’ item) by adding an icon to the navigation item, in Android project.

In order to achieve this scenario, here’s the couple things that you should modify:

1. Add your icon in ‘Resources - > drawable’ folder, under Android project.

2. Under Android project, there is ‘NavigationViewModel.cs’ file, in ViewModel folder. In that file, I modify a line of code

From:
items.Add(new NavigationItem("About This App", "About", typeof(AboutNavigationViewModel)));

To:
items.Add(new NavigationItem("About This App", "About", typeof(AboutNavigationViewModel)) { Image = "icon.png" });

3. Under Android project, there is ‘navigation_item_layout.axml’ file, in Resources -> layout folder. In that file, I add a line of code:

<ImageView android:id="@+id/ImageView" android:layout_width="20dp" android:layout_height="20dp" android:layout_gravity="center" android:layout_marginLeft="20dp" android:layout_marginTop="2dp" />

You should use “@+id/ImageView” for “android:id”.


4. Under Android project, there is ‘NavigationListFragment.cs’ file, in Activities folder. In that file, I modify the code in ‘ListItemLayoutId’ function
protected override int ListItemLayoutId
{
    get { return Resource.Layout.navigation_item_layout; }
}

5. Under Core project, ‘NavigationBindingProvider.cs’ file, in BindingProviders folder. In that file, I add a line of code in ‘NavigationBindingProvider()’ function:

ItemBindingDescription itemBinding = new ItemBindingDescription
{
    DisplayMemberPath = "Title",
    NavigateMemberPath = "Target",
    ImageMemberPath = "Image"
};

You could do the same thing for iOS & WinPhone project.


You could get the project from this link: http://1drv.ms/1ryoC2T. Please kindly have review on the project and let me know your response.


For further information regarding Navigation Item, please kindly follow this link:

http://developer.intersoftpt.com/display/crosslight/Using+List+as+Navigation+Interface



Thank you.


Regards,

Hans K.

Posted: October 2, 2014 4:20 AM

Hello,

Thank you for the question regarding Crosslight.

I have created a Crosslight project that using custom service that perhaps can be the best approach with your current scenario. The custom service will return the string to the ViewModel through callback.

First, I created a simple Crosslight sample by using Blank project template.

Next, I added an interface called ‘ICustomService’ which inherits ‘IMobileComponentService’. The snippet code below shows how the interface is declared in ‘ICustomService.cs’ file in the Core project.

using Intersoft.Crosslight.Mobile;
namespace CustomService.Core.Custom
{
    public interface ICustomService : IMobileComponentService
    {
        void DoSomething(Action<string> callback);
    }
}

In the SimpleViewModel class, ShowToast function is modified by resolving CustomService via IoC (injection of Container) technique. If customService is not null, invokes 'DoSomething()' method.

private void ShowToast(object parameter)
{
    //this.ToastPresenter.Show("You entered: " + this.NewText);
    //this.GreetingText = this.NewText;

    ICustomService customService = ServiceProvider.GetService<ICustomService>(); //resolve CustomService via IoC (injection of Container)
    if (customService != null)
    {
        customService.SetOwner(this); //needed for Android platform only
        customService.DoSomething((callback) => { 
            //do something with the callback
            System.Diagnostics.Debug.WriteLine(callback);
        });
    }
}

Next, we need to register the custom service in the AppInitializer class, specifically in the InitializeServices method.

public void InitializeServices(IApplicationHost appHost)
{
    ServiceProvider.AddService<ICustomService, CustomiOSService>();
}

Please note that we need to repeat this step for each platform (Android, iOS, Windows Phone, and Windows StoreApp).

Last, implement DoSomething method for each platform. In the sample, what DoSomething doing is very easy, it shows "Custom Service" alert and send the string value back to ViewModel.

using CustomService.Core.Custom;
using Intersoft.Crosslight.iOS;
using MonoTouch.UIKit;

namespace CustomService.iOS.Custom
{
    public class CustomiOSService : IOSMobileComponentServiceBase, ICustomService
    {
        public void DoSomething()
        {
            UIAlertView alert = new UIAlertView("Custom service", "Custom Service", null, "OK", null);
            alert.Show();
            
            // to send string value to the ViewModel
            callback("test");
        }
    }
}

The sample can be downloaded in http://git.intersoftpt.com/projects/CROS-SUPP/repos/custom-service/browse. Please let us know whether this help or not.

Regards,
Hans K.

Posted: September 30, 2014 3:19 AM

Hello,

Thank you for the reply.

I glad to hear that you have successfully compile your solution using the nightly build.

Should you have further question, please do not hesitate to contact us.

Regards,
Hans K.

Posted: September 29, 2014 4:29 AM

Hello,

Thank you for the question.

In your iOS project there is file named ‘AppDelegate.cs’.
In that file, you simply modify the inherit AppDelegate class from ‘UIPushAppDelegate’ to ‘UIAppDelegate’.
Here’s the snippet code example after apply the changes in ‘AppDelegate.cs’ file:

[Register ("AppDelegate")]public partial class AppDelegate : IntersoftCore.UIApplicationDelegate
{
 protected override UIViewController WrapRootViewController(UIViewController contentViewController)
 {
  if (contentViewController is UISplitViewController || contentViewController is UITabBarController)
   return contentViewController;

  return new UINavigationController(contentViewController);
 }
}

I apologize for any inconvenience this problem may have caused you.

Regards,
Hans K.

Posted: September 26, 2014 4:18 AM

Hello,

Thank you for waiting.

Now, you could download the nightly build (Crosslight2_0_5000_90) from this link.
To download the hotfix, click on “Crosslight2_0_5000_90.zip” link and then click “Download this file” link.

Hope this help.

Regards,
Hans K.

Posted: September 25, 2014 4:41 AM
Hello,

Thank you for the question regarding Crosslight product.
We apologize for any inconvenience this problem may have caused you.

We'll be shipping official iOS8 release in Crosslight 3.
We will make available a nightly build this month. This build already include the iOS 8 support bits.

For your information, our iOS bit is now built upon Xamarin iOS 8. So it won't work with previous version of Xamarin.

We will back as soon as possible if the nightly build is ready.

Thank you for your understanding.

Regards,
Hans K.


All times are GMT -5. The time now is 11:31 PM.
Previous Next