Telerik Forums
UI for WPF Forum
4 answers
160 views
Whats wrong with timespan properties? It is not editable in PropertyGrid, only one-way binding works.

I created sample project to demonstrate the bug:
https://skydrive.live.com/redir?resid=51A46BBA4E9EF07E!1225

<telerik:RadPropertyGrid Item="{Binding SelectedItem, ElementName=lbxItems}">

</telerik:RadPropertyGrid>


public class Item
{
  [Description("This property is never set from RadPropertyGrid. Why?")]
  public TimeSpan TimeSpanProperty
  {
    get;
    set;
  }
}
Ivan Ivanov
Telerik team
 answered on 21 Dec 2012
1 answer
59 views
Hi all,
I Downloaded an example of Teleik number 192546 , I changed it a bit to support drag & drop option.
and it works great,
but then I changed the Telerik.Windows.Controls.Navigation.dll  from version 2008.3.1217.35
to version 2009.3.1314.35  and suddenly  I have a problem.
the target Node Item is not expanding when I drag the source node to the target node and stand on it for a second.

could you help me?
thanks.

Kiril Vandov
Telerik team
 answered on 21 Dec 2012
9 answers
1.8K+ views
I am trying to embed a data trigger within a datatemplate attached to the CellTemplate property. The DataTemplate is being applied but the trigger isn't firing (I have a breakpoint set in the isLessThanZero converter and its not being called). I have seen the example of using triggers within a style but I want to have greater control around the items within my data template.

Here's the XAML I am using

                <Controls:GridViewDataColumn Width="100" DataMemberBinding="{Binding Entries[0].Value}" Header="BID" > 
                    <Controls:GridViewDataColumn.CellTemplate> 
                        <DataTemplate> 
                            <Grid> 
                                <Grid.ColumnDefinitions> 
                                    <ColumnDefinition Width="50" /> 
                                    <ColumnDefinition Width="*" /> 
                                </Grid.ColumnDefinitions> 
                                <TextBlock  x:Name="text" Grid.Column="0" Text="{Binding Entries[0].Value}" FontFamily="Tahoma" FontSize="10pt" /> 
                            </Grid> 
 
                            <DataTemplate.Triggers> 
                                <DataTrigger Binding="{Binding Entries[0].Value,Converter={StaticResource isLessThanZero}}" Value="False" > 
                                    <Setter TargetName="text" Property="Background" Value="Red" /> 
                                </DataTrigger> 
                            </DataTemplate.Triggers> 
                              
                        </DataTemplate> 
                    </Controls:GridViewDataColumn.CellTemplate> 
                </Controls:GridViewDataColumn> 

Any suggestions

Ian
Pavel Pavlov
Telerik team
 answered on 21 Dec 2012
2 answers
324 views
Hi
How to Use ColorAnimation to change the background of RadButton when IsMouseOver is True
, this is my code

<Style TargetType="telerik:RadButton">
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Trigger.EnterActions>
                        <BeginStoryboard>
                            <Storyboard >
                                <ColorAnimation From="Green" To="Yellow" Storyboard.TargetProperty="(Button.Background).(SolidColorBrush.Color)"  Duration="00:00:03" RepeatBehavior="Forever"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </Trigger.EnterActions>
                </Trigger>
            </Style.Triggers>
        </Style>


But is not working.

Thanks,
Akram
Akram
Top achievements
Rank 1
 answered on 21 Dec 2012
1 answer
161 views
Hello,

I have a problem with the TimelineViewDefinition. I have my ScheduleView with a timeline view defined. In this view I need to show only one day, and to achieve this goal, I define the attribute VisibleDays and I set it to 1. This shows perfectly fine as expected, I get one day in the timeline view. But when in a button I call the RadScheduleViewCommands.DecreaseVisibleDateLarge or RadScheduleViewCommands.IncreaseVisibleDateLarge, the Schedule advances one week instead of one day as it should. How can I solve this?

Thank you!
Boyan
Telerik team
 answered on 21 Dec 2012
1 answer
165 views

Hi,

<RadDiagram ...>
<primitives:GraphPaper />
</RadDiagram ...>

That tag causes an exception to be thrown:

A first chance exception of type 'System.InvalidOperationException' occurred in Telerik.Windows.Controls.Diagrams.dll

Additional information: Cannot modify the Items collection when the GraphSource is set.

What's up?

