Telerik Forums
UI for Xamarin Forum
0 answers
137 views
Please provide sample for implementing TabView using Caliburn.Micro IOC framework
RAJEEV
Top achievements
Rank 1
 asked on 09 Nov 2017
1 answer
136 views
I'm looking for a way to activate a reorder in a radlist other than by long press (ideally I want a small grab handle in the row that they can use to reorder by just dragging on that grab handle).  Is there a way to change the trigger for the reorder, to trigger the reorder programmatically, or something else I haven't thought of to get this behavior?
Lance | Senior Manager Technical Support
Telerik team
 answered on 09 Nov 2017
1 answer
187 views
Hi, How can I error trapping on WebView. I want to redirect to another page if url not found

      <Button
        android:id="@+id/Button4"
        android:layout_width="380.5dp"
        android:layout_height="1.0dp"
        android:background="#fa3e3e"
        android:textSize="11dp"
        android:layout_marginRight="295.5dp"
        android:visibility="invisible"
        android:text="Load" />
    <AbsoluteLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <WebView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:id="@+id/webView" />
    </AbsoluteLayout>

click event on button4 will load the page:

    protected override void OnCreate(Bundle bundle)
        {
            
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            mWebClient = new WebClient();
            mWebView = FindViewById<WebView>(Resource.Id.webView);
            mButton4 = FindViewById<Button>(Resource.Id.button4);
            mButton4.Click += mButton4_Click;

 void mButton4_Click(object sender, EventArgs e)
        {
        mWebClient.ShouldOverrideUrlLoading(mWebView,"http://something.com");
        }
}
   public class WebClient : WebViewClient
    {
        public override bool ShouldOverrideUrlLoading(WebView view, string url)
        {
            view.LoadUrl(url);  
            return true;
        }
       
    }

Any help?  Thank you
Lance | Senior Manager Technical Support
Telerik team
 answered on 09 Nov 2017
1 answer
130 views

Hi,

is there a way to center text inside LoadOnDemandItemTemplate template?

The current code in the documentation produces left aligned text. Thanks

<telerikDataControls:RadListView.LoadOnDemandItemTemplate>
    <DataTemplate>
        <Grid BackgroundColor="Red">
            <Label FontSize="24"
                   HorizontalOptions="Center"
                   Text="Load more items"
                   TextColor="Black" />
        </Grid>
    </DataTemplate>
</telerikDataControls:RadListView.LoadOnDemandItemTemplate>
Lance | Senior Manager Technical Support
Telerik team
 answered on 09 Nov 2017
4 answers
234 views

Hi there

I can't get the AutoComplete control to update it's ItemsSource via data binding.  Everything appears to go smoothly...  I use the OnPropertyChanged event to update the ObservableCollection<string> in the model, and then call RaisePropertyChanged("SearchResults"), but nothing happens client side.  It's still attached to the original list of test items I started with.  I don't replace the ObservableCollection, I'm clearing it and then added the new values.  If I try to replace the collection, the application crashes.

xaml

<input:RadAutoComplete
    x:Name="AutoCompleteAddress"
    Watermark="Search here..."
    ItemsSource="{ Binding SearchResults }"
    PropertyChanged="AutoCompleteAddress_OnPropertyChanged"
    CompletionMode="Contains"/>

 

Code Behind

private void AutoCompleteAddress_OnPropertyChanged(object sender, PropertyChangedEventArgs e)
{
    if (e.PropertyName == "Text")
    {
        var addressDetailsPageModel = (AddressDetailsPageModel)BindingContext;
        addressDetailsPageModel.SearchAddress(AutoCompleteAddress.Text.Trim());
    }
}

 

Page Model

public async void SearchAddress(string searchText)
{
    var searchResults = await _addressSearchService.SearchAsync(searchText);

    SearchResults.Clear();

    foreach (var searchResult in searchResults)
        SearchResults.Add(searchResult);

    RaisePropertyChanged("SearchResults");
}

public ObservableCollection<string> SearchResults { get; set; }

 

Any ideas?

 

Cheers

Stefan Nenchev
Telerik team
 answered on 08 Nov 2017
9 answers
115 views
How can  i add images for editor controls in dataform as shown in attached image?
vivek
Top achievements
Rank 1
 answered on 07 Nov 2017
1 answer
85 views

So I have a button that is revealed when a user swipes a cell. I then want to change the Cell BackgroundColor when the revealed button is tapped. I am having a tough time since the Button has no correlation to the cell the user swiped. I tried to implement a style trigger as I feel this would be the way to do it but I am not sure how to implement that with the RadListView. This is what I tried:

 

<ContentView.Resources>
        <ResourceDictionary>
            <Style TargetType="dataControls:RadListView" x:Key="CellStyle">
                <Style.Triggers>
                    <DataTrigger Binding="{Binding ButtonText}"
                                 Value="Start">
                        <Setter Property="BackgroundColor"
                                Value="White" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding ButtonText}"
                                 Value="Complete">
                        <Setter Property="BackgroundColor"
                                Value="Gray" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </ResourceDictionary>
    </ContentView.Resources>
Stefan Nenchev
Telerik team
 answered on 07 Nov 2017
3 answers
159 views
I try use RadCalendar in my Xamarin Forms app(Master Detail navigation). I added RadCalendar in my page and my page loaded 4 seconds. 
I tried official example SDKBrowser. I opened  Calendar-Getting Started-Xaml page - it is 3 seconds. This is only simpe page with RadCalendar. It is very long.
Is it possible to speed it up? Any ideas?
Namysław
Top achievements
Rank 1
 answered on 06 Nov 2017
2 answers
79 views

Hi, I'm creating a calendar control in xaml and ideally want to set the 'TrySetViewMode' (viewmode) in xaml but there doesnt seem a way to do this. I would like to bind it via a view model so i can switch the view to day/month etc.

For now i'm looking at just setting it int he content page code behind.

i've added the renderer as per the sample QR project.

xaml:

                <Controls:DayViewCalendar
                IsVisible="{Binding IsDayViewVisible}"
                AppointmentsSource="{Binding Appointments}"
                VerticalOptions="FillAndExpand"
                SelectedDate="{Binding SelectedDate, Mode=TwoWay}"   
                    
                x:Name="calendar" >
                    <Controls:DayViewCalendar.AppointmentsStyle>
                        <telerikInput:CalendarAppointmentsStyle DisplayMode="Shape" ShapeType="Ellipse"  />
                    </Controls:DayViewCalendar.AppointmentsStyle>
                </Controls:DayViewCalendar>

 

in the code behind i'm calling:

in contructor:

                InitializeComponent();
                calendar.TrySetViewMode(CalendarViewMode.Day);

 

But on run this still shows the month view and not day view. but if i hook up the CellTapped event and change in there is changes the view.

How can i get round this? and ideally how can I set this in XAML bound to a viewmodel?

regards

Steve

Lance | Senior Manager Technical Support
Telerik team
 answered on 06 Nov 2017
2 answers
206 views

I'm trying to create a customrenderer for the ListView control to allow me to scroll to a specific item in list. I've managed to do this for Android, although I had to do reflection to get at the needed properties. But it works well enough.

I'm now trying to implement for iOS and am running into a problem finding the NSIndexPath for the selected item.

I've found the ScrollToItem method on TKListView, but it requires an NSIndexPath. I have access to the actual item from my Xamarin.Forms library, how do I translate that into an NSIndexPath?

Duane
Top achievements
Rank 1
 answered on 03 Nov 2017
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?