Telerik Forums
UI for WPF Forum
1 answer
230 views

Hi

I'm trying to style the column header background colour of the RadTaskBoard.

Using the RadTaskBoard.ColumnHeaderTemplate you can change the content of the column header as in the image below, but you can't style the background.

I need each column header (and collapsed header) to have its own colour. Is there a way I can achieve this?

Thanks

Guy

Dilyan Traykov
Telerik team
 answered on 31 Aug 2021
4 answers
309 views

Hello.

I've attached some examples.

This is different when I do a mouse click event and a SelectedItem on the source.

When selecting with the mouse, the default color of Fluent is cyan.

When defining SelectedItem by code, it is defined with a gray background. (SelectedItem = data)
When you select the SelectedItem with the mouse, it is selected again and it is changed to a cyan color.

is this correct?
How do I solve it?

 

Stenly
Telerik team
 answered on 30 Aug 2021
1 answer
199 views

Hello.

 

I posted a post a while ago and had the desired solution.

https://www.telerik.com/forums/error-empty-gridview-message-content-in-gridview-sdk

 

However, in this case, there was only one grid view in the tab control and the other items were of different types.

Now I need multiple gridviews inside the tab control.

If you add multiple gridviews, an error like the link above will occur.

The first gridview passes, but errors start in the remaining 2nd and 3rd gridviews.

 

The attached example is just adding TabItems from the previous link and deferring InsertAdditionalContentControl .

How to solve this?

 

Thanks.

Martin Ivanov
Telerik team
 answered on 30 Aug 2021
1 answer
123 views

GanttView can import from xml , but export xml need to install MSProject.

Can I export the GanttView to XML format do't install MSProject ?

Stenly
Telerik team
 answered on 27 Aug 2021
1 answer
269 views

I am trying to achieve the following behavior:

1. Wheel will control vertical scroll

2. Horizontal scroll will be visible with resize controls (zoom in and zoom out)

 

Is this possible?

Vladimir Stoyanov
Telerik team
 answered on 27 Aug 2021
1 answer
469 views

The RadToggleButton is in example.xaml, how to get the statue of it(ischeck or not) in ViewModel.cs ?

And change the statue of Button in ViewModel.cs?

Thanks~

Psyduck
Top achievements
Rank 5
Bronze
Bronze
Bronze
 updated answer on 27 Aug 2021
3 answers
272 views

 

Hi, Telerik,

I am developing for WPF Prism application on .Net 5.

I need to provide an editor functionality which is in MS Word.

I found Perlom's question here and have read it but, I can't have any clue.

How can I solve this problem?

For your information, I am going to attach an image file captured  Perlom's question.

 

TIA

Kang

 

Vladislav
Telerik team
 answered on 27 Aug 2021
1 answer
254 views

Hi all,

I have a RadListBox inside a RadExpander. I can't get the notify of SelectedItem, SelectedValue etc
How can manage the selection in this scenario.
Thank you in advance

Luigi


<DataTemplate x:Key="PanelBarCursorTemplate">
			<t:RadExpander t:AnimationManager.IsAnimationEnabled="True">
				<t:RadExpander.Header >
					<StackPanel Orientation="Horizontal"  >
						<CheckBox Margin="10 5 5 5" VerticalAlignment="Center" IsChecked="{Binding IsChecked}"/>
						<TextBlock Text="{Binding Name}" VerticalAlignment="Center" />
						<TextBlock Text="{Binding Internal.PositionX, StringFormat={StaticResource ResourceKey=StringFormatTime}}" VerticalAlignment="Center" Margin="5 0"/>
					</StackPanel>
					</t:RadExpander.Header>
				<t:RadExpander.Content>
					<StackPanel Orientation="Vertical" Margin="5 0 0 0" VerticalAlignment="Center">
						<t:RadGridView ItemsSource="{Binding Internal.PositionsY}"
									   AutoGenerateColumns="False"
									   ShowColumnHeaders="False"
									   ShowColumnFooters="False"
									   ShowGroupPanel="False"
									   ShowScrollPositionIndicator="False"
									   ShowSearchPanel="False"
									   IsReadOnly="True">
							<t:RadGridView.Columns>
								<t:GridViewDataColumn DataMemberBinding="{Binding ParameterName}" Width="50"/>
								<t:GridViewDataColumn DataMemberBinding="{Binding ParameterValue}" Width="50"/>
							</t:RadGridView.Columns>
						</t:RadGridView>
						<!--<TextBlock Text="{Binding Internal.PositionY, StringFormat={}{0:F4}}"	
							   Visibility="{Binding PositionYVisibility, Converter={StaticResource BoolToVis}}"/>-->
					</StackPanel>
				</t:RadExpander.Content>
			</t:RadExpander>
		</DataTemplate>


