Hello, I made an App for Xamarin.Android using RadRadialGauge. I have a Thread that updates the indicator every 500ms based on a received value. The problem is that the longer the App runs the slower it becomes. I checked the RAM usage and it increases really fast, it reaches 200MB in a matter of a few minutes and as result the App becomes very laggy and it doesn't show a good performance. When I try to comment the indicator it works fine. I would like to ask if there is a way to reduce the RAM usage. Here is my Code:
MainPage.xaml
<telerikGauges:RadRadialGauge StartAngle="180" SweepAngle="360">
<telerikGauges:RadRadialGauge.Axis>
<telerikGauges:GaugeLinearAxis Maximum="100"
Minimum="0"
ShowLabels="False"
StrokeThickness="0" />
</telerikGauges:RadRadialGauge.Axis>
<telerikGauges:RadRadialGauge.Ranges>
<telerikGauges:GaugeRangesDefinition Offset="0">
<telerikGauges:GaugeRange Color="#DDDDDD"
From="0"
To="100" />
</telerikGauges:GaugeRangesDefinition>
</telerikGauges:RadRadialGauge.Ranges>
<telerikGauges:RadRadialGauge.Indicators>
<telerikGauges:GaugeBarIndicator x:Name="Needle1" EndCap="Oval"
Fill="#a13127"
StartCap="Oval"
Offset="0"
Value="0.45" />
</telerikGauges:RadRadialGauge.Indicators>
</telerikGauges:RadRadialGauge>
<Label x:Name="GaugeLabel" FontSize="44"
HorizontalTextAlignment="Center"
Text="120"
TextColor="#a13127"
VerticalTextAlignment="Center" />
MainPage.xaml.cs
Thread t = new Thread(new ThreadStart(() =>
{
while (true)
{
Device.BeginInvokeOnMainThread(() =>
{
Needle1.Value = Val; // if I comment this line here RAM usage is normal
GaugeLabel.Text = Val.ToString("0.00");
});
Thread.Sleep(500);
}
}));
t.Start();
Hi,
can i use the Zipfile Class from Windows Forms in xamarin forms ?
I need the extract method to unzip a file in a directory! if yes how can i include it ?
the ExtractToDirectory Method from .NET throw a IO Exception[Invalid Paramater] ! but it execute succesfully
Thanks in advance
Also posted here:
https://feedback.telerik.com/Project/168/Feedback/Details/258349-ios-datagrid-causes-nullreferenceexception-when-navigating-away
And here:
https://github.com/xamarin/Xamarin.Forms/issues/4178
Looks like there was a regression sometime between Xamarin.Forms 3.2.0.839982 and version 3.3.0.912540 with the DataGrid. After a DataGrid becomes visible on a page (or just on a page that becomes visible, even if the DataGrid itself is set to IsVisible = false), a NullReferenceException occurs if you navigate away or switch tabs in a RadTabView. Seems to only happen on iOS, and started happening when I upgraded from Xamarin.Forms from 3.2.0.839982 to version 3.3.0.912540. Possibly a Xamarin.Forms bug and not a Telerik bug.
In case anyone else has the same issue, the workaround for me is just to go back to Xamarin.Forms 3.2.0.839982 (not sure if the issue occurs in the other 3.2.* version in between).
We have a list and by choosing a value, we hide some list items. The items become invisible, there is no problem but occupied places by items stay still after we set invisible. We use MVVM and this part works fine and we bind a property for IsVisible and it seems it works too. Only problem here, the list does not invalidate/refresh itself to re-arrange the view.
I do not know why but I cannot attached the pictures..
So here is the my list
https://i.imgur.com/3wGJi3i.png
and here, after we made some invisible items..
https://i.imgur.com/SPzaE3s.png
I realize something.. After we set Invisible, the height of the custom control is still 37, and HeightRequest and MinimumHeightRequest are -1. I tried to change -1 to 0 but nothing changed.
Here is our listview Code and binding.,
<
datacontrols:RadListView
x:Name
=
"listView"
Grid.Row
=
"1"
ItemsSource
=
"{Binding FlatSource}"
SelectionMode
=
"None"
VerticalOptions
=
"FillAndExpand"
HorizontalOptions
=
"FillAndExpand"
PropertyChanged
=
"listView_PropertyChanged"
>
<
datacontrols:RadListView.GroupDescriptors
>
<
telerikListView:PropertyGroupDescriptor
PropertyName
=
"GroupName"
/>
</
datacontrols:RadListView.GroupDescriptors
>
<
datacontrols:RadListView.GroupHeaderTemplate
>
<
DataTemplate
>
<
Grid
BackgroundColor
=
"{StaticResource CustomBaseGrayColor}"
Margin
=
"0,5,0,0"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
/>
</
Grid.ColumnDefinitions
>
<
Label
Text
=
"â–¸"
Margin
=
"8, 9, 0, 3"
TextColor
=
"{StaticResource CustomBlackTextColor}"
FontSize
=
"Medium"
>
<
Label.Triggers
>
<
DataTrigger
TargetType
=
"Label"
Binding
=
"{Binding IsExpanded}"
Value
=
"True"
>
<
Setter
Property
=
"Text"
Value
=
"â–¾"
/>
</
DataTrigger
>
</
Label.Triggers
>
</
Label
>
<
Label
Text
=
"{Binding }"
Margin
=
"0, 11, 0, 3"
Grid.Column
=
"1"
HorizontalOptions
=
"Start"
Style
=
"{StaticResource GrouppingTitle}"
/>
</
Grid
>
</
DataTemplate
>
</
datacontrols:RadListView.GroupHeaderTemplate
>
<
datacontrols:RadListView.ItemTemplate
>
<
DataTemplate
>
<
telerikListView:ListViewTemplateCell
>
<
telerikListView:ListViewTemplateCell.View
>
<
Grid
BackgroundColor
=
"{StaticResource CustomBaseGrayColor}"
ColumnSpacing
=
"0"
VerticalOptions
=
"FillAndExpand"
HorizontalOptions
=
"FillAndExpand"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"10"
/>
<
ColumnDefinition
Width
=
"*"
/>
</
Grid.ColumnDefinitions
>
<
BoxView
Color
=
"{StaticResource CustomBlackTextColor}"
Grid.Column
=
"0"
VerticalOptions
=
"FillAndExpand"
WidthRequest
=
"10"
/>
<
customCellItem:ThreeColumnCellItem
Grid.Column
=
"1"
KeyLabelText
=
"{Binding ParamName}"
ValueLabelText
=
"{Binding CurrentValue}"
ModifiedValueEntryText
=
"{Binding NewValue}"
DataItem
=
"{Binding DataItem}"
FieldParamType
=
"{Binding ParamType}"
HorizontalOptions
=
"Fill"
VerticalOptions
=
"Fill"
Entry_Tapped
=
"OnTappedEntry"
Margin
=
"0,0,0,10"
IsVisible
=
"{Binding IsVisible}"
IsEnabled
=
"{Binding !IsReadOnly}"
/>
</
Grid
>
</
telerikListView:ListViewTemplateCell.View
>
</
telerikListView:ListViewTemplateCell
>
</
DataTemplate
>
</
datacontrols:RadListView.ItemTemplate
>
</
datacontrols:RadListView
>
Normally ListView from Xamarin.Forms has a property HasUnevenRows. I believe that It may work but RadListView has not this property.
Thank you in advance.
I am follow the documentation setting a theme. When I start debug the iOS Project, I got an exception:
Unhandled Exception:
Xamarin.Forms.Xaml.XamlParseException: Position 18:37. Type TelerikThemeStyles not found in xmlns clr-namespace:Telerik.XamarinForms.Chart;assembly=Telerik.XamarinForms.Chart
How do I fix this exception?
Hello, can anyone else confirm me that the RadCalendar has a bug on the height ?
(I'm using the CalendarViewMode.Week view mode)
Exemple : a Calendar inside a grid vs a calendar inside a stacklayout. With a row set to Auto, it should behave the same. But it seems that the Calendar is taking all the available height like if the row's height was a star instead of auto.
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<ti:RadCalendar NativeControlLoaded="RadCalendar_NativeControlLoaded" Grid.Row="0" />
<v:MeetingsDayInfoView Grid.Row="1"/>
<ListView BackgroundColor="LightSkyBlue" Grid.Row="2" />
</Grid>
<StackLayout>
<ti:RadCalendar NativeControlLoaded="RadCalendar_NativeControlLoaded" />
<v:MeetingsDayInfoView />
<ListView BackgroundColor="LightSkyBlue" VerticalOptions="FillAndExpand" />
</StackLayout>
Finally, if I don't set the height of the calendar to HeightRequest="100", the calendar seems to keep the first height it had when loading the month CalendarViewMode.
When calling TrySetViewMode(CalendarViewMode.Week) from code behind, it should refresh the height IMHO.
I hate to set height and width on element which doesn't need. The height should be dynamic and depends on the label fontsize etc.
I've attached a picture of the 3 behaviors.
Any suggestion would be nice.
Thanks !
Hello all together,
in my RadDataGrid I have a label as DataTemplate. I'm setting the labels text color according to it's binding value "IsSelected" to white or black. I works very well. It is the same solution as for highlighting a tree item in the RadTreeView https://www.telerik.com/forums/highlighting-selected-treeview-item
The problem is, the whole RadDataGrid is flickering when the labels text colors are changing after an item tap, and the RadTreeView is not.
What's the problem with RadDataGrid?
Thank you,
best regards
Martin
Xaml to highlight the selected RadDataGrid-Item:
<
telerikGrid:RadDataGrid.SelectionStyle
>
<
telerikGrid:DataGridBorderStyle
BackgroundColor
=
"{StaticResource CustomerColor}"
BorderThickness
=
"0"
/>
</
telerikGrid:RadDataGrid.SelectionStyle
>
<
telerikGrid:RadDataGrid.Columns
>
<
telerikGrid:DataGridTemplateColumn
HeaderText
=
""
>
<
telerikGrid:DataGridTemplateColumn.CellContentTemplate
>
<
DataTemplate
>
<
Label
Text
=
"{Binding Name}"
HeightRequest
=
"44"
Margin
=
"10,0,10,0"
FontSize
=
"14"
HorizontalOptions
=
"FillAndExpand"
HorizontalTextAlignment
=
"Start"
VerticalTextAlignment
=
"Center"
VerticalOptions
=
"FillAndExpand"
TextColor="{Binding IsSelected,
Converter={StaticResource IsHighlightedToColorConverter},
ConverterParameter={x:Static ctrls:BooleanColor.SelectedItemColor}}" />
</
DataTemplate
>
</
telerikGrid:DataGridTemplateColumn.CellContentTemplate
>
</
telerikGrid:DataGridTemplateColumn
>
</
telerikGrid:RadDataGrid.Columns
>
Hello,
is there any possibility for setting rounded corners on the outer buttons on Android and UWP like seen on iOS?
From Telerik segmented control overview
here phone number 3:
Thank you,
regards Martin
When I use RadCalendar in Xamarin forms in Simulator.
The error {System.Reflection.CustomAttributeFormatException: Could not find a property with name ParameterBlockProxy } pop up
I found that if I remove all Calendars in my app, it can work in Simulator.
But once I include it in Xamarin forms. The error exists.
Remarks: I can run the app in physical devices.
/Versions/11.12.0.4/src/Xamarin.iOS/Foundation/NSObject2.cs:497 at Foundation.NSObject..ctor (Foundation.NSObjectFlag x) [0x00006] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/Foundation/NSObject2.cs:116
at TelerikUI.TKCalendarDataSource..ctor () [0x00000] in <80266520e2ec48e69365daef99f55ad3>:0
at Telerik.XamarinForms.InputRenderer.iOS.CalendarAdapter.UpdateAppointmentsSource (Telerik.XamarinForms.Input.RadCalendar sourceOwner, TelerikUI.TKCalendar targetOwner, System.Boolean immediate) [0x0001c] in <0a8c5773e2e74216b75b8301a18ed2de>:0
at Telerik.XamarinForms.InputRenderer.iOS.CalendarAdapter.UpdateCore (Telerik.XamarinForms.Input.RadCalendar sourceOwner, TelerikUI.TKCalendar targetOwner, System.String propertyName) [0x00043] in <0a8c5773e2e74216b75b8301a18ed2de>:0
at Telerik.XamarinForms.Common.FacadeAdapterBase`2[S,T].Update (System.Object sourceOwner, System.Object targetOwner, System.String propertyName, System.Object sourceOwnerRoot, System.Object
…
I want to show a content in the center of the indicator. I tried to manipulate the margin but did not work
<telerikBusyIndicator:RadBusyIndicator x:Name="BusyIndicator"
AnimationContentHeightRequest="100"
AnimationContentWidthRequest="100"
AnimationType="Animation3"
IsBusy="True">
<telerikBusyIndicator:RadBusyIndicator.Content>
<Label Text="This is the content of the RadBusyIndicator control displayed when the indicator is not busy." TextColor="Black" />
</telerikBusyIndicator:RadBusyIndicator.Content>
<telerikBusyIndicator:RadBusyIndicator.BusyContent>
<Label HorizontalOptions="Center"
Text="Loading..."
VerticalOptions="Center"
Margin="0,0,0,50"/>
</telerikBusyIndicator:RadBusyIndicator.BusyContent>
</telerikBusyIndicator:RadBusyIndicator>
I actually want to show an image (filled) in the center of the indicator as follows: