Telerik Forums
UI for Xamarin Forum
2 answers
747 views

Hi, I am stuck at:

I can set the SlidingToIndex command, but I can't define the {binding} part like for the RadListview (for exemple: <telerikListViewCommands:ListViewUserCommand Id="ItemTap" Command="{Binding ItemTapCommand}" />)

Any idea?

 

<telerikPrimitives:RadSlideView x:Name="slideView">
    <telerikPrimitives:RadSlideView.ItemsSource>
        <x:Array Type="{x:Type ContentView}">
            <ContentView>
                <telerikInput:RadCalendar Margin="50, 30"/>
            </ContentView>
            <ContentView>
                <Label HorizontalOptions="Center" VerticalOptions="CenterAndExpand" Text="Other View" TextColor="Blue" />
            </ContentView>
            <ContentView>
                <Label HorizontalOptions="Center" VerticalOptions="CenterAndExpand" Text="Another View" TextColor="Red" />
            </ContentView>
        </x:Array>
    </telerikPrimitives:RadSlideView.ItemsSource>
    <telerikPrimitives:RadSlideView.Commands>
        <telerikSlideViewCommands:SlideViewCommand Id="SlidingToIndex" />
    </telerikPrimitives:RadSlideView.Commands>
</telerikPrimitives:RadSlideView>
Pierre
Top achievements
Rank 2
Iron
Iron
 answered on 25 Jan 2019
3 answers
849 views

Hi, I'm sure this is something I'm just missing but I need another pair of eyes...  I have a Content Page that I put the below listview in it and I wanted the list to have a span count of 2, like your example online.   I was have trouble with the layout and I removed the LayoutDefinition and once it started working properly (single list view) I add the Definition back in (copy/paste) and compiled and got the error.

If I remove the LayoutDefinition tag it works....

My includes:

xmlns:tDataCtrl="clr-namespace:Telerik.XamarinForms.DataControls;assembly=Telerik.XamarinForms.DataControls"
xmlns:tListView="clr-namespace:Telerik.XamarinForms.DataControls.ListView;assembly=Telerik.XamarinForms.DataControls"
            

 

 

<tDataCtrl:RadListView x:Name="memberList" ItemsSource="{Binding TeamMembers}"  Margin="20,0,0,0"   BackgroundColor="White"   VerticalOptions="FillAndExpand" IsVisible="{Binding MembersVisible}">
            
                              <tDataCtrl:RadListView.ItemTemplate>
                                <DataTemplate>
                                  <tListView:ListViewTemplateCell>
                                    <tListView:ListViewTemplateCell.View>
                                         <Grid BackgroundColor="White">
                                            <Grid.RowDefinitions>
                                              <RowDefinition Height="220"/>
                                              <RowDefinition Height="18"/>
                                              <RowDefinition Height="18"/>
                                            </Grid.RowDefinitions>
                                            <Grid.ColumnDefinitions>
                                              <ColumnDefinition Width="Auto"/>
                                            </Grid.ColumnDefinitions>
                                            <ff:CachedImage Source="{Binding Image}"  HeightRequest="220"    Aspect="AspectFit"    Grid.Row="0"   
                                                      HorizontalOptions="CenterAndExpand"   VerticalOptions="CenterAndExpand"  Margin="0,0,10,0"/>
                                            <Label Text="{Binding FullName}"   FontSize="{Binding RoleToPresent}"   LineBreakMode="WordWrap"    TextColor="Black"  Margin="8,0,8,0" Grid.Row="1" HorizontalOptions="Start"/>
                                            <Label Text="{Binding RoleToPresent}" FontSize="{Binding RoleToPresent}" LineBreakMode="WordWrap"   TextColor="Black" Margin="8,0,8,0"  Grid.Row="2" HorizontalOptions="Start"/>
                                         </Grid>       
                                        </tListView:ListViewTemplateCell.View>
                                      </tListView:ListViewTemplateCell>
                                    </DataTemplate>
                                  </tDataCtrl:RadListView.ItemTemplate>
                                   <tDataCtrl:RadListView.LayoutDefinition >
                             
                                        <tListView:ListViewGridLayout Orientation="Vertical"  ItemLength="280"  SpanCount="2"    VerticalItemSpacing="30"  HorizontalItemSpacing="30"/>
                                   </tDataCtrl:RadListView.LayoutDefinition>
                        </tDataCtrl:RadListView> 

 

 

Thank you,

Brian

Brian
Top achievements
Rank 2
 answered on 24 Jan 2019
1 answer
185 views

Hi, I am needing to draw a shadow around RadListView Items.  I'm using Border but I don't see how to do a shadow effect and I don't want to use Frames.  Can you help with an example or snippet of code please?  Attaching a pic so you can see the type of shadow effect I'm trying to achieve. 

Thanks guys!

Brian

P.S. Sorry for the other post on this forum.  I hit submit too early didn't actually ask a question.   I did see a way to edit the post or to delete it.

 

