Hi,
I've got a DataForm with a QueryableEntityCollectionView as ItemSource.
The QueryableEntityCollectionView is filtered, the DataForm as a custom CommandProvider.
An exception occurs when DataForm.AddNewItem() is beeing hit. "An unhandled exception of type 'System.NullReferenceException' occurred in Telerik.Windows.Data.dll" this is not happening when there is no filter active. Any idea why this is happening and how to have a filter active and add a new item?
Cheers! Eric
I have this style defined in the page resource
<Style x:Key="MsgStatusStyle" TargetType="telerik:GridViewCell">
<Setter Property="Foreground" Value="Red" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
</Style>
I assign the style for a GridViewDataColumn as follows
<telerik:GridViewDataColumn DataMemberBinding="{Binding MsgStatus}" Header="Msg Status" UniqueName="MsgStatus"
IsReadOnly="True" IsVisible="{Binding Data.GridColumns.MsgStatusIsVisible, Source={StaticResource proxy} , Mode=TwoWay}"
DisplayIndex="{Binding Data.GridColumns.MsgStatusOrder, Source={StaticResource proxy} , Mode=TwoWay}"
SortMemberPath="MsgStatus" CellStyle="{StaticResource MsgStatusStyle}" >
</telerik:GridViewDataColumn>
But the foreground doesnt change to Red. If I change the property in the style definition to background that changes to red upon rendering.
Any idea why froeground color doesnt change ?
I have a RadListBox with an ItemTemplate that contains a read-only RadNumericUpDown. When I click on the RadNumericUpDown, the list item is not selected. How can I make that happen?
I'm attempting to change the SelectedUnfocused VisualState. I've extracted the style using Blend, made the correction for the Item Template Selector, and have set the Selected Unfocused Visual State to StoryBoard.TargetName="SelectionVisual". So focused/unfocused look the same.
I'm also setting the StyleManager.ApplicationTheme to Windows7Theme in the window constructor prior to the InitializeComponent() call.
Simple xaml. I would expect the highlights to be a blue-ish color. However, they are the orange-ish color.
<Grid>
<telerik:RadTreeView ItemsSource="{Binding Nodes}"
ItemTemplateSelector="{StaticResource TreeViewTemplateSelector}"
ItemContainerStyle="{DynamicResource RadTreeViewItemStyle1 }"/>
</Grid>
However, if I do this, setting a simple property on the Item Container Style, the theme works.
<Grid>
<telerik:RadTreeView ItemsSource="{Binding Nodes}"
ItemTemplateSelector="{StaticResource TreeViewTemplateSelector}">
<telerik:RadTreeView.ItemContainerStyle>
<Style TargetType="{x:Type telerik:RadTreeViewItem}">
<Setter Property="IsExpanded" Value="True"></Setter>
</Style>
</telerik:RadTreeView.ItemContainerStyle>
</telerik:RadTreeView>
<!--ItemContainerStyle="{DynamicResource RadTreeViewItemStyle1 }"/>-->
</Grid>
I know the second case doesn't change the unfocused selection visual state, so how might I get theming to work when basing the Item Container Style on a complete style?
Thanks,
Kenny
I've found very strange behavior.
A simple project contains the window with RadGridView. ItemsSource is binded to ViewModel.Rows where Rows is ObservableCollection.
I fill rows inside Window Loaded event.
RadGridView doen't updated if I don't use Rows.Clear() before Rows.Add().
Can you explain this?
Here is xaml:
01.
<
Window
x:Class
=
"TelerikWpfApp1.MainWindow"
03.
xmlns:x
=
"http://schemas.microsoft.com/winfx/2006/xaml"
04.
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
05.
xmlns:local
=
"clr-namespace:TelerikWpfApp1"
06.
Loaded
=
"Window_Loaded"
>
07.
<
Window.Resources
>
08.
<
local:ViewModel
x:Key
=
"vm"
/>
09.
</
Window.Resources
>
10.
<
Grid
DataContext
=
"{Binding Mode=OneWay, Source={StaticResource vm}}"
>
11.
<
telerik:RadGridView
ItemsSource
=
"{Binding Rows}"
/>
12.
</
Grid
>
13.
</
Window
>
And code behind:
01.
using
System.Collections.ObjectModel;
02.
using
System.Windows;
03.
04.
namespace
TelerikWpfApp1
05.
{
06.
public
partial
class
MainWindow : Window
07.
{
08.
public
MainWindow()
09.
{
10.
InitializeComponent();
11.
}
12.
13.
private
void
Window_Loaded(
object
sender, RoutedEventArgs e)
14.
{
15.
var rows = ((ViewModel)FindResource(
"vm"
)).Rows;
16.
// to make it work uncomment the next row
17.
//rows.Clear();
18.
rows.Add(
new
Row { Name =
"Name1"
, Column1 =
"value1_1"
});
19.
rows.Add(
new
Row { Name =
"Name2"
, Column1 =
"value2_1"
});
20.
}
21.
}
22.
23.
class
Row
24.
{
25.
public
string
Name {
get
;
set
; }
26.
public
string
Column1 {
get
;
set
; }
27.
}
28.
29.
class
ViewModel
30.
{
31.
public
ObservableCollection<Row> Rows {
get
; } =
new
ObservableCollection<Row>();
32.
}
33.
}
Hi,
I have a radform that is opened in the rowdetails of a radgrid that is in a radpane. If I change the value of a textbox, for example, and click on another control in the radform and then try to close pane, the previewclose event fires and I (after checking for changes) ask the user if they want to save changes and all is well. However, if instead of clicking on another control in the radform, I close the pane either by clicking on the X in the upper right hand corner of the pane or via code by setting the visibility property to hidden, I never get the previewclose event. Is this a bug? Is there a work around?
Thanks ... Ed
I've recently upgraded my visual studio from 2010 to 2015, and since them, I'm getting a lot of warnings in my output window like:
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='10705061';
Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X';
DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='1587067';
Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X';
DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='4309168';
Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X';
DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='59694858'; Freezable.Type='System.Windows.Media.TranslateTransform';
DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='1914083';
Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X';
DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='19024873';
Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X';
DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='50812954';
Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X';
DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='4881566';
Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X';
DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='18343908';
Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X';
DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='20169503';
Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X';
DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='35212414';
Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X';
DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='41054801'; Freezable.Type='System.Windows.Media.TranslateTransform';
DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='35526744';
Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X';
DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='55199627';
Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X';
DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='955278';
Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X';
DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='42987539';
Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X';
DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='55391087';
Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X';
DpOwnerType='System.Windows.Media.TranslateTransform'
System.Windows.Freezable Warning: 1 : CanFreeze is returning
false because a DependencyProperty on the Freezable has a value that is an
expression; Freezable='System.Windows.Media.TranslateTransform';
Freezable.HashCode='9570975'; Freezable.Type='System.Windows.Media.TranslateTransform';
DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
It happens every time a value in the gridview is changed.
It affects the performance of visual studio, since the output window is very busy.
Why it happens? It is something you are doing wrong and can be fixed?
Can I disable these warnings somehow?
Thanks.