Telerik Forums
UI for WPF Forum
3 answers
197 views
Hello.
I am using the context menu in the GridView and under some circumstances displaying a Popup to the user.  When I do this I see focus being placed on the user control within the Popup but it immediately leaves.  The focus is being placed back onto a cell.  My attempts to intercept this have failed.  Is there some mechanism or pattern available to resolve this?

I am using the same pattern from within the ChildHierarchyTemplate the focus remains on the user control within the Popup.

Thank you

Paul
Rosen Vladimirov
Telerik team
 answered on 01 Apr 2013
1 answer
211 views
Hello,

I am trying to use Telerik's WPF GridView control in a MVVM application.  I have two general questions:

1) It seems that the XAML/WPF approach to MVVM requires the view to both a.) databind to the viewmodel, and b.) sink events from the viewmodel (that is, the view must respond to events from the view model).  Given that the Telerik WPF DataGrid obviously resides in the view, where does Telerik document the complete list of WPF DataGrid properties and methods?  Surely we can't be expected to infer the list of properties and methods from the samples?  Yet I cannot find what I normally think of as documentation.

2) In the stock MVVM definitions and explanations I find on the internet, it seems that the MVVM advocates claim there is a "clear separation" of concerns between the view, the viewmodel, and the model.  But in the stock MVVM implementations, I find that the view's XAML invariably contains column names in the grid declaration.  That seems to violate MVVM, no? In these implementations, the view seems to be overly concerned with the model.  Wouldn't it be best if the view only knew how to query the collection of column names from the viewmodel? Then you wouldn't have to modify the view (that is, the XAML) every time a user requested a new column.

Thanks.  I apologize in advance if these newbie-ish questions have been asked elsewhere; I queried the forums and could not find answers.
Maya
Telerik team
 answered on 01 Apr 2013
1 answer
430 views
Hi telerick
     I use MVVM to Binding the SelectedColor Property,but When I change the color, there don't work,the VM's property don't change,How can I do?
telerik:RadColorPicker SelectedColor="{Binding SuspectColor}" BorderThickness="0" MainPalette="Concourse" HeaderPalette="Solstice" NoColorText="{Resx RadColorPic_NoColorText}"
StandardPaletteHeaderText="{Resx RadColorPic_StandardPaletteHeaderText}" MainPaletteHeaderText="{Resx RadColorPic_MainPaletteHeaderText}" />

the VM code
private string _suspectColor;
       public string SuspectColor
       {
           get
           {
 
               if (_projectConfiguration != null)
               {
                   _suspectColor = _projectConfiguration.SuspectColor;
               }
               return _suspectColor;
           }
           set
           {
               _suspectColor = value;
               _project.SavaImageTabConfig("SuspectColor", value.ToString());
               base.OnPropertyChanged("SuspectColor");
           }
       }

Petar Mladenov
Telerik team
 answered on 01 Apr 2013
7 answers
312 views

I have a problem with touch scrolling in RadGridView on production machine (analog resistive touchscreen).
On test environment (W8 Simulator) touch scrolling is ok. After installed this same application on production machine - RadGridView starts lag on scrolling.

Touch scrolling in W8 Simulator: http://www.youtube.com/watch?v=56-xueO9MOU
Touch scrolling on production machine: http://www.youtube.com/watch?v=9grjiZq4kQc

<telerik:RadGridView x:Name="ArchivGridView"
    Grid.Row="1"
    HorizontalAlignment="Stretch"
    VerticalAlignment="Stretch"
    AutoGenerateColumns="False"
    CanUserDeleteRows="False"
    CanUserInsertRows="False"
    IsReadOnly="True"
    ItemsSource="{Binding Path=PagedSource,
    ElementName=Pager}"
    EnableRowVirtualization="True"
    PreviewMouseDoubleClick="ArchivGridView_OnPreviewMouseDoubleClick"
    RowDetailsTemplate="{StaticResource RowDetails}">
</telerik:RadGridView>
<telerik:RadDataPager x:Name="Pager"
    PageSize="50"
    Grid.Row="2"
    AutoEllipsisMode="Both"
    Source="{Binding Path=MeasuresView}" />

Any suggestions?

Everything is ok, when i use mouse for scroll.

Yordanka
Telerik team
 answered on 01 Apr 2013
0 answers
138 views
I want to put an icon on the top left of a radWindow programatically

my code is like this

