I am following the documentation guide Binding to Dynamic Data with one change, the RadMenu.ItemContainerStyle is set from code and not from XAML.
_menu = new RadMenu();var s = Application.Current.Resources["MenuItemStyle"] as Style;if (s != null) { _menu.ItemContainerStyle = s;}The XAML template matches the example, expect for the name of the nested items to match the class used to construct the menu items:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:local="clr-namespace:Anvil.Desktop.Windows8"> <Style x:Key="MenuItemStyle" TargetType="telerik:RadMenuItem"> <Setter Property="Header" Value="{Binding Text}"/> <Setter Property="ItemsSource" Value="{Binding Items}"/> <Setter Property="Icon" Value="{Binding IconUrl}" /> <Setter Property="IconTemplate" > <Setter.Value> <DataTemplate> <Image Source="{Binding}" Stretch="None"/> </DataTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary>The resource dictionary is merged and available in the merged resources but the menu items are not rendered as in the with_itemcontainerstyle_set.png attachment and when removing the style setting code:
_menu = new RadMenu();var s = Application.Current.Resources["MenuItemStyle"] as Style;if (s != null){ // _menu.ItemContainerStyle = s;}the class names of the menu items are displayed as in without_itemcontainerstyle_set.png
Any suggestions?
For every ItemPropertyDefinition FilterDescriptor is created. Is it possible that for some ItemPropertyDefinition custom filter descriptor will be made? For example for
var customItem = new ItemPropertyDefinition("customPropertyName", typeof(string))
CustomFilterDescriptor (CustomFilterDescriptor : FilterDescriptorBase) will be made in RadDataFilter.FilterDescriptors.
Hi,
I am looking to insert an InlineUIContainer by drag/drop of something into the RichTextBox but following dropping of the element, unless it is simple text being inserted I am struggling to work out how to insert an InlineUIContainer at the current cursor location.
I have managed to insert the control but only to the end of the document.
A code snippet below might help but errors not at point of insert but when it is trying to update the screen next... The code is taken from the drop handler event.
Dim point = args.GetPosition(richTextBox)
Dim pos = richTextBox.ActiveEditorPresenter.GetDocumentPositionFromViewPoint(point)
Dim container As New InlineUIContainer()
container.UiElement = New CheckBox() With {.Content = "Testing"}
container.Height = 25
container.Width = 70
ctype(pos.GetCurrentInline().Parent,Paragraph).Inlines.Add(container)
Kind regards,
Neil
Hey,i try to display to also display the miliseconds in the DateTime Picker. I changed the format like so:
dpDate.DisplayFormat = Telerik.Windows.Controls.DateTimePickerFormat.Short;dpDate.Culture = new System.Globalization.CultureInfo(CultureInfo.CurrentUICulture.LCID);dpDate.Culture.DateTimeFormat.ShortTimePattern = "HH:mm:ss fff";As soon as I manually change the time in the textbox for example to 13.05.2015 09:57:40 200 and hit return, the selected datetime & textbox text will reset to 13.05.2015 09:57:40 000. What am I doing wrong? ​
Hi,
We are trying to populate the parent / child data in hierarchical gridview at runtime. Columns of the grid view is based on the login user. So, we are not set the columns at design.
We use parent - child relationship as below code logic. We can see the parent details and child details. However, for child details, it is showing all information. It should be shown the data which is associated with the parent data.
<commonData:ExtendedGridView x:Name="HierarchicalGridView1"
Grid.Column="0" Margin="55,27,0,10" Grid.ColumnSpan="2"
CanUserReorderColumns="False" AutoGenerateColumns="False"
ShowGroupPanel="False" RowIndicatorVisibility="Collapsed"
ItemsSource="{Binding Source={StaticResource CollectionVM},Path=ParentCollection}"
commonData:GridViewBindingBehavior.ColumnsCollection="{Binding Source={StaticResource CollectionVM},Path=DynParentColumns}"
>
<telerik:RadGridView.ChildTableDefinitions >
<telerik:GridViewTableDefinition >
<telerik:GridViewTableDefinition.Relation>
<telerik:TableRelation IsSelfReference="False">
<telerik:TableRelation.FieldNames>
<telerik:FieldDescriptorNamePair
ParentFieldDescriptorName="ORDNO"
ChildFieldDescriptorName="ORDNO" />
</telerik:TableRelation.FieldNames>
</telerik:TableRelation>
</telerik:GridViewTableDefinition.Relation>
</telerik:GridViewTableDefinition>
</telerik:RadGridView.ChildTableDefinitions>
<telerik:RadGridView.HierarchyChildTemplate >
<DataTemplate>
<commonData:ExtendedGridView ShowColumnHeaders="False" ItemsSource="{Binding Source={StaticResource CollectionVM},Path=ChildCollection}" AutoGenerateColumns="False" ShowGroupPanel="False"
commonData:GridViewBindingBehavior.ColumnsCollection="{Binding Source={StaticResource CollectionVM},Path=DynParentColumns}" >
</commonData:ExtendedGridView>
</DataTemplate>
</telerik:RadGridView.HierarchyChildTemplate>
Your help is much appreciated.
Thanks
VG
Hello,
1. When the Combobox receives the focus with a table, nothing appears with the OnLostFocus method and the LostFocus event.
Correct.
2. When the ComboBox is clicked with the mouse the OnLostFocus method is called and then the LostFocus event is raised.
Error: these should not be called.
3. When the ComboBox loses the focus, the LostFocus event is raised, but the OnLostFocus method is not called.
Error: the OnLostFocus method should be called.
Normally, this OnLostFocus method should fire the LostFocus event. It seems to be bypassed in position 3.