Didi
Telerik team
 answered on 24 Jan 2019
1 answer
231 views

Hi, I'm using RadBorder to round corners of the items in a RadListView.  I added the requested mockup.  I'm needing this for iOS and Android.

 

Didi
Telerik team
 answered on 24 Jan 2019
0 answers
78 views

Hi Team,

I want to know few things for TKCalendar as below. 

1. How to set Monday as first week day of month?

2. Can I make particular date selection disable?

 

Thanks,

Avinash

 

avinash
Top achievements
Rank 1
 asked on 23 Jan 2019
2 answers
146 views

Hello, 

I have 13 digits gencods, and i need to generate EAN13 BarCode. 

But it seems RadBarcode only accept 12 digits for EAN13 (or it crashs)

What should I do ? I need to convert my 13 digits gencod into 12 digits ? 

 

Thanks

Yana
Telerik team
 answered on 23 Jan 2019
3 answers
214 views

We are trying out the RadSlideView but we are having a problem with the first swipe on the control when the app first starts.

Our page RadSlideView correctly displays the first ContentView.

When we swipe left to move to the next content view it briefly appears and then disappears and we are left with a blank page. The indicators do not change.

If we then swipe again we do move to the next content view and the indicator moves and if we swipe back again the first page appears correctly.

In addition we have hooked up a command button which increments the SelectedIndex property of the control and this works correctly.

We are not seeing any exceptions in the debug window or the ios device log.

Below is our page and view model

Any advice would be helpful.

Thanks

<?xml version="1.0" encoding="utf-8" ?>
<pageBase:ContentPageBase xmlns="http://xamarin.com/schemas/2014/forms"        
                xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                xmlns:base="clr-namespace:Tempcover.Mobile.Ui.ViewModels.Base;assembly=Tempcover.Mobile.Ui"
                xmlns:pageBase="clr-namespace:Tempcover.Mobile.Ui.Views.Base;assembly=Tempcover.Mobile.Ui"
                xmlns:primitives="clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives"
                x:Class="Tempcover.Mobile.Ui.Views.IntroCarouselPage"
                          BackgroundColor="White"
                base:ViewModelLocator.AutoWireViewModel="true">
 
 
    <Grid>
    <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <primitives:RadSlideView
            BackgroundColor="White"
            Grid.Row="0"
            Grid.Column="0"
            x:Name="SlideView"
            IndicatorText="•"
            IndicatorFontSize="64"
            IndicatorColor="LightBlue"
            SelectedIndicatorText="•"
            SelectedIndicatorFontSize="96"
            SelectedIndicatorColor="{DynamicResource Primary}"
            ShowButtons="false"
            SelectedIndex="{Binding SelectedIndex}">
             
            <primitives:RadSlideView.ItemsSource>
                <x:Array Type="{x:Type ContentView}">
                    <ContentView>
                        <StackLayout Style="{StaticResource IntroCarouselStackLayoutStyle}">
                            <Image Source="tempcover.png" Margin="10,0,10,0" VerticalOptions="Center" HeightRequest="128" />
                            <Label VerticalOptions="Start" Style="{StaticResource IntroCarouselPanelLabelHeaderStyle}" Text="Fast, flexible and affordable temporary insurance"></Label>
                        </StackLayout>
                    </ContentView>
                    <ContentView>
                        <StackLayout  Style="{StaticResource IntroCarouselStackLayoutStyle}">
                            <Image Source="Page2.png" VerticalOptions="Center" HeightRequest="100" />
                            <Label Style="{StaticResource IntroCarouselPanelLabelHeaderStyle}" Text="Find and compare short term cover quicker than ever before"></Label>
                            <Label Style="{StaticResource IntroCarouselPanelLabelSubheaderStyle}" Text="Create your account and get instant accesss to a range of quotes" />
                        </StackLayout>
                    </ContentView>
                    <ContentView >
                        <StackLayout   Style="{StaticResource IntroCarouselStackLayoutStyle}">
                            <Image Source="Page3.png" VerticalOptions="Center" HeightRequest="100" />
                            <Label Style="{StaticResource IntroCarouselPanelLabelHeaderStyle}" Text="View all your policy documents in one convenient place"></Label>
                            <Label Style="{StaticResource IntroCarouselPanelLabelSubheaderStyle}" Text="Login to get easy access to your documents and update your details in seconds" />
                        </StackLayout>
                    </ContentView>
                    <ContentView >
                        <StackLayout  Style="{StaticResource IntroCarouselStackLayoutStyle}">
                            <Image Source="Page4.png" VerticalOptions="Center" HeightRequest="100" />
                            <Label Style="{StaticResource IntroCarouselPanelLabelHeaderStyle}" Text="And that's it, everything you need for temporary insurance is right here"></Label>
                            <Label Style="{StaticResource IntroCarouselPanelLabelSubheaderStyle}" Text="Ready to get started? Click the button below to login and begin!" />
                        </StackLayout>
                    </ContentView>
 
                </x:Array>
            </primitives:RadSlideView.ItemsSource>
        </primitives:RadSlideView>
        <StackLayout Grid.Row="1" Grid.Column="0">
            <Button Margin="10" x:Name="SeeMoreCommand" Text="{Binding BottomButtonText}"  Style="{StaticResource ButtonPrimaryStyle}" Command="{Binding SeeMoreCommand}"/>
            <Label HorizontalOptions="Center" Text="Already have an account?"></Label>
            <Label Text="Sign in now" HorizontalOptions="Center" TextColor="Blue">
                <Label.GestureRecognizers>
                    <TapGestureRecognizer NumberOfTapsRequired="1" Command="{Binding SignInNowCommand}"/>
                </Label.GestureRecognizers>
            </Label>
        </StackLayout>
    </Grid>
    </pageBase:ContentPageBase>
