New version of Progress Telerik UI for Xamarin SDK examples.

This commit is contained in:
GitTask 2021-06-16 15:11:29 +03:00
Родитель 1c1602a2af
Коммит 30cc597559
20 изменённых файлов: 89 добавлений и 64 удалений

Просмотреть файл

@ -58,7 +58,7 @@ namespace SDKBrowser.Droid.Examples.CalendarControl.StylingCategory.CustomRender
calendar.Get(Java.Util.CalendarField.Year) == currentYear)
{
calendarCell.BorderColor = Android.Graphics.Color.ParseColor("#00FF44");
calendarCell.BorderWidth = Forms.Context.ToPixels(2);
calendarCell.BorderWidth = global::Android.App.Application.Context.ToPixels(2);
calendarCell.Typeface = boldTypeface;
}

Просмотреть файл

@ -1,4 +1,4 @@
using Android.App;
using AndroidX.AppCompat.App;
using Com.Telerik.Widget.Dataform.Engine;
using Com.Telerik.Widget.Dataform.Visualization;
using Com.Telerik.Widget.Dataform.Visualization.Core;
@ -22,7 +22,7 @@ namespace SDKBrowser.Droid.Examples.DataFormControl.EditorsCategory.CustomEditor
{
if (property.PropertyName == "Option")
{
return new PopupEditor(form, nativeProperty, ((Activity) this.Context).FragmentManager);
return new PopupEditor(form, nativeProperty, ((AppCompatActivity)this.Context).SupportFragmentManager);
}
return base.GetCustomEditorForProperty(form, nativeProperty, property);

Просмотреть файл

@ -1,8 +1,8 @@
using System;
using System.Collections.Generic;
using Android.App;
using Android.Views;
using Android.Widget;
using AndroidX.Fragment.App;
using Com.Telerik.Widget.Dataform.Engine;
using Com.Telerik.Widget.Dataform.Visualization;
using Com.Telerik.Widget.Dataform.Visualization.Core;

Просмотреть файл

@ -1,9 +1,9 @@
using System.Collections.Generic;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Views;
using Android.Widget;
using AndroidX.Fragment.App;
using Com.Telerik.Widget.Dataform.Engine;
namespace SDKBrowser.Droid.Examples.DataFormControl.EditorsCategory.CustomEditorExample

Просмотреть файл

@ -488,7 +488,7 @@
<Version>1.1.0.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2012" />
<PackageReference Include="Xamarin.Essentials" Version="1.5.3.2" />
<PackageReference Include="Xamarin.Essentials" Version="1.6.1" />
<PackageReference Include="Xamarin.Google.Android.Material">
<Version>1.0.0.1</Version>
</PackageReference>

Просмотреть файл

@ -60,7 +60,7 @@ namespace SDKBrowser.Droid
Intent intent = new Intent(Intent.ActionView);
intent.SetDataAndType(path, mimeType);
Forms.Context.StartActivity(Intent.CreateChooser(intent, "Choose App"));
global::Android.App.Application.Context.StartActivity(Intent.CreateChooser(intent, "Choose App"));
}
return;

Просмотреть файл

@ -592,6 +592,9 @@
<PackageReference Include="Xam.Plugins.Settings">
<Version>3.1.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.6.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms">
<Version>5.0.0.2012</Version>
</PackageReference>

Просмотреть файл

@ -633,7 +633,7 @@
<Version>3.1.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.5.3.2</Version>
<Version>1.6.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms">
<Version>5.0.0.2012</Version>

Просмотреть файл

@ -4,22 +4,22 @@
xmlns:telerikPrimitives="clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives"
xmlns:telerikInput="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"
x:Class="SDKBrowser.Examples.BadgeViewControl.FeaturesCategory.BadgeAlignPositionExample.BadgeAlignPosition">
<StackLayout>
<StackLayout HorizontalOptions="Center">
<!-- >> badgeview-align-position-offset -->
<telerikPrimitives:RadBadgeView BadgeText="Add"
BadgeFontSize="Medium"
BadgeHorizontalPosition="Start"
BadgeVerticalPosition="End"
BadgeHorizontalAlignment="Start"
BadgeVerticalAlignment="Start"
BadgeCornerRadius="0"
<telerikPrimitives:RadBadgeView BadgeText="12"
BadgeVerticalPosition="Center"
BadgeHorizontalAlignment="End"
BadgeOffsetX="-5"
VerticalOptions="Center">
<telerikPrimitives:RadBadgeView.Content>
<telerikInput:RadButton HeightRequest="40"
WidthRequest="80"
Text="Shopping"
<telerikInput:RadButton HeightRequest="40"
WidthRequest="180"
CornerRadius="20"
Text="Shopping Cart"
TextColor="White"
VerticalOptions="Center"
BackgroundColor="LightBlue"/>
VerticalContentAlignment="Center"
BackgroundColor="#0E88F2"/>
</telerikPrimitives:RadBadgeView.Content>
</telerikPrimitives:RadBadgeView>
<!-- << badgeview-align-position-offset -->