RadWindow radWindow = new RadWindow();
radWindow.Header = "The header";
radWindow.Icon = new Image()
   {
   Source = new BitmapImage(new Uri("../ressources/enregistrer.png", UriKind.Relative))
   };
radWindow.Show();

but the icon dont show up

Pls help me :)
Iheb
Top achievements
Rank 1
 asked on 29 Mar 2013
3 answers
514 views
Let me start by saying that I am fairly new to WPF development so it's likely the problem is just something I'm doing wrong. In my application I have several elements which can be selected and we would like to have their (custom) properties displayed in a RadPropertyGrid in a docked pane. The way I have set it up is that each element has a PropertyPane user control which contains a RadPropertyGrid, and when the element is clicked the element's PropertyPane should be set as the content of the RadPane in the MainWindow. From what I can tell the PropertyPane seems to have a valid RadPropertyGrid when it is being set as the content, but when the content is displayed the RadPropertyGrid is empty.

The section in the MainWindow where the PropertyPane is inserted:
<!-- Properties Pane -->
<telerik:RadSplitContainer InitialPosition="DockedRight">
     <telerik:RadPaneGroup>
          <telerik:RadPane Name="propertyPane" Header="Properties" CanUserClose="False">
          </telerik:RadPane>
     </telerik:RadPaneGroup>
</telerik:RadSplitContainer>


The user control which contains the RadPropertyGrid:
<UserControl x:Class="App.PropertiesPane"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
  
    <Grid>
        <telerik:RadPropertyGrid AutoGeneratePropertyDefinitions="False" Name="PropertyGrid" />      
    </Grid>
</UserControl>

And the code for the element class which should update the RadPropertyGrid:
public class DiagramControlTextBox : TextBox{
     public PropertiesPane PropPane;
     public Telerik.Windows.Controls.RadPropertyGrid DCProperties;
     public int Size;
     public int Weight;
   
     public void updatePropertiesPane(object sender, RoutedEventArgs e)
     {
          App.Current.MainWindow.propertyPane.Content = this.PropPane;
     }
    
     public void initializePropertiesPane()
     {
          this.PropPane = new PropertiesPane();
          this.DCProperties = new Telerik.Windows.Controls.RadPropertyGrid();
   
          Telerik.Windows.Controls.Data.PropertyGrid.PropertyDefinition sizeProperty = new Telerik.Windows.Controls.Data.PropertyGrid.PropertyDefinition()
          {
               DisplayName = "Size",
               Binding = new Binding { Source = this.Size }
          };
   
          Telerik.Windows.Controls.Data.PropertyGrid.PropertyDefinition weightProperty = new Telerik.Windows.Controls.Data.PropertyGrid.PropertyDefinition()
          {
               DisplayName = "Weight",
               Binding = new Binding { Source = this.Weight }
          };
   
          this.DCProperties.AutoGeneratePropertyDefinitions = false;
   
          this.DCProperties.SearchBoxVisibility = System.Windows.Visibility.Hidden;
          this.DCProperties.DescriptionPanelVisibility = System.Windows.Visibility.Hidden;
   
          this.DCProperties.PropertyDefinitions.Add(sizeProperty);
          this.DCProperties.PropertyDefinitions.Add(weightProperty);
   
          this.DCProperties.Item = this;
          this.PropPane.PropertyGrid = this.DCProperties;
     }     
}
Ivan Ivanov
Telerik team
 answered on 29 Mar 2013
2 answers
220 views

I would like to display a hyperlink in a GridViewHeaderCell. I have found this thread. I would like to do this in XAML. I have extracted the markup for a GridViewHeaderCell and modified a derived style with no luck (below). I have two questions:

  1. How can modify the derived style to display a hyperlink as well as the filter control (ie. only override the TextBlock displaying the column name)?
  2. How can I bind both the display text and navigation URI to this hyperlink control?

