Hello,
I am trying to use the dataform but as soon as I uncomment one too many input the UI overlaps. In the image bellow after uncommenting RSVPPage the UI is all messed up.
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Class="Class"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:models="clr-namespace:NameSpace.Models"
xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
xmlns:vm="clr-namespace:NameSpace.ViewModels"
Title="Demo">
<ContentPage.BindingContext>
<vm:NewDemoViewModel />
</ContentPage.BindingContext>
<ContentPage.Content>
<ScrollView>
<telerik:RadDataForm
x:Name="dataForm"
AutoGenerateItems="False"
BindingContext="{Binding Demo}"
ValidationMode="LostFocus">
<telerik:DataFormGroup HeaderText="Text">
<telerik:DataFormRadEntryEditor PropertyName="Host" />
<telerik:DataFormRadEntryEditor PropertyName="Address" />
<telerik:DataFormRadEntryEditor PropertyName="City" />
<telerik:DataFormRadEntryEditor PropertyName="PostalCode" />
<telerik:DataFormRadEntryEditor PropertyName="PhoneNumber" />
</telerik:DataFormGroup>
<telerik:DataFormGroup HeaderText="Text">
<telerik:DataFormRadEntryEditor PropertyName="CreatedOn" />
<telerik:DataFormRadDatePickerEditor PropertyName="PlannedDate" />
<telerik:DataFormRadDatePickerEditor PropertyName="Date" />
<telerik:DataFormRadTimePickerEditor PropertyName="Time" />
<!--<telerik:DataFormRadCheckBoxEditor PropertyName="PersoDemo" />
<telerik:DataFormRadEntryEditor PropertyName="RSVPPage" />-->
<!--<telerik:DataFormRadEntryEditor PropertyName="Ambassador" />
<telerik:DataFormRadEntryEditor PropertyName="InternalNote" />-->
</telerik:DataFormGroup>
</telerik:RadDataForm>
</ScrollView>
</ContentPage.Content>
</ContentPage>
Thanks in advance,
Edit: I am using the android emulator with a pixel 5.
I am working on a mobile app for Android and iOS. When running over emulation, it seems to work fine on both platforms.
But when I deploy to my local test iPhone, I get errors when navigating to certain routes. This is the output I see in the Visual Studio output..
What do I need to do to resolve this?
Could not resolve assembly Telerik.Maui.Core.resources, Version=5.2.0.0, Culture=en, PublicKeyToken=null. Details: Could not load file or assembly
RadTreeView during rendering. I tried to comment out all of the Templete overrides in the resource dictionary AND I've also removed the <fluent:MauiIcon> in the ItemTemplate.
Unable to cast object of type 'Telerik.Maui.Handlers.RadButtonHandler' to type 'Microsoft.Maui.Platform.IImageSourcePartSetter'.
at Microsoft.Maui.Platform.ImageSourcePartLoader..ctor(IElementHandler handler, Func`1 imageSourcePart, Action`1 setImage)
at Telerik.Maui.Handlers.RadButtonHandler..ctor(IPropertyMapper mapper)
at Telerik.Maui.Handlers.RadButtonHandler..ctor()
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
Xaml:
<telerik:RadTreeView
x:Name="treeview"
Grid.Row="2"
AutomationId="treeview"
CheckBoxMode="None"
ItemStyle="{StaticResource Key=TreeViewStyle1}"
ItemsSource="{Binding SqlPlan.SparkPlanInfos}"
LevelIndentation="10">
<telerik:TreeViewDescriptor ItemsSourcePath="Children" TargetType="{x:Type models:SparkPlanInfo}" />
<telerik:RadTreeView.ItemTemplate>
<DataTemplate x:DataType="models:SparkPlanInfo">
<Grid ColumnDefinitions="auto,auto,*,auto">
<fluent:MauiIcon
Margin="-15,5,10,0"
Icon="{Binding NodeName, Converter={StaticResource SparkOperationToIconKey}, ConverterParameter='16', FallbackValue={x:Static fluent:FluentIcons.Accessibility16}}"
IconColor="Black"
IconSize="16" />
<Label
Grid.Column="1"
LineBreakMode="WordWrap"
Text="{Binding NodeName}"
VerticalOptions="Center" />
<Label
Grid.Column="2"
Margin="20,0"
HorizontalOptions="Start"
HorizontalTextAlignment="Start"
IsVisible="{Binding IsSimpleStringUnequalToNodeName}"
LineBreakMode="NoWrap"
MaximumWidthRequest="600"
Text="{Binding SimpleStringWithoutStartingNodeName}"
ToolTipProperties.Text="{Binding SimpleString}"
VerticalOptions="Center" />
</Grid>
</DataTemplate>
</telerik:RadTreeView.ItemTemplate>
</telerik:RadTreeView>
<ContentPage.Resources>
I simply installed the controls, created a new VS2022 project using the installed Project Template for the Configurable Wizard, then selected Blank Shell.
I can not run the sample app due to this error in the MauiProgram using statement.
using Telerik.Maui.Controls.Compatibility;
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
namespace TelerikMauiApp1
{
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseTelerik()
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
return builder.Build();
}
}
}
This is a follow-up question this question.
I followed the example provided for the question above in order to show a RadPopup programmatically from a ViewModel. However, I am running into a specific issue on iOS where the popup truncates the content at the bottom.
My CreatePopupContent method body looks like this:
private View CreatePopupContent()
{
VerticalStackLayout stack = new VerticalStackLayout()
{
Spacing = 10,
Padding = new Thickness(20),
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Fill,
BackgroundColor = /*(Color)Application.Current.Resources.GetValueOrNull("Gray100")*/ Colors.LightGray,
WidthRequest = 350
};
Label titleLabel = new Label()
{
Text = /*popupTitle*/"Lorum ipsum",
};
stack.Children.Add(titleLabel);
Label messageLabel = new Label()
{
Text = /*popupMessage*/ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
};
stack.Children.Add(messageLabel);
var dismiss = new Button { Text = "Ok", Command = this.ClosePopupCommand, CommandParameter= "Ok" };
var lorum= new Button { Text ="Lorum", Command = this.ClosePopupCommand, CommandParameter = "Lorum" };
var ipsum= new Button { Text = "Ipsum", Command = this.ClosePopupCommand, CommandParameter = "Ipsum" };
stack.Children.Add(dismiss);
stack.Children.Add(lorum);
stack.Children.Add(ipsum);
Border border = new Border()
{
StrokeShape = new RoundRectangle
{
CornerRadius = new CornerRadius(20)
},
Content = stack,
VerticalOptions = LayoutOptions.Fill,
};
return border;
}
I am creating a music player app so what i want to automatically load all songs from phone or windows computer and display them in a listView so that I can use them to play from selecting them.
I am kind of a beginner :)
Thanks
I have a button where I want to navigate to another page with the object of the combobox as the command parameter of the button that the user clicks. How do I reference the object in the command parameter.
<telerik:RadComboBox x:Name="arresteeListPicker" ItemsSource="{Binding Arrestees}"
DisplayMemberPath="ArresteeFullName"
Placeholder="Arrestees"
IsEditable="False">
<telerik:RadComboBox.ItemTemplate>
<DataTemplate x:DataType="model:Arrestee">
<Label Text="{Binding ArresteeFullName}"
></Label>
</DataTemplate>
</telerik:RadComboBox.ItemTemplate>
</telerik:RadComboBox>
<Button x:Name="selectArresteeBtn"
Text="Select"
Command="{Binding SelectArresteeCommand}"
CommandParameter= ?????????
WidthRequest="70"
HorizontalOptions="Start"
Margin="0, 10, 0, 0"
/>
Thank you in advance,
Scott