using System.Collections.ObjectModel;
using System.Threading.Tasks;
using Tempcover.Mobile.Ui.ViewModels.Base;
using Tempcover.Mobile.Ui.ViewModels.Enums;
using Xamarin.Forms;
using System.Windows.Input;
using System;
 
namespace Tempcover.Mobile.Ui.ViewModels
{
    public class IntroCarouselViewModel : ViewModelBase
    {
 
 
        public IntroCarouselViewModel()
        {
            CarouselSource = new ObservableCollection<View>();
            SelectedIndex = 0;
        }
 
        public override Task<Initialise> InitializeAsync(object navigationData)
        {
            return Task.FromResult(Initialise.Success);
        }
 
        public Command MyCommand { protected set; get; }
 
        public ICommand SignInNowCommand
        {
            get
            {
                return new Command(() =>
                {
                    throw new NotImplementedException();
                });
            }
        }
 
 
        private string _person;
        public string Person
        {
            get { return _person; }
            set
            {
                _person = value;
                RaisePropertyChanged(() => Person);
            }
        }
 
        private int _selectedIndex;
        public int SelectedIndex
        {
            get { return _selectedIndex; }
 
            set
            {
                _selectedIndex = value;
                RaisePropertyChanged(() => SelectedIndex);
                RaisePropertyChanged(() => BottomButtonText);
            }
        }
 
        ObservableCollection<View> _carouselSource;
        public ObservableCollection<View> CarouselSource
        {
            set
            {
                _carouselSource = value;
                RaisePropertyChanged(() => CarouselSource);
            }
            get
            {
                return _carouselSource;
            }
        }
 
        private string _BottomButtonText;
        public string BottomButtonText
        {
            get {
                switch (SelectedIndex)
                {
                    case 3:
                        return "Set up your account";
                    default:
                        return "See more";
                }
            }
 
        }
 
        public ICommand SeeMoreCommand
        {
            get
            {
                return new Command(() =>
                {
                    if (SelectedIndex <3)
                    {
                        SelectedIndex++;
                    }
                    else
                    {
                        // navigate to the login page
                    }
                });
            }
        }
 
 
    }
}
using System.Diagnostics;
using Tempcover.Mobile.Ui.Views.Base;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
 
namespace Tempcover.Mobile.Ui.Views
{
    [XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class IntroCarouselPage : ContentPageBase
    {
        public IntroCarouselPage()
        {
            InitializeComponent();
            NavigationPage.SetHasNavigationBar(this, false);
        }
    }
}

 

Didi
Telerik team
 answered on 23 Jan 2019
1 answer
198 views

Hi,

its possible to show a checkbox instead of True/false DataColumn ?

Thnaks in advance

Didi
Telerik team
 answered on 22 Jan 2019
4 answers
131 views

If I add the following code into the .xaml file, it works fine on the device but prevents the previewer from displaying (see attached png for error).

Is there a way around this? I'd rather not have to build every time I want to see how my page is looking.

<telerikChart:RadPieChart.Palette>
    <telerikChart:ChartPalette>
        <telerikChart:ChartPalette.Entries>
            <telerikChart:PaletteEntry FillColor="#EF694D" />
            <telerikChart:PaletteEntry FillColor="#AAEF4D" />
            <telerikChart:PaletteEntry FillColor="#76D0F1" />
            <telerikChart:PaletteEntry FillColor="#E98AE2" />
            <telerikChart:PaletteEntry FillColor="#E9C18A" />
            <telerikChart:PaletteEntry FillColor="#E2E98A" />
        </telerikChart:ChartPalette.Entries>
    </telerikChart:ChartPalette>
</telerikChart:RadPieChart.Palette>

 

Yana
Telerik team
 answered on 22 Jan 2019
2 answers
74 views

To set the SelectedIndicatorText you use 

SelectedIndicatorText="&#9830;"

How can i tell what shapes are available?

Yana
Telerik team
 answered on 22 Jan 2019
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?