Просмотреть файл

@ -2,38 +2,50 @@
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:telerikPrimitives="clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives"
xmlns:telerikInput="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"
xmlns:telerikListView="clr-namespace:Telerik.XamarinForms.DataControls.ListView;assembly=Telerik.XamarinForms.DataControls"
xmlns:telerikDataControls="clr-namespace:Telerik.XamarinForms.DataControls;assembly=Telerik.XamarinForms.DataControls"
x:Class="SDKBrowser.Examples.BadgeViewControl.FeaturesCategory.BadgeTypesExample.BadgeTypes">
<!-- >> badgeview-badge-types -->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<telerikInput:RadComboBox x:Name="selectBadgeType"
Margin="0,0,0,20"/>
<StackLayout VerticalOptions="Center"
Grid.Row="1"
HorizontalOptions="Center">
<telerikPrimitives:RadBadgeView x:Name="badge"
BadgeFontSize="14"
BadgeVerticalPosition="End"
BadgeOffsetX="-15"
BadgeOffsetY="-10"
HorizontalOptions="Center"
VerticalOptions="Center">
<telerikPrimitives:RadBadgeView.Content>
<Image WidthRequest="100"
HeightRequest="100">
<Image.Source >
<OnPlatform x:TypeArguments="ImageSource" Default="sampleAvatar.png">
<On Platform="UWP">Assets\sampleAvatar.png</On>
</OnPlatform>
</Image.Source>
</Image>
</telerikPrimitives:RadBadgeView.Content>
</telerikPrimitives:RadBadgeView>
</StackLayout>
</Grid>
<telerikDataControls:RadListView x:Name="listView">
<telerikDataControls:RadListView.ItemTemplate>
<DataTemplate>
<telerikListView:ListViewTemplateCell>
<StackLayout>
<telerikPrimitives:RadBadgeView x:Name="badge"
BadgeVerticalPosition="End"
BadgeOffsetX="-15"
BadgeOffsetY="-10"
BadgeType="{Binding .}"
HorizontalOptions="Center"
VerticalOptions="Center">
<telerikPrimitives:RadBadgeView.Content>
<Image WidthRequest="100"
HeightRequest="100">
<Image.Source >
<OnPlatform x:TypeArguments="ImageSource"
Default="sampleAvatar.png">
<On Platform="UWP">Assets\sampleAvatar.png</On>
</OnPlatform>
</Image.Source>
</Image>
</telerikPrimitives:RadBadgeView.Content>
</telerikPrimitives:RadBadgeView>
<Label HorizontalOptions="Center"
Text="{Binding .}"
FontSize="10"/>
</StackLayout>
</telerikListView:ListViewTemplateCell>
</DataTemplate>
</telerikDataControls:RadListView.ItemTemplate>
<telerikDataControls:RadListView.ItemStyle>
<telerikListView:ListViewItemStyle BackgroundColor="Transparent"/>
</telerikDataControls:RadListView.ItemStyle>
<telerikDataControls:RadListView.LayoutDefinition>
<telerikListView:ListViewGridLayout HorizontalItemSpacing="5"
VerticalItemSpacing="25"
ItemLength="140"
SpanCount="5"/>
</telerikDataControls:RadListView.LayoutDefinition>
</telerikDataControls:RadListView>
<!-- << badgeview-badge-types -->
</ContentView>

Просмотреть файл

@ -12,9 +12,7 @@ namespace SDKBrowser.Examples.BadgeViewControl.FeaturesCategory.BadgeTypesExampl
{
InitializeComponent();
// >> badgeview-badge-types-code-behind
this.selectBadgeType.ItemsSource = Enum.GetValues(typeof(BadgeType));
this.selectBadgeType.SelectedIndex = 0;
this.badge.SetBinding(RadBadgeView.BadgeTypeProperty, new Binding(nameof(this.selectBadgeType.SelectedItem), source: this.selectBadgeType));
this.listView.ItemsSource = Enum.GetValues(typeof(BadgeType));
// << badgeview-badge-types-code-behind
}
}

Просмотреть файл

@ -5,6 +5,7 @@ using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Telerik.Windows.Documents.Fixed.Model.Actions;
using Xamarin.Essentials;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
@ -43,7 +44,7 @@ namespace SDKBrowser.Examples.PdfViewerControl.FeaturesCategory.LinkAnnotationEx
{
Device.BeginInvokeOnMainThread(() =>
{
Device.OpenUri(uriAction.Uri);
Launcher.OpenAsync(uriAction.Uri);
});
}
});