Petar Mladenov
Telerik team
 answered on 21 Dec 2012
2 answers
147 views
I know that since Q2 RadPdfViewer has a new property called Mode for choosing between pan and text selection. However the example in http://www.telerik.com/help/wpf/radpdfviewer-wiring-ui.html seems to use an old way. (It also doesn't have the example for text selection or find in the xaml even though the find is in the provided code behind).

It is probably just because I am new to WPF but I can't figure out what to do in the xaml. Could someone give me an updated example? Thanks.
Seth
Top achievements
Rank 1
 answered on 20 Dec 2012
9 answers
336 views

Regardless of how I attempt to set the visibility for it, I cannot get the FilteringDropDown control within the GridViewHeaderCell for a column bound to a custom type to appear in my RadGridView. Sample code below:

 

Public Class MyClass
  Public Property AnInteger As Integer
  Public Property ACustomObject As MyCustomObject
End Class
  
Public Shared myList As New List(Of MyClass)

<telerik:RadGridView ItemsSource="{Binding myList}"
  <telerik:RadGridView.Columns
    <telerik:GridViewComboBoxColumn
      DataMemberBinding="{Binding ACustomObject}"
      ItemsSource="{Binding Source={StaticResource PredfinedListOfMyCustomObject}"
      DisplayMemberPath="Name"
      IsCustomSortingEnabled="True"
      <telerik:GridViewComboBoxColumn.HeaderCellStyle
        <Style TargetType="{x:Type telerik:GridViewHeaderCell}" BasedOn="{StaticResource {x:Type telerik:GridViewHeaderCell}}"
          <Setter Property="FilteringUIVisibility" Value="Visible"/> 
        </Style
      </telerik:GridViewComboBoxColumn.HeaderCellStyle
      <telerik:GridViewComboBoxColumn.FilteringControl
        <local:CustomFilter/> 
      </telerik:GridViewComboBoxColumn.FilteringControl
    </telerik:GridViewComboBoxColumn
  </telerik:RadGridView.Columns
</telerik:RadGridView>

Both with and without the HeaderCellStyle I do not get the FilteringDropDown. If I run the application with WPF Inspector or Snoop and change the FilteringUIVisibility from collapsed (which it always is) to visible (which the default is and what I set it to manually) then the FilteringDropDown appears and I can use my custom filter. I am assuming some code in the control is overriding my styling based on the non-standard object type (which is why I have custom sorting on the column as well) but I cannot figure out how to avoid it or restore the FilteringDropDown.
Jason
Top achievements
Rank 1
 answered on 20 Dec 2012
2 answers
117 views
Hello,

Recently we updated the Telerik assemblies in our product to 2012.3.1017.40 and we've encountered an issue. When the user drags a column header to the group panel they encounter a NullReferenceException. We're hosting the control in a Windows Forms ElementHost control.

Any ideas on a workaround would be very helpful.

Stack Trace:
   at Telerik.Windows.Controls.DraggedElement.HideNoCursor()
   at Telerik.Windows.Controls.GridView.DragDropController.OnGroupPanelDragOver(Object sender, DragEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at Telerik.Windows.DragDrop.DragDropManager.DelegateHelper.OnDragEventHandler(Object sender, DragEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.OleDropTarget.RaiseDragEvent(RoutedEvent dragEvent, Int32 dragDropKeyStates, Int32& effects, DependencyObject target, Point targetPoint)
   at System.Windows.OleDropTarget.MS.Win32.UnsafeNativeMethods.IOleDropTarget.OleDragOver(Int32 dragDropKeyStates, Int64 point, Int32& effects)

Let me know if you need any more information. 

Thanks Much,
~Boots
Boots
Top achievements
Rank 1
 answered on 20 Dec 2012
2 answers
162 views
hi, can u help me to traslate this code into xaml

            DragDropManager.AddDragInitializeHandler(xRibbon, OnDragInitialize);
            DragDropManager.AddDropHandler(this.diagram, OnDiagramDrop);

xRibbon is the microsoft ribbon , diagram is RadDiagram

i tried this ma does not work

<Style TargetType="telerik:RadDiagram">
            <Setter Property="telerik:DragAndDropManager." Value="True" />
            <EventSetter Event="telerik:DragAndDropManager.DropQuery" Handler="OnDiagramDrop" />
        </Style>

thanks.
Fabrizio
Top achievements
Rank 1
 answered on 20 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?