<t:RadDocking>
		<t:RadDocking.DocumentHost>
			<StackPanel>
				
				<t:RadListBox ItemsSource="{Binding TabRisultati.Cursori}" 
							  ItemTemplate="{StaticResource PanelBarCursorTemplate}"
							  SelectionMode="Single"
							  SelectedItem="{Binding TabCursori.SelectedCursor}"/>
			</StackPanel>
		</t:RadDocking.DocumentHost>
	</t:RadDocking>

Martin Ivanov
Telerik team
 answered on 26 Aug 2021
1 answer
2.1K+ views

Hello. I'm using a RadTabControl with statically declared RadTabItems in the XAML. Within a RadTabItem, I am using a RadTabItem.HeaderTemplate to define the item's header to include an image. Immediately following the HeaderTemplate, I put a reference to another View (a UserControl). I've included the XAML for the RadWindow which contains the TabControl I am referring to below.

Here's my question. I am looking to load data when a new TabItem is selected, instead of loading data in the constructors of my VIewModels (so that I am not loading a ton of data when the app launches). So, for example, I don't want to load the data within Manifests_Home_ViewModel until the user has selected the Manifests TabItem. But, as you can see in my XAML, a reference to my UserControl 

<mainWindow:Manifests_Home_View />

is nested within the first tab item of a TabControl on my MainWindow View.  But the Manifests_Home_View doesn't know anything about the parent View (MainWindow) that is is nested in. Since the TabControl is on the MainWindow, I don't know how to inform this child/nested view that its parent TabItem has been selected.

I'm fairly new to MVVM and am still converting parts of my app properly to MVVM. I found some stuff about hierarchies with Views/ViewModels and MVVM, but that was more about dynamically generated/injected Views. These aren't dynamic as such, as they are defined up front. They are simply split out into multiple views for organization and cleared code.

Thank you for your help.