Просмотреть файл

@ -48,6 +48,11 @@
<telerikPrimitives:RadShadow CornerRadius="20"
OffsetX="4"
OffsetY="4">
<telerikPrimitives:RadShadow.BackgroundColor>
<OnPlatform x:TypeArguments="Color" Default="Default">
<On Platform="UWP" Value="#F1F2F5"/>
</OnPlatform>
</telerikPrimitives:RadShadow.BackgroundColor>
<telerikInput:RadButton Text="Click me"
TextColor="White"
BackgroundColor="#4488F6"

Просмотреть файл

@ -6,6 +6,11 @@
<StackLayout Margin="0, 40" HorizontalOptions="Center">
<!-- >> shadow-getting-started-xaml -->
<telerikPrimitives:RadShadow CornerRadius="10">
<telerikPrimitives:RadShadow.BackgroundColor>
<OnPlatform x:TypeArguments="Color" Default="Default">
<On Platform="UWP" Value="#F1F2F5"/>
</OnPlatform>
</telerikPrimitives:RadShadow.BackgroundColor>
<Button Text="Click me"
BackgroundColor="#D6D7D7"
BorderColor="#B5B6B8"

Просмотреть файл

@ -29,19 +29,19 @@ namespace SDKBrowser.Examples.SideDrawerControl.GettingStartedCategory.GettingSt
WidthRequest = 32,
HeightRequest = 32,
BorderWidth = 0,
BorderRadius = 0,
CornerRadius = 0,
BorderColor = Color.Transparent,
BackgroundColor = Color.Transparent
};
if (Device.RuntimePlatform == Device.UWP)
{
hamburgerButton.Image = (FileImageSource)
hamburgerButton.ImageSource = (FileImageSource)
ImageSource.FromFile("Assets\\HamburgerMenu.png");
}
else
{
hamburgerButton.Image = (FileImageSource)
hamburgerButton.ImageSource = (FileImageSource)
ImageSource.FromFile("HamburgerMenu.png");
}

Просмотреть файл

@ -238,9 +238,9 @@ namespace SDKBrowser.Examples.TabViewControl.FeaturesCategory.ItemsSourceExample
SetInheritedBindingContext(child, this.BindingContext);
}
protected override void OnChildRemoved(Element child)
protected override void OnChildRemoved(Element child, int oldLogicalIndex)
{
base.OnChildRemoved(child);
base.OnChildRemoved(child, oldLogicalIndex);
this.children.Remove(child);
SetInheritedBindingContext(child, null);

Просмотреть файл

@ -24,7 +24,7 @@ namespace SDKBrowser.Examples.TemplatedPickerControl.GettingStartedCategory.Gett
{
public TemplatedPickerCalendar()
{
this.SetBinding(RadCalendar.SelectedDateProperty, new TemplateBinding("SelectedValue", BindingMode.TwoWay));
this.SetBinding(RadCalendar.SelectedDateProperty, new Binding("SelectedValue", mode: BindingMode.TwoWay, source: RelativeBindingSource.TemplatedParent));
}
}
// << templatedpicker-getting-started-custom-calendar

Просмотреть файл

@ -39,7 +39,7 @@ namespace SDKBrowser.Examples.ZipLibraryControl.EncryptionCategory.EncryptionExa
{
Children = {
new Label { Text = "Write some text:" },
new Frame { Content = inputEditor, OutlineColor = Color.Gray, BackgroundColor = Color.Transparent, Padding = new Thickness(0), HasShadow = false },
new Frame { Content = inputEditor, BorderColor = Color.Gray, BackgroundColor = Color.Transparent, Padding = new Thickness(0), HasShadow = false },
encryptionPassword,
encryptButton,
decryptionPassword,

Просмотреть файл

@ -54,6 +54,7 @@
<PackageReference Include="SkiaSharp.Views.Forms" Version="1.68.0" />
<PackageReference Include="Xam.Plugins.Settings" Version="3.1.1" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2012" />
<PackageReference Include="Xamarin.Essentials" Version="1.6.1" />
</ItemGroup>
<PropertyGroup>
<TelerikInstallationBinariesPath>$(TelerikXamarinDir)Binaries</TelerikInstallationBinariesPath>

Просмотреть файл

@ -1,6 +1,6 @@
using System;
using SDKBrowser.Common;
using Xamarin.Forms;
using Xamarin.Essentials;
namespace SDKBrowser.Services
{
@ -31,7 +31,7 @@ namespace SDKBrowser.Services
category.Name, example.Name);
var uri = new Uri(url);
Device.OpenUri(uri);
Launcher.OpenAsync(uri);
}
}
}