Hello,
I'm using this article to make a custom appointment and custom appointment dialog, but it doesn't work. It says that you're supposed to be able to access custom appointment properties, but I try to display a custom appointment property in a combobox and it doesn't work.
This is my code, my custom appointment has a property named "FactionDef" of type "List_ShiftDTO", I bind it to selectedItem but it can't find it even if it's clearly there. The combobox shows the itemsource and all the "List_ShiftDTO" objects inside the ObservableCollection "TypeFactions".
<
telerik:RadComboBox
Grid.Row
=
"2"
Grid.Column
=
"1"
SelectedItem
=
"{Binding Occurrence.Appointment.FactionDef, Mode=TwoWay}"
Margin
=
"3"
ItemsSource
=
"{Binding RelativeSource={RelativeSource AncestorType=telerik:SchedulerWindow}, Path=ScheduleView.DataContext.TypeFactions}"
DisplayMemberPath
=
"Display"
/>
I have a RadGridView and one of the columns is called "Actions". Basically it contains a RadDropDownButton component which displays a list of actions.
The problem I have is, when I have like 50 rows in the grid, if I click on the RadDropDownButton in the first row and then by using the mouse wheel to scroll down,
the popup window of the RadDropDownButton stays open and it loads different actions I guess for the elector the mouse wheel got focused afterwards.
Can somebody explain me here, what should I do?
Set the SelectedItem of the grid to the mouse wheel row that was focused or hovered?
How to get the row that is being focused or hovered with MouseWheel event?
If I set the SelectedItem to the CurrentItem will this fix my problem?
Why I see CurrentItem and no CurentRow? Because I use older version of WPF Telerid RadGridView?
Could I possibly close the popup window of the RadDropDownButton on the MouseWheel event?
Any other info would be useful.
I have been trying to change the Thumb color in my RadToggleSwitchButton.
I have the following code:
<
telerik:RadToggleSwitchButton
Grid.Row
=
"15"
Margin
=
"0,0,0,0"
Padding
=
"0"
ContentPosition
=
"Both"
Foreground
=
"White"
IsChecked
=
"{Binding IsRadToggleSwitchButtonChecked}"
>
<
telerik:StyleManager.Theme
>
<
telerik:MaterialTheme
/>
</
telerik:StyleManager.Theme
>
<
ToggleButton.LayoutTransform
>
<
RotateTransform
Angle
=
"90"
/>
</
ToggleButton.LayoutTransform
>
<
telerik:RadToggleSwitchButton.UncheckedContent
>
<
Border
>
<
TextBlock
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Center"
FontSize
=
"10"
FontWeight
=
"Bold"
Foreground
=
"White"
TextAlignment
=
"Center"
>
<
TextBlock.LayoutTransform
>
<
RotateTransform
Angle
=
"-90"
/>
</
TextBlock.LayoutTransform
>
T1<
LineBreak
/>
t1</
TextBlock
>
</
Border
>
</
telerik:RadToggleSwitchButton.UncheckedContent
>
<
telerik:RadToggleSwitchButton.CheckedContent
>
<
Border
>
<
TextBlock
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Center"
FontSize
=
"10"
FontWeight
=
"Bold"
Foreground
=
"White"
TextAlignment
=
"Center"
>
<
TextBlock.LayoutTransform
>
<
RotateTransform
Angle
=
"-90"
/>
</
TextBlock.LayoutTransform
>
T2<
LineBreak
/>
t2</
TextBlock
>
</
Border
>
</
telerik:RadToggleSwitchButton.CheckedContent
>
</
telerik:RadToggleSwitchButton
>
I want to change these orange/white colors in the image attached.
Hi,
I have a RadGridView which is bind on the Items property from my ViewModel :
<telerik:RadGridView x:Name="gridView"
Grid.Row="1"
ItemsSource="{Binding Items}"
>
On many column, user can Filter, Sort, ...
<telerik:GridViewDataColumn Header="Nom"
IsGroupable="False" IsSortable="True" IsFilterable="True"
DataMemberBinding="{Binding Utilisateur.Nom, Mode=OneTime}"
Width="150" MinWidth="10" />
Unfortunately, the filters are reset each time the Items property is modified (if the user reloads the data, modifies his search, ...).
Is there a way to prevent this reset of the filters on the columns?
Thx,
Hi, I'm new to Telerik and have the following problem.
I am currently using the LayoutControlSplitter.
The problem is that if I move the splitter right to the end of the window it goes outside the window.
Code:
<
Grid
>
<
telerik:RadLayoutControl
>
<
telerik:LayoutControlExpanderGroup
Header
=
"Expander group"
/>
<
telerik:LayoutControlSplitter
/>
<
Button
Content
=
"Button"
/>
</
telerik:RadLayoutControl
>
</
Grid
>
How can I fix the problem? Thank you very much!
Hi,
We have a series of views consisting of a search box, search options and then a results RadGridView. Since the functionality & bindings is the same on each, we have a UserControl that holds the search box & search options functionality. The only difference between each view is the Columns in RadGridView, so we are trying to put the RadGridView inside the UserControl and allow the columns to be specified by the implementing view.
Do you know how we could achieve this?
Roughly what we're trying to do:
<UserControl x:Class="UserControls.BaseSearch"
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"
Height="Auto" Width="Auto">
<Grid>
<telerik:RadGridView Margin="0" Name="radGridView1" ItemsSource="{Binding SearchResults}" />
</Grid>
</UserControl>
<UserControl x:Class="Views.CustomerSearch"
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:userControls="http://schemas.telerik.com/2008/xaml/presentation"
Height="Auto" Width="Auto">
<Grid>
<userControls:BaseSearch>
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Header="Reference"
Name="Reference"
DataMemberBinding="{Binding Reference}" Width="100">
</telerik:GridViewDataColumn>
<telerik:GridViewDataColumn Header="Description"
DataMemberBinding="{Binding Description}"
Width="200" />
<telerik:GridViewDataColumn Header="Start Date"
DataMemberBinding="{Binding StartDate, StringFormat=d}"
ShowDistinctFilters="False"
Width="130" />
</telerik:RadGridView.Columns>
</userControls:BaseSearch>
</Grid>
</UserControl>
I have a RadGridView which contains one column which is for input, and this column contains a CellEditTemplate with several fields for input, like name, middle names and surname.
Name and surname must not be empty for the validation to pass. When I click to add new row, the form with these fields appear in view and I can edit them.
If I add text for the mandatory fields, name and surname and then click on other column in this new row, the validation passes and form collapses, which makes the row look as saved when its not.
This could have two solutions, either tell the user that the row is still in edit mode and its not saved, or just prevent the form from collapsing.
How can I do both things for example?
Display message that the row is still in edit mode, and prevent the form from collapsing if it is still in edit mode?
Note: I have cell validating event set, and also name and surname have "Required" data annotation attribute.
Hello
Does Telerik UI for WPF have Stepper Control like Stepper in Telerik UI for ASP.NET Core?
Thanks in advanced
Abdulsalam
I have a ScheduleView control and I am using a GroupHeaderContentTemplateSelector and a ResourceTypeCollection to display 3 groups:
<
scheduleView:ResourceTypeCollection
x:Key
=
"ResourcesTypes"
>
<
scheduleView:ResourceType
Name
=
"Schedule"
>
<
scheduleView:Resource
ResourceName
=
"ScheduleOrder"
DisplayName
=
"Orders"
/>
<
scheduleView:Resource
ResourceName
=
"ScheduleHeat"
DisplayName
=
"Heats"
/>
<
scheduleView:Resource
ResourceName
=
"ScheduleTundish"
DisplayName
=
"Tundishes"
/>
</
scheduleView:ResourceType
>
</
scheduleView:ResourceTypeCollection
>
<
localStyles:CustomGroupHeaderContentTemplateSelector
x:Key
=
"CustomGroupHeaderContentTemplateSelector"
>
<
localStyles:CustomGroupHeaderContentTemplateSelector.HorizontalTemplate
>
<
DataTemplate
>
<
ContentPresenter
Content
=
"{Binding FormattedName}"
Margin
=
"2"
Width
=
"80"
Height
=
"30"
VerticalAlignment
=
"Center"
/>
</
DataTemplate
>
</
localStyles:CustomGroupHeaderContentTemplateSelector.HorizontalTemplate
>
<
localStyles:CustomGroupHeaderContentTemplateSelector.VerticalTemplate
>
<
DataTemplate
>
<
telerik:LayoutTransformControl
VerticalAlignment
=
"Center"
>
<
telerik:LayoutTransformControl.LayoutTransform
>
<
RotateTransform
Angle
=
"0"
/>
</
telerik:LayoutTransformControl.LayoutTransform
>
<
ContentPresenter
Content
=
"{Binding FormattedName}"
Margin
=
"5"
Width
=
"70"
/>
</
telerik:LayoutTransformControl
>
</
DataTemplate
>
</
localStyles:CustomGroupHeaderContentTemplateSelector.VerticalTemplate
>
<
localStyles:CustomGroupHeaderContentTemplateSelector.HorizontalResourceTemplate
>
<
DataTemplate
>
<
ContentPresenter
Content
=
"{Binding Name.DisplayName}"
Margin
=
"2"
Width
=
"80"
Height
=
"30"
VerticalAlignment
=
"Center"
/>
</
DataTemplate
>
</
localStyles:CustomGroupHeaderContentTemplateSelector.HorizontalResourceTemplate
>
<
localStyles:CustomGroupHeaderContentTemplateSelector.VerticalResourceTemplate
>
<
DataTemplate
>
<
telerik:LayoutTransformControl
VerticalAlignment
=
"Center"
>
<
telerik:LayoutTransformControl.LayoutTransform
>
<
RotateTransform
Angle
=
"0"
/>
</
telerik:LayoutTransformControl.LayoutTransform
>
<
ContentPresenter
Content
=
"{Binding FormattedName}"
Margin
=
"5"
Width
=
"60"
Height
=
"23"
MaxHeight
=
"23"
MinHeight
=
"23"
/>
</
telerik:LayoutTransformControl
>
</
DataTemplate
>
</
localStyles:CustomGroupHeaderContentTemplateSelector.VerticalResourceTemplate
>
</
localStyles:CustomGroupHeaderContentTemplateSelector
>
<
scheduleView:RadScheduleView
x:Name
=
"scheduleViewOrders"
Grid.RowSpan
=
"2"
BorderThickness
=
"0 1 1 1"
MinAppointmentHeight
=
"20"
FirstVisibleTime
=
"00:00"
GroupHeaderContentTemplateSelector
=
"{StaticResource CustomGroupHeaderContentTemplateSelector}"
AppointmentItemContentTemplate
=
"{ StaticResource AppointmentTemplate}"
ResourceTypesSource
=
"{StaticResource ResourcesTypes}"
ShowAppointmentDeleteButton
=
"False"
ShowCurrentTimeIndicator
=
"False"
HorizontalScrollBarVisibility
=
"Visible"
>
<
scheduleView:RadScheduleView.ActiveViewDefinition
>
<
scheduleView:DayViewDefinition
GroupFilter
=
"{Binding GroupFilter}"
Orientation
=
"Horizontal"
VisibleDays
=
"10"
MinorTickLength
=
"1h"
MajorTickLength
=
"1h"
MinTimeRulerExtent
=
"3000"
/>
</
scheduleView:RadScheduleView.ActiveViewDefinition
>
<
scheduleView:RadScheduleView.GroupDescriptionsSource
>
<
scheduleView:GroupDescriptionCollection
>
<
scheduleView:DateGroupDescription
></
scheduleView:DateGroupDescription
>
<
scheduleView:ResourceGroupDescription
ResourceType
=
"Schedule"
/>
</
scheduleView:GroupDescriptionCollection
>
</
scheduleView:RadScheduleView.GroupDescriptionsSource
>
</
scheduleView:RadScheduleView
>
Now, the problem that I have is next: when I start the application there is no information to display (Image1), then I select a different day, where there is information, but something weird is happening, I can see only one row, the groups have disappeared along with the days (Image2) only after I scroll a little bit everything goes back to normal (Image3).
I am not sure what is happening, have you seen this behavior before?
Hi,
I tried adding a node and a link to the GraphSource. It worked but after this operation, the diagram layout seems to have been reset even though the AutoLayout property is set to True.
MainWindow.xaml.cs
using System;
using System.Windows;
using radDiagramTest.ViewModels;
using Telerik.Windows.Diagrams.Core;
namespace radDiagramTest
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
ClassificationGraphViewModel viewModel = RootGrid.Resources["ViewModel"] as ClassificationGraphViewModel;
ClassificationDiagram.GraphSource = viewModel?.GraphSource;
ClassificationDiagram.Loaded += ClassificationDiagram_Loaded;
ClassificationDiagram.AutoFit( new Thickness( 10 ), false );
}
private void ClassificationDiagram_Loaded( Object _sender, RoutedEventArgs _e )
{
TreeLayoutSettings settings = new TreeLayoutSettings
{
TreeLayoutType = TreeLayoutType.TreeDown,
HorizontalSeparation = 300d,
VerticalSeparation = 75d
};
settings.Roots.Add( ClassificationDiagram.Shapes[0] );
ClassificationDiagram.Layout( LayoutType.Tree, settings );
ClassificationDiagram.AutoLayout = true;
ClassificationDiagram.IsEditable = false;
}
}
}
NodeViewModel.cs (node custom view model where the Add button is)
using System;
using System.Windows;
using System.Windows.Input;
using radDiagramTest.ViewModels;
using Telerik.Windows.Controls.Diagrams.Extensions.ViewModels;
namespace radDiagramTest
{
public class NodeViewModel : HierarchicalNodeViewModel
{
public NodeViewModel( ClassificationGraphViewModel _parent )
{
m_Parent = _parent;
AddNodeCommand = new SimpleCommand( AddNodeCommandHandler );
}
public ICommand AddNodeCommand { get; set; }
public String Name { get; set; }
private void AddNodeCommandHandler()
{
NodeViewModel newNode = new NodeViewModel( m_Parent ) { Name = "New Node" };
m_Parent.GraphSource.AddNode( newNode );
LinkViewModel newLink = new LinkViewModel( this, newNode ) { Name = "New Edge" };
m_Parent.GraphSource.AddLink( newLink );
}
private readonly ClassificationGraphViewModel m_Parent;
}
}