<telerik:RadWindow x:Class="TheReplacementSystem.Modules._MainWindow.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                   xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:navigation="clr-namespace:Telerik.Windows.Controls.Navigation;assembly=Telerik.Windows.Controls.Navigation"
                   navigation:RadWindowInteropHelper.ShowInTaskbar="True" navigation:RadWindowInteropHelper.AllowTransparency="True" navigation:RadWindowInteropHelper.Icon="/ImageResources/HeaderTab/export.png"
                   navigation:RadWindowInteropHelper.Title="The New System" Header="The New System" WindowState="Maximized" Width="1920" Height="1040" HorizontalAlignment="Stretch"
                   xmlns:delivery="clr-namespace:TheReplacementSystem.Views.Delivery"
                   xmlns:mainWindow="clr-namespace:TheReplacementSystem.Modules._MainWindow"
                   Closed="MainWindow_OnClosed">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <!--<RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />-->
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <!--main Tab Control for the entire app-->
        <telerik:RadTabControl x:Name="MainAppTabControl" Grid.Row="0" Grid.Column="0" Margin="5, 5, 5, 5" Loaded="MainAppTabControl_OnLoaded" TabClosed="MainAppTabControl_OnTabClosed" AllowDragReorder="False" AllowDragOverTab="False" SelectedItemRemoveBehaviour="SelectPrevious">
            
            <!--Manifests - home tab-->
            <telerik:RadTabItem x:Name="tabItem_Manifest" Header="Manifests" Loaded="ManifestTab_OnLoaded">
                <telerik:RadTabItem.HeaderTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Image Source="/ImageResources/HeaderTab/manifest.png" Width="30" />
                            <telerik:Label Content="Manifest" FontWeight="Bold" />
                        </StackPanel>
                    </DataTemplate>
                </telerik:RadTabItem.HeaderTemplate>
                <mainWindow:uc_Manifests_Home />
            </telerik:RadTabItem>
            <!--Exports - home tab-->
            <telerik:RadTabItem x:Name="tabItem_Exports" Header="Exports" Loaded="ExportsTab_OnLoaded">
                <telerik:RadTabItem.HeaderTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Image Source="/ImageResources/HeaderTab/export.png" Width="30" />
                            <telerik:Label Content="Export" FontWeight="Bold" />
                        </StackPanel>
                    </DataTemplate>
                </telerik:RadTabItem.HeaderTemplate>
                <mainWindow:uc_Exports_Home />
            </telerik:RadTabItem>
            <!--Declarations - home tab-->
            <telerik:RadTabItem x:Name="tabItem_Declarations" Header="Declarations">
                <telerik:RadTabItem.HeaderTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Image Source="\ImageResources/HeaderTab/declarations.jpg" Width="30" />
                            <telerik:Label Content="Declarations" FontWeight="Bold" />
                        </StackPanel>
                    </DataTemplate>
                </telerik:RadTabItem.HeaderTemplate>
                <mainWindow:uc_Declarations_Home />
            </telerik:RadTabItem>
            <!--Billing - home tab-->
            <telerik:RadTabItem x:Name="tabItem_Billing" Header="Billing">
                <telerik:RadTabItem.HeaderTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Image Source="\ImageResources/HeaderTab/billing.png" Width="30" />
                            <telerik:Label Content="Billing" FontWeight="Bold" />
                        </StackPanel>
                    </DataTemplate>
                </telerik:RadTabItem.HeaderTemplate>
                <mainWindow:uc_Billing_Home />
            </telerik:RadTabItem>
            <!--Delivery - home tab-->
            <telerik:RadTabItem x:Name="tabItem_Delivery" Header="Delivery">
                <telerik:RadTabItem.HeaderTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Image Source="\ImageResources/HeaderTab/delivery.png" Width="30" />
                            <telerik:Label Content="Delivery" FontWeight="Bold" />
                        </StackPanel>
                    </DataTemplate>
                </telerik:RadTabItem.HeaderTemplate>
                <delivery:uc_Delivery />
            </telerik:RadTabItem>
            <!--Logistics dispatch - home tab-->
            <telerik:RadTabItem x:Name="tabItem_LogisticsDispatch" Header="Dispatch">
                <telerik:RadTabItem.HeaderTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Image Source="\ImageResources/HeaderTab/dispatch.jpg" Width="30" />
                            <telerik:Label Content="Dispatch" FontWeight="Bold" />
                        </StackPanel>
                    </DataTemplate>
                </telerik:RadTabItem.HeaderTemplate>
            </telerik:RadTabItem>
            <!--Data Management - home tab-->
            <telerik:RadTabItem x:Name="tabItem_DataManagement" Header="Data Management" Loaded="DataMaintenance_OnLoaded">
                <telerik:RadTabItem.HeaderTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Image Source="/ImageResources/HeaderTab/datamangement.png" Width="30" />
                            <telerik:Label Content="Data Management" FontWeight="Bold" />
                        </StackPanel>
                    </DataTemplate>
                </telerik:RadTabItem.HeaderTemplate>
                <mainWindow:uc_DataManagement_Home />
            </telerik:RadTabItem>
        </telerik:RadTabControl>
    </Grid>
</telerik:RadWindow>


Dilyan Traykov
Telerik team
 answered on 25 Aug 2021
1 answer
1.7K+ views

Hi,

This is bit outdated question, but I want to handle GridviewRow double click event more efficiently.

My grid view contains RowDetails template (Tab control). Row details contains summary and attachment tab. While attachment tab displays attachments in girdview control.

I had registered GridviewRow double click event in parent GridView as


private void GridView_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
        {
            if (e.Row is GridViewRow)
            {
                e.Row.AddHandler(GridViewRow.MouseDoubleClickEvent, new MouseButtonEventHandler(OnRowMouseDoubleClick), false);
            }
        }

Double click event is fired as expected but with following exception (which is not required), but as per behavior its valid.

  • Double click event triggered by double click on parent gridview header
  • Double click event triggered by double click on GridviewRow details (even scroll bar in attachment gridview)

To overcome these I added following checks


private async void OnRowMouseDoubleClick(object sender, MouseButtonEventArgs args) { FrameworkElement originalSender = args.OriginalSource as FrameworkElement; var cell = originalSender.ParentOfType<GridViewCell>(); if (cell == null) { return; } var selectedRowContext = ((System.Windows.FrameworkElement)sender).DataContext as MyDataContext; if (selectedRowContext == null) return;

}

Basically I am validating Gridview Header and RowDetails gridview scrollbar by "cell" in above example.

While I validate Row details double click by selectedRowContext as there datacontext is different from MyDataContext.

I feel that this is temporary solution. I want to fix it, i.e. double click only happens on DataRow or Data cell. All other controls in Gridview should be excluded.

 

 

 

Dilyan Traykov
Telerik team
 answered on 25 Aug 2021
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?