Telerik Forums
UI for WPF Forum
1 answer
116 views

Hi,
I have a RadDocking with a Document.host and 2 RadSplitcontainer. Every parts of control has its own Header and they are shown correctly, but with different style as you could see in figure:

I haven't seen any settings in xaml about the style and I would like to use everywhere the left style.

This is the DataTemplate used:

<DataTemplate x:Key="{x:Static r:ResourcesKeys.TabContentSpectral}" DataType="WpfPlot">
				<t:ProportionalStackPanel Orientation="Vertical">
					<t:RadToolBar t:ProportionalStackPanel.ElementHeight="32">
						<t:RadButton Command="{Binding ResetCommand}"									 
							ToolTip="{DynamicResource ResourceKey={x:Static r:ResourcesKeys.ResetMapTooltip}}">
							<Image Source="/DeltaOhm.NsModules;component/Images/refresh.png"
																		   Style="{StaticResource ResourceKey=TreeviewImageSize}"/>
						</t:RadButton>
						<t:RadButton x:Name="ToolbarSetAxisScale"
							ToolTip="{DynamicResource ResourceKey={x:Static r:ResourcesKeys.MISetAxisScale}}"
							Loaded="ToolbarSetAxisScale_Loaded">
							<Image Source="/DeltaOhm.NsModules;component/Images/ToolbarSetAxisScale.png"
																		   Style="{StaticResource ResourceKey=TreeviewImageSize}"/>
						</t:RadButton>
						<t:RadButton
							ToolTip="{DynamicResource ResourceKey={x:Static r:ResourcesKeys.ColorPaletteTooltip}}"
							Loaded="RadPathButton_Loaded">
							<Image Source="/DeltaOhm.NsModules;component/Images/ToolbarColorPalette.png"
																		   Style="{StaticResource ResourceKey=TreeviewImageSize}"/>
						</t:RadButton>
						<t:RadButton
							x:Name="SonogrammaMinimi"
							ToolTip="{DynamicResource ResourceKey={x:Static r:ResourcesKeys.SonogrammaDeiMinimiTooltip}}"
							Command="{Binding CalcolaSpettroDeiMinimiCommand}">
							<Image Source="/DeltaOhm.NsModules;component/Images/SonogrammaDeiMinimi.png"
																		   Style="{StaticResource ResourceKey=TreeviewImageSize}"/>
						</t:RadButton>
					</t:RadToolBar>
					<t:RadDocking x:Name="DockingSpectral"
						RetainPaneSizeMode="DockingAndFloating">
						<t:RadDocking.DocumentHost>
							<t:RadPaneGroup x:Name="RadPaneGroup1">
								<t:RadPane x:Name="PaneSpectralColorMap" t:RadDocking.SerializationTag="PaneSpectralColorMap" 
										   Loaded="PaneSpectralColorMap_Loaded">
									<Grid x:Name="Grid1">
										<local:SpectralColorMapControl Loaded="SpectralColorMapControl_Loaded" TabIndex="0"
													   SizeChanged="SpectralColorMapControl_SizeChanged"/>
									</Grid>
								</t:RadPane>
							</t:RadPaneGroup>
						</t:RadDocking.DocumentHost>
						<t:RadSplitContainer
							x:Name="SpectralTimeHistory" InitialPosition="DockedBottom"
											 MinHeight="180">
							<t:RadPaneGroup >
								<t:RadPane x:Name="PaneSpectralTimeHistory" t:RadDocking.SerializationTag="PaneSpectralTimeHistory"
										   Loaded="PaneSpectralTimeHistory_Loaded">
									<Grid>
										<local:SpectralTimeHistoryControl TabIndex="1"
											Loaded="SpectralTimeHistoryControl_Loaded"	
											Frequency="{Binding FrequencySelected, Mode=TwoWay}"/>
									</Grid>
								</t:RadPane>
							</t:RadPaneGroup>
						</t:RadSplitContainer>
						<t:RadSplitContainer x:Name="SpectralHistogram" InitialPosition="DockedRight"
											 MinWidth="225">
							<t:RadPaneGroup x:Name="RadPaneGroup2">
								<t:RadPane x:Name="PaneSpectralHistogram" t:RadDocking.SerializationTag="PaneSpectralHistogram"
										   Loaded="PaneSpectralHistogram_Loaded">
									<Grid x:Name="Grid2">
										<local:SpectralHistogramControl x:Name="SpectralHistogramControl1"
											Loaded="SpectralHistogramControl_Loaded"
											TimeStamp="{Binding MainVM.TabCursori.CursorV0DT, Mode=TwoWay}"
											Intervallo="{Binding MainVM.TabCursori.CursorRange}"/>
									</Grid>
								</t:RadPane>
							</t:RadPaneGroup>
						</t:RadSplitContainer>
					</t:RadDocking>
				</t:ProportionalStackPanel>
			</DataTemplate>

 

