Telerik Forums
UI for WPF Forum
1 answer
86 views

I am developing HMI Tool using Layoutcontrol.

I added Control(Button) to LayoutControl using LayoutControlToolBoxView.

What should I do if I want to receive the button's Event?

Stenly
Telerik team
 answered on 30 Dec 2022
1 answer
173 views

Hello,

I am working on a project based application, like visual studio, that requires the pane to be completely removed from working memory to avoid "Out of Memory" errors. 

The problem is that the PaneViewModel stores the content (in my case a UserControl), as intended, but when that PaneViewModel instance is removed from the MainWindowViewModel.Panes Collection, the memory (in diagnostic tools) shows it is not being reclaimed.

My assumption is that GC is not collecting the removed PaneViewModel because some how the UserControl or Pane is still referenced somewhere by the DocumentHost or RadDocking.

I've attached a modified version of the VisualStudioDocking example project that recreates/demonstrates the behavior I've described above. During runtime, please add new documents and close them at least 10 times to notice how big the difference is in memory over time. 

 

Regards,

Patrick

Martin Ivanov
Telerik team
 answered on 28 Dec 2022
1 answer
100 views

Hello,

I followed setting up a RadGridView using a RadEntityFrameworkCoreDataSource using the MVVM approach outlined here.

This worked as expected for loading the data just fine. However, when I enabled the grid's CanUserInsertRow parameter, and try to add a row via the grid, I immediately get an exception from the AddingNewDataItem event stating that it cannot track the Entity of type <whatever> due to the primary key property being null. This would make sense to me if it were trying to commit the new row to the data source, but that would be after the user has a chance to enter the field information.

I understand there's an opportunity to set default values for these entities, however I wanted the user to input information themselves first, instead of setting up a valid row.

Previously, I have used DataTables/Views as a grid's item source with no problems, was able to capture exceptions thrown by the database in the UI itself and display them to the user.

Is this approach simply not suited for the Entity Framework data source? Or am I not familiar enough with this and MVVM, and should get myself caught up before continuing on?

Thanks for any help or suggestions,

Lee

 

Stenly
Telerik team
 answered on 27 Dec 2022
1 answer
126 views

I'm having a problem with the radschedulers resources.

 

they are displayed verticaly. which for me is the most unnatural default setting for a labeling of a row. not many people read from down to up.
most read from left to right. so i would strongly suggest to set this by default on hoizontaly.

anyhow. as you see in the image my resources are written verticaly and i simply want to switch them to horizontaly.

and i dont want to make a custom resource class or custom template for that. it have to be possible without that.

so pls do not just link me this: WPF ScheduleView - Templating the GroupHeaders - Telerik UI for WPF

i
've found Horizontal grouping names and max height in UI for Silverlight | Telerik Forums but its also based on custom template for group headers. i think it would be a total overkill just for the 90degree switch make a custom template.

 

thanks for the help

Stenly
Telerik team
 answered on 26 Dec 2022
2 answers
113 views

var frameworkElements = KmlReader.Read(memoryStream);

I have a list of the elements (which in the initial stage are not displayed on the map) and I want to have a BusyIndicator until loading.

That is, until I performed the KmlReader.Read(memoryStream), the list in the picture will be a square without data, so I want a BusyIndicator

But the KmlReader works on the UI thread, so this cannot be done.

Is there a way to overcome this?

Is there a way to make this line in the background thread?

 

Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
 updated answer on 26 Dec 2022
1 answer
125 views

Hello,

I'm working on a project where I use the RadScheduler with the Timeline View. 
I've already added the Appointments and the Resources, but it displays only the Appointments.

The whole thing is going to be a "holiday" planer. So on the left side there are all the employees and on the right side their holidays in the calendar.

Basically there is only one ResourceType, "employee". For the ResourceName i simply use their employee number.

I have the Problem that I see the Appointments in the View, but I don't see the Resources.

On the Debug-Screenshot you can see that there is a Resource with the right Name and Type in each Appointment, so I guess the method works, but I can't see it in the view.

(I really do miss a very simple example Tutorial on the topic of assigning Resources to Appointments)

What am I doing wrong?

Thank you for your help.

Best regards

Dilyan Traykov
Telerik team
 answered on 23 Dec 2022