<Style x:Key="GridViewHeaderCellStyle" TargetType="{x:Type telerik:GridViewHeaderCell}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:GridViewHeaderCell}">
                    <Grid x:Name="PART_OuterGrid">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="{x:Null}" GeneratedDuration="0:0:0.2" GeneratedEasingFunction="{x:Null}" Storyboard="{x:Null}" To="Normal"/>
                                    <VisualTransition From="{x:Null}" GeneratedDuration="0:0:0.2" GeneratedEasingFunction="{x:Null}" Storyboard="{x:Null}" To="MouseOver"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Duration="0:0:0.001" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="GridViewHeaderCell_Over">
                                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0" Duration="0:0:0.001" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Black"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Ascending">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0" Duration="0:0:0.001" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Black"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_SortIndicator">
                                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="GridViewHeaderCell_Selected">
                                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Descending">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0" Duration="0:0:0.001" Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Black"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_SortIndicator">
                                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="RenderTransform" Storyboard.TargetName="PART_SortIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <ScaleTransform ScaleY="-1" ScaleX="1"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="GridViewHeaderCell_Selected">
                                            <DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="PART_HeaderCellGrid" MinHeight="26">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Border x:Name="GridViewHeaderCell" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2">
                                <Border BorderBrush="#FF4B4B4B" BorderThickness="1" Background="{TemplateBinding Background}"/>
                            </Border>
                            <Border x:Name="GridViewHeaderCell_Over" BorderBrush="#FFFFC92B" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" Opacity="0">
                                <Border BorderBrush="White" BorderThickness="1">
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFFFFBA3" Offset="1"/>
                                            <GradientStop Color="#FFFFFBDA" Offset="0"/>
                                            <GradientStop Color="#FFFFD25A" Offset="0.43"/>
                                            <GradientStop Color="#FFFEEBAE" Offset="0.42"/>
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                            </Border>
                            <Border x:Name="GridViewHeaderCell_Selected" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" Opacity="0">
                                <Border.BorderBrush>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FF616161" Offset="0"/>
                                        <GradientStop Color="#FF989898" Offset="1"/>
                                    </LinearGradientBrush>
                                </Border.BorderBrush>
                                <Border BorderThickness="1">
                                    <Border.BorderBrush>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFB69A78"/>
                                            <GradientStop Color="#FFFFE17A" Offset="0.126"/>
                                        </LinearGradientBrush>
                                    </Border.BorderBrush>
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFFFD74E" Offset="0.996"/>
                                            <GradientStop Color="#FFFFDCAB" Offset="0.17"/>
                                            <GradientStop Color="#FFFFB062" Offset="0.57"/>
                                            <GradientStop Color="#FFFFD18F" Offset="0.56"/>
                                            <GradientStop Color="#FFFFBA74"/>
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                            </Border>
                            <ContentControl x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="{TemplateBinding IsTabStop}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                <ContentControl.Style>
                                    <Style TargetType="{x:Type ContentControl}">
                                        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                                        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                                    </Style>
                                </ContentControl.Style>
                            </ContentControl>
                            <Path x:Name="PART_SortIndicator" Grid.ColumnSpan="2" Data="M256,328L248,336 264,336" Fill="Black" HorizontalAlignment="Center" Height="3" Margin="0,3,0,0" Opacity="0" RenderTransformOrigin="0.5,0.5" Stretch="Fill" SnapsToDevicePixels="True" VerticalAlignment="Top" Width="5">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleY="1" ScaleX="1"/>
                                        <SkewTransform AngleY="0" AngleX="0"/>
                                        <RotateTransform Angle="0"/>
                                        <TranslateTransform X="0" Y="0"/>
                                    </TransformGroup>
                                </Path.RenderTransform>
                            </Path>
                            <telerik:FilteringDropDown x:Name="PART_DistinctFilterControl" Grid.Column="1" IsTabStop="False" Margin="0,0,4,0" Visibility="{TemplateBinding FilteringUIVisibility}">
                                <telerik:StyleManager.Theme>
                                    <telerik:Office_BlackTheme/>
                                </telerik:StyleManager.Theme>
                            </telerik:FilteringDropDown>
                            <Thumb x:Name="PART_LeftHeaderGripper" Grid.ColumnSpan="2" HorizontalAlignment="Left" IsTabStop="{TemplateBinding IsTabStop}">
                                <Thumb.Style>
                                    <Style TargetType="{x:Type Thumb}">
                                        <Setter Property="Width" Value="8"/>
                                        <Setter Property="Background" Value="Transparent"/>
                                        <Setter Property="BorderBrush" Value="Transparent"/>
                                        <Setter Property="BorderThickness" Value="0"/>
                                        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                                        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                                        <Setter Property="Padding" Value="0"/>
                                        <Setter Property="Cursor" Value="SizeWE"/>
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="{x:Type Thumb}">
                                                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </Thumb.Style>
                            </Thumb>
                            <Thumb x:Name="PART_RightHeaderGripper" Grid.ColumnSpan="2" HorizontalAlignment="Right" IsTabStop="{TemplateBinding IsTabStop}">
                                <Thumb.Style>
                                    <Style TargetType="{x:Type Thumb}">
                                        <Setter Property="Width" Value="8"/>
                                        <Setter Property="Background" Value="Transparent"/>
                                        <Setter Property="BorderBrush" Value="Transparent"/>
                                        <Setter Property="BorderThickness" Value="0"/>
                                        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                                        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                                        <Setter Property="Padding" Value="0"/>
                                        <Setter Property="Cursor" Value="SizeWE"/>
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="{x:Type Thumb}">
                                                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </Thumb.Style>
                            </Thumb>
                        </Grid>
                        <telerik:FieldFilterControl x:Name="PART_FieldFilterControl" Column="{x:Null}" IsTabStop="False" Grid.Row="1" Visibility="{TemplateBinding FieldFilterControlVisibility}">
                            <telerik:StyleManager.Theme>
                                <telerik:Office_BlackTheme/>
                            </telerik:StyleManager.Theme>
                        </telerik:FieldFilterControl>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF5B5B5B" Offset="1"/>
                    <GradientStop Color="#FF868686"/>
                    <GradientStop Color="#FF4F4F4F" Offset="0.42"/>
                    <GradientStop Color="#FF0E0E0E" Offset="0.43"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="#FF848484"/>
        <Setter Property="BorderThickness" Value="0,0,1,1"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="5,0,3,0"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="DropMarkPen">
            <Setter.Value>
                <Pen Brush="White" Thickness="2"/>
            </Setter.Value>
        </Setter>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
     
    <!-- Hyperlink GridViewHeaderCell -->
    <Style x:Key="HyperlinkHeaderCellStyle" TargetType="{x:Type telerik:GridViewHeaderCell}"
           BasedOn="{StaticResource GridViewHeaderCellStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:GridViewHeaderCell}">
                    <Grid x:Name="PART_OuterGrid">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Grid x:Name="PART_HeaderCellGrid" MinHeight="26">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <ContentControl x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="{TemplateBinding IsTabStop}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                <ContentControl.Style>
                                    <Style TargetType="{x:Type ContentControl}">
                                        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                                        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                                    </Style>
                                </ContentControl.Style>
                            </ContentControl>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