And this is the code that binding the header (in code behind because "Plot" is a dynamic value)

		private void PaneSpectralColorMap_Loaded(object sender, RoutedEventArgs e)
		{
			if (sender is RadPane pane)
			{
				pane.SetBinding(HeaderedContentControl.HeaderProperty, new Binding("Plot.SpectralColorMapVM.Title"));
			}
		}
		private void PaneSpectralTimeHistory_Loaded(object sender, RoutedEventArgs e)
		{
			if (sender is RadPane pane)
			{
				pane.SetBinding(HeaderedContentControl.HeaderProperty, new Binding("Plot.SpectralProfileVM.Title"));
			}
		}
		private void PaneSpectralHistogram_Loaded(object sender, RoutedEventArgs e)
		{
			if (sender is RadPane pane)
			{
				pane.SetBinding(HeaderedContentControl.HeaderProperty, new Binding("Plot.SpectralHistogramVM.Title"));
			}

		}



Stenly
Telerik team
 answered on 21 Feb 2022
1 answer
188 views

Hi,

When using the Fluent theme on computers with Windows 7, the opacity of Popup Filtering interferes with its visualization, as shown in the attached image. Is it possible to change the global shape of this opacity to avoid this problem?

 

Thanks

Martin Ivanov
Telerik team
 answered on 21 Feb 2022
0 answers
1.4K+ views

Hello, I have upgraded application to .Net 6.0 ,while I trying to add DLL to toolbar then it gives following error [refer screenshot].

when I run the project it throws exception about Telerik,  as

The invocation of the constructor on type 'Telerik.Windows.Controls.RadMenu' that matches the specified binding constraints threw an exception

following inner exception

" TypeInitializationException: The type initializer for 'Telerik.Windows.Controls.TelerikLicense' threw an exception."

and

"MissingMethodException: Method not found: 'System.ActivationContext System.AppDomain.get_ActivationContext()'."

 

please suggest.

Akshay
Top achievements
Rank 1
 asked on 18 Feb 2022
0 answers
130 views

Hi,
I am creating a generic grid solution, based on the Telerik grid with dynamic data source.
This is my ItemsSource:

var data = new ObservableCollection<MyDataRow>(); //DynamicObject

Where MyDataRow is created from 2D array of various objects (MyClass, Strings, etc).

And I would like to choose template based on value (or type of object) which will be presented in the cell, but the only way, that achieved the desired result, was to add TemplateSelector which dynamicly creates a concrete datatemplate for each column/cell.
Simplified version of my Selector:

public class MyTemplateSelector : DataTemplateSelector
{
	public override System.Windows.DataTemplate SelectTemplate(object item, System.Windows.DependencyObject container)
	{
		if(container is GridViewCell gridViewCell && item != null)
		{
			int columnIndex = gridViewCell.Column.DisplayIndex;
			DataTemplate dataTemplate = null;
			MyDataRow myDataRow = item as MyDataRow;
			if (myDataRow["Column" + columnIndex] is MyClass)
			{	// Template example 1
				StringReader stringReader = new StringReader(
				@"<DataTemplate 
				xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""> 
					<TextBlock Text=""{Binding Column" + columnIndex + @".ResultText}""/> 
				</DataTemplate>");
				XmlReader xmlReader = XmlReader.Create(stringReader);
				dataTemplate = XamlReader.Load(xmlReader) as DataTemplate;
			}
			else
			{   // Template example 2
				StringReader stringReader = new StringReader(
				@"<DataTemplate 
				xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""> 
					<TextBlock Text=""{Binding Column" + columnIndex + @"}""/> 
				</DataTemplate>");
				XmlReader xmlReader = XmlReader.Create(stringReader);
				dataTemplate = XamlReader.Load(xmlReader) as DataTemplate;
			}
			if (!dataTemplates.ContainsKey(columnIndex))
			{
				dataTemplates.Add(columnIndex, dataTemplate);
			}
			return dataTemplates[columnIndex];
		}
		return null;
	}
	// Dictionary of already defined templates
	Dictionary<int, DataTemplate> dataTemplates = new Dictionary<int, DataTemplate>();
}

So in this case, there can be up to c*x number of slightly different templates:
(c - number of columns, x - number of specific templates)

Is there any more performance wise or clearer way to solve this problem?

Thank you for any help.

Radek
Top achievements
Rank 1
 asked on 17 Feb 2022
1 answer
150 views

I've been working with the yWorks for WPF technology for a few years now and have a chance to compare it to the Telerik WPF Diagramming framework and API sets; in my mind, these are complex and advanced UI frameworks. However, getting started is a long learning curve in many areas of geometry, some trigonometric calculations, systems programming, and some advanced animations work.  We are working to create the following technologies using the Diagramming frameworks:

  • OWL 2 DSL Logic and Visualization facilities
  • DSL Composition Editor and Visualization facilities
  • Microsoft Graph Engine TSL Editor
  • Real-time Workflow CMN and DMN Materializer and Interactive Visualization Facilities

I've been using yWorks - a fantastic technology and product, but expensive; it would be great if there was a better set of samples and tutorials around the dynamic use of the Diagramming APIs set for runtime capabilities. I think I've seen what guidance Telerik has made available to date; are there some additional resources available and what type of "professional services" might be available.

Tavi

0 answers
108 views

 

How to set the default first node unselected when page is loaded?

wang
Top achievements
Rank 1
 asked on 17 Feb 2022
1 answer
115 views

Hi,

This used to work:

<telerik:RadTransitionControl
            HorizontalContentAlignment="Stretch"
            VerticalContentAlignment="Stretch"
            Margin="10,0,0,0"
            Content="{Binding EventContent}">
            <telerik:RadTransitionControl.Transition>
                <telerikTransitions:RollTransition IsRollOut="True" IsTopToBottom="False" />
            </telerik:RadTransitionControl.Transition>
        </telerik:RadTransitionControl>

with 2022 update the control no longer shows *anything*

For testing, I hardcoded the Content:

        <telerik:RadTransitionControl
            HorizontalContentAlignment="Stretch"
            VerticalContentAlignment="Stretch"
            Margin="10,0,0,0">
            <TextBlock Foreground="Aqua" FontSize="44">This is a test</TextBlock>
            <telerik:RadTransitionControl.Transition>
                <telerikTransitions:RollTransition IsRollOut="True" IsTopToBottom="False" />
            </telerik:RadTransitionControl.Transition>
        </telerik:RadTransitionControl>

This showed the textbox while in Design mode, but when the app ran, nothing was displayed

 

Vladimir Stoyanov
Telerik team
 answered on 16 Feb 2022
1 answer
178 views

Hello,

is it possible to use the CardLayout-Property Rows but prevent wrapping?

I want to have just a single row with a horizontal scroll bar.

regards,

Tobias

 

Stenly
Telerik team
 answered on 16 Feb 2022
1 answer
1.8K+ views

Hi,

Xaml designer can't displayed content in the runtime design mode

but,  complie and excute all OK

The VS2019 project was made with WPF R3 2020, updated to WPF R1 2022  with VS2022 and compiled.

when installing wpf r1 2022, the installation folder was designated separately, and framework 4.6.2 was used.

Also, i tried to create a new one using the telerik template tool in vs2022 and tried it with

telerik ui for wpf->confiure project or upgrade wizard in 2019 existing project, but it didn't work.

 

Nikolay Mishev
Telerik team
 answered on 16 Feb 2022
1 answer
175 views
Hi, I'm trying to recreate a comparison view like the one attached. Is there a recommended way of going about this? I was hoping to be able to just use RadGridView but I can't get the data to show in columns properly. Maybe a RadListBox?
Martin Ivanov
Telerik team
 answered on 15 Feb 2022
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?