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.
Dear Telerik support,
My datetime columns arebehaving just the same as you can seein your article here
http://docs.telerik.com/devtools/wpf/controls/radgridview/export/how-to/export-datetime
Then i tried the given solution,but although the event is being called and the Format being attributed with the correct format, the solution doesn't not working for me. My datetime columns cells show as #########
Can you please check my code and see if i am missing something?
private
void
CustomGridview_ElementExportingToDocument(
object
sender, GridViewElementExportingToDocumentEventArgs e)
{
if
(e.Element == ExportElement.Cell)
{
var cellExportingArgs = e
as
GridViewCellExportingEventArgs;
var parameters = cellExportingArgs.VisualParameters
as
GridViewDocumentVisualExportParameters;
if
(cellExportingArgs.Column.GetType() ==
typeof
(GridViewDataColumn))
{
if
(((GridViewDataColumn)cellExportingArgs.Column).DataFormatString ==
"d"
)
{
parameters.Style =
new
CellSelectionStyle()
{
Format =
new
CellValueFormat(CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern)
};
}
if
(((GridViewDataColumn)cellExportingArgs.Column).DataFormatString ==
"g"
)
{
parameters.Style =
new
CellSelectionStyle()
{
Format =
new
CellValueFormat(CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern +
" "
+ CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern)
};
}
}
}
}
Thank you
<
telerik:RadTimeBar
Height
=
"130"
Name
=
"RadTimeBar1"
PeriodEnd
=
"04/10/2014 00:00:00"
PeriodStart
=
"03/31/2012 00:00:00"
SelectionEnd
=
"04/06/2012 00:00:00"
SelectionStart
=
"04/05/2012 00:00:00"
Width
=
"Auto"
Cursor
=
"Hand"
Content
=
"From here you can chose the interval the below data will be shown"
IsManipulationEnabled
=
"True"
UseLayoutRounding
=
"True"
>
<
telerik:RadTimeBar.Intervals
>
<
telerik:YearInterval
/>
<
telerik:MonthInterval
/>
<
telerik:WeekInterval
/>
<
telerik:DayInterval
/>
</
telerik:RadTimeBar.Intervals
>
</
telerik:RadTimeBar
>
Hi,
I'm trying to show on the same chart different series types, I need to show Point3d and also Surface3d.
I have no idea why it's not working, actually it shows my surface3d as point3d.
this is the xaml code:
<Window x:Class="TelerikWpfApp76.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:po="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="po"
Title="MainWindow" Height="475.829" Width="525"
po:DesignHeight="300"
po:DesignWidth="300"
DataContext="{Binding RelativeSource={RelativeSource Self}}">
<Window.Resources>
</Window.Resources>
<Grid Width="{Binding ActualWidth, RelativeSource = {RelativeSource AncestorType = {x:Type Window}}}"
Height="{Binding ActualHeight, RelativeSource ={RelativeSource AncestorType = {x:Type Window}}}">
<telerik:RadCartesianChart3D x:Name="radCartesian" HorizontalContentAlignment="Stretch">
<telerik:RadCartesianChart3D.Behaviors>
<telerik:Chart3DCameraBehavior/>
<telerik:Chart3DTooltipBehavior/>
</telerik:RadCartesianChart3D.Behaviors>
<telerik:RadCartesianChart3D.XAxis>
<telerik:LinearAxis3D>
<telerik:LinearAxis3D.LabelStyle>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="#0000cc" />
<Setter Property="FontWeight" Value="Bold" />
</Style>
</telerik:LinearAxis3D.LabelStyle>
</telerik:LinearAxis3D>
</telerik:RadCartesianChart3D.XAxis>
<telerik:RadCartesianChart3D.YAxis>
<telerik:LinearAxis3D>
<telerik:LinearAxis3D.LabelStyle>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="#000066" />
<Setter Property="FontWeight" Value="Bold" />
</Style>
</telerik:LinearAxis3D.LabelStyle>
</telerik:LinearAxis3D>
</telerik:RadCartesianChart3D.YAxis>
<telerik:RadCartesianChart3D.ZAxis>
<telerik:LinearAxis3D>
<telerik:LinearAxis3D.LabelStyle>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="#CA5100" />
<Setter Property="FontWeight" Value="Bold" />
</Style>
</telerik:LinearAxis3D.LabelStyle>
</telerik:LinearAxis3D>
</telerik:RadCartesianChart3D.ZAxis>
<telerik:RadCartesianChart3D.Series>
<telerik:PointSeries3D x:Name="fenceSeries"
PointSize="20 20 20"
XValueBinding="X"
YValueBinding="Y"
ZValueBinding="Z"
ItemsSource="{Binding Path=Fence}">
<telerik:PointSeries3D.DefaultVisualMaterial>
<MaterialGroup>
<DiffuseMaterial Brush ="#BF444444"/>
<SpecularMaterial Brush="#BF444444" SpecularPower="30" />
</MaterialGroup>
</telerik:PointSeries3D.DefaultVisualMaterial>
<telerik:PointSeries3D.TooltipTemplate>
<DataTemplate>
<Border Background="#5A000000"
Padding="5" TextElement.Foreground="White">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Track Fence"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="X - " FontWeight="Bold" />
<TextBlock Text="{Binding XValue}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Y - " FontWeight="Bold" />
<TextBlock Text="{Binding YValue}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Z - " FontWeight="Bold" />
<TextBlock Text="{Binding ZValue}" />
</StackPanel>
</StackPanel>
</Border>
</DataTemplate>
</telerik:PointSeries3D.TooltipTemplate>
</telerik:PointSeries3D>
<telerik:SurfaceSeries3D x:Name="searchSeries"
XValueBinding="X"
YValueBinding="Y"
ZValueBinding="Z"
ItemsSource="{Binding Path=SearchFence}">
<telerik:SurfaceSeries3D.DefaultVisualMaterial>
<MaterialGroup>
<DiffuseMaterial Brush ="#B7EDFF"/>
<SpecularMaterial Brush="#B7EDFF" SpecularPower="30" />
</MaterialGroup>
</telerik:SurfaceSeries3D.DefaultVisualMaterial>
<telerik:SurfaceSeries3D.TooltipTemplate>
<DataTemplate>
<Border Background="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=DataContext.ToolTipColor}"
Padding="5" TextElement.Foreground="White">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Search Fence"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="X - " FontWeight="Bold" />
<TextBlock Text="{Binding XValue}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Y - " FontWeight="Bold" />
<TextBlock Text="{Binding YValue}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Z - " FontWeight="Bold" />
<TextBlock Text="{Binding ZValue}" />
</StackPanel>
</StackPanel>
</Border>
</DataTemplate>
</telerik:SurfaceSeries3D.TooltipTemplate>
</telerik:SurfaceSeries3D>
<telerik:PointSeries3D x:Name="series"
PointSize="20 20 20"
XValueBinding="X"
YValueBinding="Y"
ZValueBinding="Z"
ItemsSource="{Binding Path=Traj}">
<telerik:PointSeries3D.TooltipTemplate>
<DataTemplate>
<Border Background="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=DataContext.ToolTipColor}"
Padding="5" TextElement.Foreground="White">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Trajectory"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="X - " FontWeight="Bold" />
<TextBlock Text="{Binding XValue}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Y - " FontWeight="Bold" />
<TextBlock Text="{Binding YValue}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Z - " FontWeight="Bold" />
<TextBlock Text="{Binding ZValue}" />
</StackPanel>
</StackPanel>
</Border>
</DataTemplate>
</telerik:PointSeries3D.TooltipTemplate>
</telerik:PointSeries3D>
</telerik:RadCartesianChart3D.Series>
<telerik:RadCartesianChart3D.Grid>
<telerik:CartesianChart3DGrid />
</telerik:RadCartesianChart3D.Grid>
</telerik:RadCartesianChart3D>
</Grid>
</Window>
Thanks!
I have a combobox like below and i need to have a required field validation on it.
<
telerik:RadComboBox
x:Name
=
"combobox"
SelectionChanged
=
"combobox_SelectionChanged"
IsTextSearchEnabled
=
"True"
Width
=
"120"
telerik:TextSearch.TextPath
=
"Kode"
Margin
=
"2,0,0,0"
IsEditable
=
"True"
IsReadOnly
=
"True"
SelectedItem
=
"{Binding Path=SelectedItem, Mode=TwoWay, UpdateSourceTrigger=Explicit, NotifyOnValidationError=true, ValidatesOnExceptions=true}"
TextSearchMode
=
"Contains"
CanAutocompleteSelectItems
=
"True"
>
<
ItemsControl.ItemTemplate
>
<
DataTemplate
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"50"
/>
<
ColumnDefinition
Width
=
"300"
/>
<
ColumnDefinition
Width
=
"300"
/>
</
Grid.ColumnDefinitions
>
<
TextBlock
Text
=
"{Binding Kode}"
Grid.Column
=
"0"
/>
<
TextBlock
Text
=
"{Binding Nederlandse_omschrijving}"
Grid.Column
=
"1"
/>
<
TextBlock
Text
=
"{Binding Franse_omschrijving}"
Grid.Column
=
"2"
/>
</
Grid
>
</
DataTemplate
>
</
ItemsControl.ItemTemplate
>
DummyComboBox.ItemsSource = DummyCodeList.Load()
The load event returns a list of Objects (List<DummyObject>)
I can't quite get the validation working.
Any suggestions ?
When I add the code
private void radGridView1_RowFormatting(object sender, RowFormattingEventArgs e)
{
if ((bool)e.RowElement.RowInfo.Cells["BMP"].Value == true)
{
e.RowElement.DrawFill = true;
e.RowElement.GradientStyle = GradientStyles.Solid;
e.RowElement.BackColor = Color.Aqua;
}
else
{
e.RowElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
e.RowElement.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local);
e.RowElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local);
}
}
It will change the background color in the grid as expected. But now when I select a row it only highlights the cell I selected and then outlines the rest of the row. How can I get it to highlight the entire cell like it does on the rows the are the else row.
I have seen multiple other posts about this (e.g. http://www.telerik.com/forums/backspace-clears-the-combobox-selecteditem) but I don't think any of them are asking the same question...
I have a RadComboBox which contains a collection of objects (i.e. it's not editable). I have set the SelectedValuePath to indicate which property contains the value that SelectedValue should represent. One of the items has a "null" as the value, so when the value that it is bound to is "null", this is the item which appears. I'm using MVVM to bind to a ViewModel, but I don't think that affects the issue.
When the backspace button is pressed, the ViewModel's property which is bound to SelectedValue is set to null (this doesn't happen if the "null" value object was the one that was selected at the time). But the issue is that the box contents are cleared. Since the SelectedValue is now null, I would expect the control to be showing the item whose SelectedValue is "null". Two good reasons why it ought to do that...
1) symmetry: that is what happens when the window first opens if the bound value is "null"
2) when the "null" value object was the one that was selected when backspace was pressed, the control didn't bother mentioning to the change to the bound ViewModel, so *it* believes that nothing has changed; but the UI now does not correspond with the SelectedValue.
Here is a really simplistic example:
Create a new WPF application.
Replace MainWindow.xaml with...
<Window x:Class="WpfApplication4.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApplication4"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Window.DataContext>
<local:MainWindowViewModel/>
</Window.DataContext>
<Grid>
<telerik:RadComboBox SelectedValuePath="Tag" SelectedValue="{Binding MySelectedValue}">
<telerik:RadComboBox.Items>
<telerik:RadComboBoxItem Content="Hello" Tag="Hello"/>
<telerik:RadComboBoxItem Content="This" Tag="{x:Null}"/>
<telerik:RadComboBoxItem Content="Is" Tag="Is"/>
<telerik:RadComboBoxItem Content="A" Tag="A"/>
<telerik:RadComboBoxItem Content="Test" Tag="Test"/>
</telerik:RadComboBox.Items>
</telerik:RadComboBox>
</Grid>
</Window>
--Ends--
Add "MainWindowViewModel.cs", contents follow...
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace WpfApplication4
{
public class MainWindowViewModel : INotifyPropertyChanged
{
private object _mySelectedValue;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public object MySelectedValue
{
get
{
return _mySelectedValue;
}
set
{
_mySelectedValue = value;
OnPropertyChanged();
}
}
}
}
--Ends--
I am trying to evaluate WPF RadDocking control. I am in the process of replacing ActiPro docking window control with Telerik docking control in our WPF application. However, I ran into an issue with Telerik’s docking control. As shown in the picture in the attached file there is a gap between Pane 2 and Pane 5. I would like to be able to pin all the panes. It looks like the gap can be decreased only if one of the panes becomes a tabbed document. Could you please advise on how to get rid of the gap without making it be a document?
Thank you,
Marat Musaev