0 answers
96 views

If I use directly the control Telerik GridViewDataColumn, define the column grid like a Date (DataType="{x:Type sys:DateTime}"), when I click on the filed visualize correctly the Calendar.

But if I use the custom control from GridViewDataColumn when I do click appare this error:

System.InvalidCastException: Impossibile eseguire il cast di oggetti di tipo 'Telerik.Windows.Controls.RadDatePicker' sul tipo 'System.Windows.Controls.TextBox'.

Can you help me to resolve the problem?
Thank You.

Debora
Top achievements
Rank 1
 asked on 23 Dec 2022
0 answers
121 views
When Program start, RadComboBox is Collapsed. 'cbType' RadComboBox item select, not visible. Why RadComboBox not visible?
<Control.Template>
	<ControlTemplate TargetType="{x:Type Mods_UiMod_FrameControls:UiFrameContent}">
		<StackPanel x:Name="Part_MainStack" DataContext="{Binding}">
			<telerik:RadComboBox Grid.Row="3"
								 Grid.Column="1"
								 Height="20"
								 Margin="5 0 5 0"
								 DisplayMemberPath="CODE_NAME"
								 FontSize="11"
								 ItemsSource="{Binding Source=
								 {x:Static Public_Code:CommonCodes.FormTypes}}"
								 SelectedIndex="{Binding SelectedIndexForm,
								 UpdateSourceTrigger=PropertyChanged}"
								 SelectedValuePath="CODE_ID"
								 SelectionBoxTemplate="{StaticResource CodeCBTemplate}"  
								 x:Name="cbType"/>
			<Label Grid.Row="4"
				   Grid.Column="0"
				   Content="Create Month"
				   FontSize="11"
				   Foreground="White" Name="lbCreateMonth">
				   <Label.Style>
					   <Style TargetType="Label">
						   <Setter Property="Visibility" Value="Collapsed"/>
						   <Style.Triggers>
								<DataTrigger Binding="{Binding ElementName=cbType, Path=SelectedIndex}" Value="0">
									<Setter Property="Visibility" Value="Visible"/>
								</DataTrigger>
						   </Style.Triggers>
					   </Style>
				   </Label.Style>
			</Label>
			<telerik:RadComboBox Grid.Row="4"
								 Grid.Column="1"
								 Height="20"
								 Margin="5 0 5 0"
								 DisplayMemberPath="CODE_NAME"
								 FontSize="11"
								 ItemsSource="{Binding Source={x:Static Public_Code:CommonCodes.TimeMonthCodes}}"
								 SelectedIndex="{Binding SelectedIndexCreateMonth,
														 UpdateSourceTrigger=PropertyChanged}"
								 SelectedValuePath="CODE_ID"
								 SelectionBoxTemplate="{StaticResource CodeCBTemplate}" Name="cbCreateMonth">
				<telerik:RadComboBox.Style>
					<Style TargetType="{x:Type telerik:RadComboBox}">
						<Setter Property="Visibility" Value="Collapsed"/>
						<Style.Triggers>
							<DataTrigger Binding="{Binding ElementName=cbType, Path=SelectedIndex}" Value="0">
								<Setter Property="Visibility" Value="Visible"/>
							</DataTrigger>
						</Style.Triggers>
					</Style>
				</telerik:RadComboBox.Style>
			</telerik:RadComboBox>
		<StackPanel x:Name="Part_MainStack" DataContext="{Binding}">
	</ControlTemplate>
</Control.Template>

Jae Myoung
Top achievements
Rank 1
 updated question on 22 Dec 2022
0 answers
97 views

How to compare two MapPinPoint

MapPinPoint mapPinPoint1 = new MapPinPoint();
MapPinPoint mapPinPoint2 = new MapPinPoint();

How can you check if they are equal?

Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
 asked on 22 Dec 2022
1 answer
151 views

Hi,

I am using a TreeListView to display financial data (element with costs per month) with sub-totals as the parent rows. The data structure is thus homogenous and a good fit for the TreeListView.  The binding and data work perfectly, but now I would like to refine the styling to show a greater contrast between parent and child (e.g. make sub-total rows bold). Is there an simple way to do this?

Renier Pretorius
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 21 Dec 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?