Telerik Forums
UI for .NET MAUI Forum
1 answer
47 views

I am trying to get the background color for the RadDatePicker to be white. It is picking up a color that I am unaware of specifying ( read I did not do it intentionally :-) )

I found general styling instructions for the controls that indicated the proper way would be to create a style...

<Style TargetType="Label" x:Key="DateDisplayLabelStyle">
  <Setter Property="TextColor" Value="#007A53"/>
  <Setter Property="BackgroundColor" Value="White"/>
</Style>

I am unsure how to get the lighter green color set to white. I did not see a name for this part of the control in the documentation.

 

Thanks

-Sean

Didi
Telerik team
 answered on 19 Jan 2024
1 answer
203 views

 

I'm trying to build a donet maui app but when it try to run the project in ios emulator i get this error, i don't know what to do (only happens for emulator, can run the project to ios devices)

/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.4.7125/targets/Xamarin.Shared.Sdk.targets(1276,3): error : clang++ exited with code 1: [/Users/carminamoreno/Documents/LosAlamosMAUI/Los Alamos MAUI/AppPedidosMobile/AppPedidosMobile.csproj::TargetFramework=net7.0-ios]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.4.7125/targets/Xamarin.Shared.Sdk.targets(1276,3): error : ld: warning: ignoring duplicate libraries: '-lSystem.IO.Compression.Native', '-lSystem.Native', '-lSystem.Net.Security.Native', '-lSystem.Security.Cryptography.Native.Apple', '-lc++', '-lmono-component-debugger', '-lmono-component-diagnostics_tracing', '-lmono-component-hot_reload', '-lmonosgen-2.0', '-lxamarin-dotnet-debug', '-lz' [/Users/carminamoreno/Documents/LosAlamosMAUI/Los Alamos MAUI/AppPedidosMobile/AppPedidosMobile.csproj::TargetFramework=net7.0-ios]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.4.7125/targets/Xamarin.Shared.Sdk.targets(1276,3): error : ld: building for 'iOS-simulator', but linking in object file (/Users/carminamoreno/Documents/LosAlamosMAUI/Los Alamos MAUI/AppPedidosMobile/obj/Debug/net7.0-ios/iossimulator-arm64/linker-cache/TelerikUI.a[arm64][2](TKChartAnnotation.o)) built for 'iOS' [/Users/carminamoreno/Documents/LosAlamosMAUI/Los Alamos MAUI/AppPedidosMobile/AppPedidosMobile.csproj::TargetFramework=net7.0-ios]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.4.7125/targets/Xamarin.Shared.Sdk.targets(1276,3): error : clang: error: linker command failed with exit code 1 (use -v to see invocation) [/Users/carminamoreno/Documents/LosAlamosMAUI/Los Alamos MAUI/AppPedidosMobile/AppPedidosMobile.csproj::TargetFramework=net7.0-ios]

Didi
Telerik team
 answered on 17 Jan 2024
1 answer
61 views

In day view, is it possible to change the times from 24hr to 12hr AM/PM style?

I've tried setting the Culture and all that but no luck.

Didi
Telerik team
 answered on 16 Jan 2024
1 answer
123 views

  I wanted to know if there were any known issues with the ImageEditor on iOS? In the documentation it had examples on android and windows but nothing for iOS. And then i get the crash (Down below) stating a maui context issue.

~ Additional info 

I have the ImageEditor in a 'mopup' page to act as a popup. 

The styling on the editor is only affecting TextColor                                            

simulator(built on x64)  and physical devices 

iOS 17 

.NET8

 

<Grid Grid.Row="0">
                  <Grid.RowDefinitions>
                      <RowDefinition Height="*"/>
                      <RowDefinition Height="Auto" />
                  </Grid.RowDefinitions>

                  <telerik:RadImageEditor
                      x:Name="imageEditor"
                      Padding="10" />

                  <telerik:RadImageEditorToolbar
                      Grid.Row="1"
                      AutoGenerateItems="False"
                      ImageEditor="{x:Reference imageEditor}">
                      <telerik:ImageEditorRotateLeftToolbarItem Style="{StaticResource buttonToolbarStyle}" />
                      <telerik:ImageEditorRotateRightToolbarItem Style="{StaticResource buttonToolbarStyle}" />
                      <telerik:ImageEditorUndoToolbarItem Style="{StaticResource buttonToolbarStyle}" />
                      <telerik:ImageEditorRedoToolbarItem Style="{StaticResource buttonToolbarStyle}" />
                      <telerik:ButtonToolbarItem
                          x:Name="SaveToolBar"
                          Clicked="OnSaveTapped"
                          IsEnabled="True"
                          IsVisible="True"
                          Style="{StaticResource buttonStyle}"
                          Text="Save" />
                  </telerik:RadImageEditorToolbar>
              </Grid>

1st crash message 
System.InvalidOperationException: 'Loading...'

 

follow up crash messages / detailed log 

ObjCRuntime.ObjCException: 'Objective-C exception thrown.  Name: System.InvalidOperationException Reason: MauiContext should have been set on parent. (System.InvalidOperationException)
   at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view)
   at Microsoft.Maui.Handlers.LayoutHandler.Remove(IView child)
   at Microsoft.Maui.Handlers.LayoutHandler.MapRemove(ILayoutHandler handler, ILayout layout, Object arg)
   at Microsoft.Maui.CommandMapper`2.<>c__DisplayClass6_0[[Microsoft.Maui.ILayout, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.ILayoutHandler, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].<Add>b__0(IElementHandler h, IElement v, Object o)
   at Microsoft.Maui.CommandMapper.InvokeCore(String key, IElementHandler viewHandler, IElement virtualView, Object args)
   at Microsoft.Maui.CommandMapper.Invoke(IElementHandler viewHandler, IElement virtualView, String property, Object args)
   at Microsoft.Maui.Handlers.ElementHandler.Invoke(String command, Object args)
   at Microsoft.Maui.Controls.Layout.NotifyHandler(String action, Int32 index, IView view)
   at Microsoft.Maui.Controls.Layout.OnRemove(Int32 index, IView view)
   at Microsoft.Maui.Controls.Layout.RemoveAt(Int32 index)
   at Microsoft.Maui.Controls.Layout.Remove(IView child)
   at Telerik.Maui.Controls.ImageEditor.BusyService.HideBusyIndicatorCore()
   at Microsoft.Maui.Dispatching.Dispatcher.<>c__DisplayClass9_0.<DispatchImplementation>b__0()
   at CoreFoundation.DispatchQueue.static_dispatcher_to_managed(IntPtr context) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/CoreFoundation/Dispatch.cs:line 379
   at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 58
   at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 94
   at MyApp.Program.Main(String[] args) in C:\Development\Xamarin Field Clients\MyApp\MyApp\Platforms\iOS\Program.cs:line 13

Native stack trace:
0   CoreFoundation                      0x0000000113ce728d __exceptionPreprocess + 242
1   libobjc.A.dylib                     0x000000012a18c894 objc_exception_throw + 48
2   libxamarin-dotnet-debug.dylib       0x000000010e8d9fe6 xamarin_process_managed_exception + 934
3   libxamarin-dotnet-debug.dylib       0x000000010e8d9b8b xamarin_process_managed_exception_gchandle + 59
4   libxamarin-dotnet-debug.dylib       0x000000010e8d9b45 xamarin_ftnptr_exception_handler + 21
5   libmonosgen-2.0.dylib               0x000000010fdd1d77 mono_handle_exception_internal + 6199
6   libmonosgen-2.0.dylib               0x000000010fdd0535 mono_handle_exception + 21
7   libmonosgen-2.0.dylib               0x000000010fe48389 interp_throw + 185
8   libmonosgen-2.0.dylib               0x000000010fe464dc interp_throw_ex_general + 188
9   libmonosgen-2.0.dylib               0x000000010fe40705 mono_interp_exec_method + 38437
10  libmonosgen-2.0.dylib               0x000000010fe48f65 interp_entry + 453
11  libmonosgen-2.0.dylib               0x000000010fe49797 interp_entry_static_1 + 55
12  ???                                 0x000000010d73b924 0x0 + 4520655140
13  libdispatch.dylib                   0x0000000130899ac0 _dispatch_main_queue_drain + 1420
14  libdispatch.dylib                   0x0000000130899526 _dispatch_main_queue_callback_4CF + 31
15  CoreFoundation                      0x0000000113c43850 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
16  CoreFoundation                      0x0000000113c3e18b __CFRunLoopRun + 2463
17  CoreFoundation                      0x0000000113c3d409 CFRunLoopRunSpecific + 557
18  GraphicsServices                    0x00000001322be187 GSEventRunModal + 137
19  UIKitCore                           0x00000001437583a2 -[UIApplication _run] + 972
20  UIKitCore                           0x000000014375ce10 UIApplicationMain + 123
21  libxamarin-dotnet-debug.dylib       0x000000010e8a94da xamarin_UIApplicationMain + 58
22  libmonosgen-2.0.dylib               0x000000010fe48bc5 do_icall + 341
23  libmonosgen-2.0.dylib               0x000000010fe47357 do_icall_wrapper + 295
24  libmonosgen-2.0.dylib               0x000000010fe38076 mono_interp_exec_method + 3990
25  libmonosgen-2.0.dylib               0x000000010fe357e3 interp_runtime_invoke + 259
26  libmonosgen-2.0.dylib               0x000000010ff1b908 mono_runtime_invoke_checked + 136
27  libmonosgen-2.0.dylib               0x000000010ff230db mono_runtime_exec_main_checked + 107
28  libmonosgen-2.0.dylib               0x000000010fd87f52 mono_jit_exec + 354
29  libxamarin-dotnet-debug.dylib       0x000000010e8edbba xamarin_main + 1898
30  MyApp                               0x000000010482f114 main + 68
31  dyld                                0x000000010d4653ee start_sim + 10
32  ???                                 0x00000002052e73a6 0x0 + 8676864934
'
Didi
Telerik team
 answered on 15 Jan 2024
1 answer
49 views

I am looking to set a custom tooltip on a ButtonToolbarItem.  It appears the current tooltip only binds to the Text property.

Is there a way for me to change the ToolTipProperties.TextProperty binding?

Didi
Telerik team
 answered on 12 Jan 2024
0 answers
51 views

I am trying to use the pie chart on my content page but it is not rendering. My XAML is:

                        <telerik:RadPieChart Grid.Row="0" x:Name="chart" HandlerChanged="chart_HandlerChanged">
                           <telerik:RadPieChart.BindingContext>
                                <vm:SystemStatsViewModel />
                            </telerik:RadPieChart.BindingContext>
                            <telerik:RadPieChart.Series>
                                <telerik:PieSeries ShowLabels="True"
                                    RadiusFactor="0.8"
                                    ValueBinding="Value"
                                    ItemsSource="{Binding LoadChartItems}" />
                            </telerik:RadPieChart.Series>
                        </telerik:RadPieChart>

The view model returns sample data just to get the chart to render:

        public ObservableCollection<LoadChartItem> LoadChartItems { get => new() {
        new() { Category = "Test1", Value = 52 },
        new() { Category = "Test2", Value = 19 },
        new() { Category = "Test3", Value = 82 },
        new() { Category = "Test4", Value = 23 }
        };
        }

There are other controls (labels, grids) on the page that render properly using the view model so I can rule out a bug in my view model. I have tried rendering the chart with and without the:

                           <telerik:RadPieChart.BindingContext>
                                <vm:SystemStatsViewModel />
                            </telerik:RadPieChart.BindingContext>

since the page references the SystemStatsViewModel in the bindingcontext. The control just never appears or throws an error of any kind. Any help or insights are appreciated.

Jude
Top achievements
Rank 1
 asked on 10 Jan 2024
1 answer
61 views
Hi,

Just a quick Question; Re the DockLayout, It looks like it would work the same as the standard MAUI grid, what is the main difference and advantages of using this instead?
Yana
Telerik team
 answered on 04 Jan 2024
1 answer
45 views

Hi Telerik Team,

May I kindly ask you if I could use ListView control in .NET MAUI with already grouped structure data type? I guess I could flatten my object source model, but I am interested if it is possible to use below model with ListView control and grouping options?

I have a ViewModel with a property type of ObservableCollection<T> MyProperty where T defined as:
public class T : List<T1>
{
public string Name {get;set;}
public string Area {get;set;}
}
and T1 as below:
public class T1
{
public string Id {get;set;}
public string ImgURL {get;set;}
//..some other properties
}

Yana
Telerik team
 answered on 04 Jan 2024
1 answer
164 views

Currently, when using a NavigationView on smaller screens like a mobile phone you see the NavigationContent first and then through the hamburger menu you can navigate through the items and change page.

I was wondering if there is a way where we see the NavigationItems first? i.e. the NavigationItems take up the entire screen width and height and then clicking on the item navigates to that page.

Take Microsoft Teams for example. On laptops it shows something as a DockLayout with the chat on the left and then navigate to the detailed messages on the right. On a mobile phone tho, the list of chats take the entire screen width and height and clicking on them takes you to that detailed messages.

I was able to get this to work using DockLayout and some other additional code:

- Use onIdiom to get device type.

- Dynamically hide or show parts of dock layout. (for instance hide the right side of the DockLayout and then left takes up the entire space).

- Switch between a ContentView and a ContentPage depending on device and functionality.  On bigger screens with full fledged docklayout, use ContentView. On smaller screens with no docklayout functionality use ContentPage

This does the job but as you can see there are a lot of moving parts and when working on a bigger project this gets hard to manage. 

Can something of this sort be implemented out of the box using Telerik controls or is there already a way to achieve this?

Didi
Telerik team
 answered on 02 Jan 2024
1 answer
214 views
Hi
I'm new in .Net MAUI.
I want to add some high-resolution images in my app. The dimensions of the images are about 7000*4000 pixels, and they are layered on top of each other. (Layers will visible/invisible by buttons)
There is no problem on Windows platform, but when I run it on Android device or emulator, it runs very slow and laggy.
Considering that by double-clicking on the image, their scale will double or triple, if I reduce their dimensions, the final quality will decrease.
Is there a solution?
Lance | Senior Manager Technical Support
Telerik team
 answered on 29 Dec 2023
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?