Jack
Top achievements
Rank 1
 answered on 29 Mar 2013
3 answers
637 views
System.Reflection.TargetParameterCountException was caught
  HResult=-2147352562
  Message=Parameter count mismatch.
  Source=mscorlib
  StackTrace:
       at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
       at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
       at Telerik.Windows.Controls.Data.PropertyGrid.PropertySetViewModel.CollectPropertyValues(IEnumerable`1 items, List`1 propertyInfoValues, PropertySetPropertyInfo propertyInfo) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\PropertyGrid\PropertySetViewModel.cs:line 114
       at Telerik.Windows.Controls.Data.PropertyGrid.PropertySetViewModel.DeterminePropertyValuesBase(IEnumerable`1 items) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\PropertyGrid\PropertySetViewModel.cs:line 102
       at Telerik.Windows.Controls.Data.PropertyGrid.PropertySetViewModel.DeterminePropertyValues(IEnumerable`1 items) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\PropertyGrid\PropertySetViewModel.cs:line 91
       at Telerik.Windows.Controls.Data.PropertyGrid.PropertySetViewModel..ctor(IEnumerable`1 items, PropertySetOperation operation) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\PropertyGrid\PropertySetViewModel.cs:line 56
       at Telerik.Windows.Controls.RadPropertyGrid.RebindPropertyDefinitions(RadPropertyGrid propertyGrid) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\PropertyGrid\RadPropertyGrid.cs:line 770
       at Telerik.Windows.Controls.RadPropertyGrid.<>c__DisplayClass7.<OnItemPropertyChanged>b__5(Object s, NotifyCollectionChangedEventArgs e) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\PropertyGrid\RadPropertyGrid.cs:line 658
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
       at System.Collections.ObjectModel.Collection`1.Add(T item)
       at Propertydesigner.ViewModels.PropertyEditorViewModel.<.ctor>b__1(ObservableCollection`1 p) in d:\Projects\Source\eTray\Propertydesigner\Propertydesigner\ViewModels\PropertyEditorViewModel.cs:line 53
  InnerException:

I have only selected one object and it's the only one that PG chokes on until now everything works fine. 
Any debug tips?
Ivan Ivanov
Telerik team
 answered on 29 Mar 2013
1 answer
233 views
Hi I am trying to use a custom style for deleting appointments. I am using the following for my template
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView,Version=2012.3.1129.40,Culture=neutral,PublicKeyToken=5803cfa389c90ce7"
                    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    >
    <SolidColorBrush x:Key="RadScheduleForeground" Color="#FF000000" />
     
    <!-- DeleteAppointmentConfirmStyle-->
    <ControlTemplate x:Key="DeleteAppointmentConfirmTemplate" TargetType="local:SchedulerDialog">
        <StackPanel>
            <Grid>
                <Image Margin="15" HorizontalAlignment="Left" VerticalAlignment="Center" Stretch="None" Source="/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/del_big.png" />
                <TextBlock Margin="85 15 15 15" TextWrapping="Wrap" VerticalAlignment="Center" Text="Are you sure you want to delete the selected cue?" />
            </Grid>
            <StackPanel x:Name="FooterControls" Grid.Row="2" Margin="13 6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Ok"
                    Command="{x:Static telerik:WindowCommands.Confirm}"
                    telerik:RadWindow.ResponseButton="Accept" />
                <telerik:RadButton Margin="2" MinWidth="84" telerik:LocalizationManager.ResourceKey="Cancel"
                                    
                        telerik:RadWindow.ResponseButton="Cancel"
                         IsCancel="true" Command="{x:Static telerik:WindowCommands.Cancel}"
                         />
            </StackPanel>
        </StackPanel>
    </ControlTemplate>
    <Style x:Key="DeleteEventConfirmDialogStyle" TargetType="local:SchedulerDialog">
        <Setter Property="Foreground" Value="{StaticResource RadScheduleForeground}" />
        <Setter Property="Width" Value="300" />
        <Setter Property="HeaderTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock MaxWidth="200" HorizontalAlignment="Left" telerik:LocalizationManager.ResourceKey="DeleteItem" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template" Value="{StaticResource DeleteAppointmentConfirmTemplate}" />
    </Style>
</ResourceDictionary>

 If I comment out the delete icon image the code works fine. What is the proper reference for accessing that image?
Vladi
Telerik team
 answered on 29 Mar 2013
3 answers
254 views
Hi!
I'm using a RichTextBox with an HtmlDataProvider. When the end user writes this "aaaaaaaa" in the editor the return value of the HtmlDataProvider returns the following huge text when I would expect to get this:
aaaaaaaa 
or perhaps this
<p>aaaaaaaa</p>

How can I change this?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled</title><style type="text/css">
p { margin-top: 0px;margin-bottom: 12px;line-height: 1.15;text-align: left; }
body { font-family: 'Segoe UI';font-style: Normal;font-weight: normal;font-size: 12px; }
.TableNormal { telerik-style-type: table;telerik-style-name: TableNormal; }
.TableGrid { telerik-style-type: table;telerik-style-name: TableGrid;telerik-based-style-name: TableNormal;margin-bottom: 0px;line-height: 1; }
.Normal { telerik-style-type: paragraph;telerik-style-name: Normal; }
.Heading1 { telerik-style-type: paragraph;telerik-style-name: Heading1;telerik-based-style-name: Normal;telerik-linked-style-name: Heading1Char;font-weight: bold;font-size: 18.6666660308838px;color: #4F81BD;margin-top: 32px;margin-bottom: 0px; }
.Heading1Char { telerik-style-type: character;telerik-style-name: Heading1Char;telerik-linked-style-name: Heading1;font-weight: bold;font-size: 18.6666660308838px;color: #4F81BD;margin-top: 32px;margin-bottom: 0px; }
.Heading2 { telerik-style-type: paragraph;telerik-style-name: Heading2;telerik-based-style-name: Normal;telerik-linked-style-name: Heading2Char;font-weight: bold;font-size: 17.3333339691162px;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading2Char { telerik-style-type: character;telerik-style-name: Heading2Char;telerik-linked-style-name: Heading2;font-weight: bold;font-size: 17.3333339691162px;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading3 { telerik-style-type: paragraph;telerik-style-name: Heading3;telerik-based-style-name: Normal;telerik-linked-style-name: Heading3Char;font-weight: bold;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading3Char { telerik-style-type: character;telerik-style-name: Heading3Char;telerik-linked-style-name: Heading3;font-weight: bold;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading4 { telerik-style-type: paragraph;telerik-style-name: Heading4;telerik-based-style-name: Normal;telerik-linked-style-name: Heading4Char;font-style: Italic;font-weight: bold;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading4Char { telerik-style-type: character;telerik-style-name: Heading4Char;telerik-linked-style-name: Heading4;font-style: Italic;font-weight: bold;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading5 { telerik-style-type: paragraph;telerik-style-name: Heading5;telerik-based-style-name: Normal;telerik-linked-style-name: Heading5Char;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading5Char { telerik-style-type: character;telerik-style-name: Heading5Char;telerik-linked-style-name: Heading5;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading6 { telerik-style-type: paragraph;telerik-style-name: Heading6;telerik-based-style-name: Normal;telerik-linked-style-name: Heading6Char;font-style: Italic;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading6Char { telerik-style-type: character;telerik-style-name: Heading6Char;telerik-linked-style-name: Heading6;font-style: Italic;color: #4F81BD;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading7 { telerik-style-type: paragraph;telerik-style-name: Heading7;telerik-based-style-name: Normal;telerik-linked-style-name: Heading7Char;font-style: Italic;color: #000000;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading7Char { telerik-style-type: character;telerik-style-name: Heading7Char;telerik-linked-style-name: Heading7;font-style: Italic;color: #000000;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading8 { telerik-style-type: paragraph;telerik-style-name: Heading8;telerik-based-style-name: Normal;telerik-linked-style-name: Heading8Char;font-size: 13.3333330154419px;color: #000000;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading8Char { telerik-style-type: character;telerik-style-name: Heading8Char;telerik-linked-style-name: Heading8;font-size: 13.3333330154419px;color: #000000;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading9 { telerik-style-type: paragraph;telerik-style-name: Heading9;telerik-based-style-name: Normal;telerik-linked-style-name: Heading9Char;font-style: Italic;font-size: 13.3333330154419px;color: #000000;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Heading9Char { telerik-style-type: character;telerik-style-name: Heading9Char;telerik-linked-style-name: Heading9;font-style: Italic;font-size: 13.3333330154419px;color: #000000;margin-top: 13.3333330154419px;margin-bottom: 0px; }
.Caption { telerik-style-type: paragraph;telerik-style-name: Caption;telerik-based-style-name: Normal;font-family: 'Calibri';font-weight: bold;font-size: 12px;color: #4F81BD;line-height: 1; }
.TOC1 { telerik-style-type: paragraph;telerik-style-name: TOC1;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px; }
.TOC2 { telerik-style-type: paragraph;telerik-style-name: TOC2;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px;margin-left: 14.6666669845581px; }
.TOC3 { telerik-style-type: paragraph;telerik-style-name: TOC3;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px;margin-left: 29.3333339691162px; }
.TOC4 { telerik-style-type: paragraph;telerik-style-name: TOC4;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px;margin-left: 44.0000009536743px; }
.TOC5 { telerik-style-type: paragraph;telerik-style-name: TOC5;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px;margin-left: 58.6666679382324px; }
.TOC6 { telerik-style-type: paragraph;telerik-style-name: TOC6;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px;margin-left: 73.3333349227905px; }
.TOC7 { telerik-style-type: paragraph;telerik-style-name: TOC7;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px;margin-left: 88.0000019073486px; }
.TOC8 { telerik-style-type: paragraph;telerik-style-name: TOC8;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px;margin-left: 102.666668891907px; }
.TOC9 { telerik-style-type: paragraph;telerik-style-name: TOC9;telerik-based-style-name: Normal;margin-bottom: 6.66666650772095px;margin-left: 117.333335876465px; }
.TableofFigures { telerik-style-type: paragraph;telerik-style-name: TableofFigures;telerik-based-style-name: Normal;margin-bottom: 0px; }
.Hyperlink { telerik-style-type: character;telerik-style-name: Hyperlink;color: #0000FF;text-decoration: underline; }
.p_DEC438A7 { telerik-style-type: local; }
.s_DEC438A7 { telerik-style-type: local; }
</style></head><body><p class="Normal p_DEC438A7"><span class="s_DEC438A7">aaaaaaaa</span></p></body></html>


Mihail
Telerik team
 answered on 29 Mar 2013
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?