Telerik Forums
UI for WPF Forum
2 answers
88 views
We used to have an license for the Telerik controls, but unfortunately it has lapsed.  And due to our budget, we're not likely to renew it.  Recently I made some modifications to one of the WPF apps I wrote, to use the Telerik controls we do have.  The latest version we have was 2011 Q2 or Q3.  In my development I've encountered a problem with the IsTabStop property on the Telerik DateTimePicker control; as in it doesn't work at all, if I set the IsTabStop to False.  And looking into it, it appears to me that it was a known bug back then.

So my question is, has this bug been fixed in the current versions of the Telerik controls, especially for WPF?  We may not be able to renew our licenses, but if this bug has been fixed then that at least gives me more support in my effort to try and get our Telerik licenses renewed.  If on the other hand, it hasn't been fixed, then I'd like to know about that, too.  As it is, right now I'm planning on working with what we've got, and having to rethink our UI design and behavior, based upon this bug's behavior.
Rod
Top achievements
Rank 1
 answered on 15 Aug 2012
2 answers
173 views
I have a RadDataForm on which some DataFormDataField fields seemed to be read-only.

Using Snoop, I discovered that the form's mode is ReadOnly.

Now here's the thing.  I had AutoEdit="True" in the xaml.  I've tried setting AutoEdit and calling BeginEdit() in the constructor, and in DataContextChanged, both, and neither seems to make any difference.  Both in the constructor and in DataContextChanged, CanBeginEdit is false.

What could be going on that would cause CanBeginEdit to be false?

The form is bound to its DataContext, via CurrentItem="{Binding Path=.}"

Ivan Ivanov
Telerik team
 answered on 15 Aug 2012
1 answer
68 views
Hallo,

is it possible to mix autogenerated properties with customized properties in one property grid?


best regards
Ivan Ivanov
Telerik team
 answered on 15 Aug 2012
1 answer
178 views
Hi,

I have a RadDocumentPane (same for RadPane) with the HeaderTemplate that has a DataTemplate as a static resource. Binding works fine with dock/undock. The issue comes in when RadDocking.LoadLayout is called. The binding is lost on the DocumentHeader (text for header).  There is no problem with the Tooltip binding on the RadDocking.LoadLayout. Can someone assist?

Thanks

<DataTemplate x:Key="RadPaneHeaderTemplate" DataType="{x:Type telerikDocking:RadPane}">
    <StackPanel Orientation="Horizontal">
        <TextBlock Text="{Binding}" ToolTip="{Binding ElementName=DocumentPane, Path=Tag, Mode=OneWay}"/>
    </StackPanel>
</DataTemplate>

 

<telerikDocking:RadDocumentPane x:Name="DocumentPane"
                                                     HeaderTemplate="{StaticResource RadPaneHeaderTemplate}" Header="{Binding Path=DocumentHeader}"
                                                     Tag="{Binding Path=DocumentToolTip}"
                                                     telerikDocking:RadDocking.SerializationTag="DocumentPane"                                                       
                                                     HorizontalContentAlignment="Left" CanUserClose="False"
                                                     DataContext="{Binding}" >

Georgi
Telerik team
 answered on 15 Aug 2012
1 answer
84 views
Hello,

I have a Gridview with many columns and 4 Groups
i have troubles with the group funktion.
After loading empty Gridview, groups are ok, but after adding rows to the grid 3rd groups has only 2 Entries(schould be 13)
See attached screenshots
The user can reorder the columns, then the groups are ok again.
Yoan
Telerik team
 answered on 15 Aug 2012
1 answer
491 views
We are implementing the RadDocking with just one Toolbar (splitcontainer with radpanegroup with one radpane...see XAML later in post). It is Docked Left and starts out Unpinned.

When you click on the AutoHideArea tab for the Toolbar it opens just fine but never AutoHides even when I move the mouse over and click on the main document area.

The documentation on http://www.telerik.com/help/wpf/raddocking-panes-pinned-unpinned-panes.html says:

"The unpinned RadPane is shown only when the mouse cursor is over it and is hidden when the cursor leaves its area."

This is clearly not happening.  In fact, I loaded the "Getting Started" example in this same documentation section and it does not occur there either.  Either I am missing something or something is broken (or the documentation is wrong)

That is Question 1: Why does the unpinned RadPane not hide when the cursor leaves its area?

Question 2:

XAML is below.  In the code, the c:TabControl shown is just a wrapper for a RadTabControl.  After some work I figured out that it is probably because my control is directly in the DocumentHost.  I did this because I do not want a splitcontainer or pane header.  I just want my own control in the main area.  In addition, our tabcontrol relies on an override of RadTabControl.OnApplyTemplate() getting fired when RadDocking performs its MeasureOverride(), which does not happen when I put our control inside these new panes.

Maybe I just need to know how to ensure my OnApplyTemplate() override gets fired when RadDocking performs its MeasureOverride() but then I would also need to know how to hide the Pane header I suppose.

Thanks for any help.

<telerik:RadDocking  telerikQuickStart:ThemeAwareBackgroundBehavior.IsEnabled="True">
            <telerik:RadDocking.RootCompassStyle>
                <Style TargetType="telerik:RootCompass">
                    <Setter Property="IsCenterIndicatorVisible" Value="False" />
                    <Setter Property="IsTopIndicatorVisible" Value="False" />
                    <Setter Property="IsBottomIndicatorVisible" Value="False" />
                </Style>
                </telerik:RadDocking.RootCompassStyle>
            <telerik:RadDocking.CompassStyle>
                <Style TargetType="telerik:Compass">
                    <Setter Property="IsCenterIndicatorVisible" Value="False" />
                    <Setter Property="IsTopIndicatorVisible" Value="False" />
                    <Setter Property="IsBottomIndicatorVisible" Value="False" />
                </Style>
            </telerik:RadDocking.CompassStyle>
            <telerik:RadDocking.DocumentHost>
                <telerik:RadBusyIndicator IsBusy="{Binding LayoutLoaded,Converter={StaticResource BooleanInverter}}"
                                  DockPanel.Dock="Left"
                                  BusyContent="Loading Layout..."
                                  IsIndeterminate="True">
                <c:TabControlEx x:Name="ItemTabControl"
                            ItemsSource="{Binding Tabs}"
                            SelectedItem="{Binding ActiveTab}"
                            Loaded="ItemTabControl_Loaded"
                            Padding="0"
                            Style="{StaticResource BlueTabControlEx}"/>
                </telerik:RadBusyIndicator>
            </telerik:RadDocking.DocumentHost>
 
            <telerik:RadSplitContainer InitialPosition="DockedLeft" Width="285">
                <telerik:RadPaneGroup>
                    <telerik:RadPane Header="Toolbox" IsPinned="False">
                        <v:NewToolboxView BorderBrush="#385d8a" BorderThickness="2" DataContext="{Binding Toolbox}"/>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>
Konstantina
Telerik team
 answered on 15 Aug 2012
1 answer
93 views
Hey,

I found a simple to reproduce bug.  When I have task A with children B and C, C with children D and E and E with children F.  I want to move D and E so their parents are A instead of C.  D works fine but E does not because it has children. This seems like this control was designed so tasks should never be moved, with the amount of problems that it causes.... Below is the full code, I am using 2012 Q2 on wpf.
Thanks,
Eric

using System;
using System.Windows;
 
namespace Scratch
{
    using System.Collections.ObjectModel;
 
    using Telerik.Windows.Controls.GanttView;
    using Telerik.Windows.Controls.Scheduling;
 
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            var ts = new ObservableCollection<IGanttTask>();
            gantt.VisibleRange = new DateRange(DateTime.Now.AddMinutes(0), DateTime.Now.AddMinutes(6));
            gantt.PixelLength = new TimeSpan(0,0,0,1);
            gantt.TasksSource = ts;
            var a = new GanttTask { Start = DateTime.Now.AddMinutes(0), End = DateTime.Now.AddMinutes(6), Title = "A" };
            var b = new GanttTask { Start = DateTime.Now.AddMinutes(0), End = DateTime.Now.AddMinutes(1), Title = "B" };
            var c = new GanttTask { Start = DateTime.Now.AddMinutes(2), End = DateTime.Now.AddMinutes(6), Title = "C" };
            var d = new GanttTask { Start = DateTime.Now.AddMinutes(2), End = DateTime.Now.AddMinutes(3), Title = "D" };
            var e = new GanttTask { Start = DateTime.Now.AddMinutes(4), End = DateTime.Now.AddMinutes(6), Title = "E" };
            var f = new GanttTask { Start = DateTime.Now.AddMinutes(5), End = DateTime.Now.AddMinutes(6), Title = "F" };
            ts.Add(a);
            a.Children.Add(b);
            a.Children.Add(c);
            c.Children.Add(d);
            c.Children.Add(e);
            e.Children.Add(f);
 
            // The error occours In the below lines (when E is moved)
            c.Children.Remove(d);
            a.Children.Add(d);
            c.Children.Remove(e);
            a.Children.Add(e);
        }
    }
}
<Window x:Class="Scratch.MainWindow"
        xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GanttView"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Controls:RadGanttView x:Name="gantt"/>
    </Grid>
</Window>

Ventzi
Telerik team
 answered on 15 Aug 2012
2 answers
99 views
Hey,

I'm on a roll tonight! (This may be related to the other one)  Let's say I have directory A, which has children B,C,D,E,F,G.  B has children H,I,J. C  has a child K.  First I delete B by doing A.Children.Remove(B).  Then I move K to have A as a parent: C.Children.Remove(K). A.Children.Add(K).  Now it thinks you've added K twice, and it barfs at you.  After a few hours of poking through your code, I found this is because the internal Index of C was messed up after I removed B.  So when I tried to remove C, it remved the wrong item! I think this is because the code is forgetting that it is also removing children when it removes tasks with children...  Specificly, I think (might be wrong here) that the code in HierarchicalCollectionAdapterBase is not taking this into account (see below).  I should be able to make a simple program to show this bug if nessesary.  Probably what I will end up doing is the DFS myself to hierarchicly remove each item I need to....

Eric
As always, using 2012 Q2 wpf
var startIndex = collectionChangedAction == NotifyCollectionChangedAction.Remove ? oldStartingIndex : newStartingIndex;
 
                var newWrappers = newItemsCollection != null ? newItemsCollection.OfType<HierarchicalItem>() : Enumerable.Empty<HierarchicalItem>();               
                var newItemsCount = newItemsCollection != null ? newItemsCollection.Count : 0;
 
                var oldWrappers = oldItemsCollection != null ? oldItemsCollection.OfType<HierarchicalItem>() : Enumerable.Empty<HierarchicalItem>();
                var oldItemsCount = oldItemsCollection != null ? oldItemsCollection.Count : 0;
 
                var removedWrappers = oldWrappers.SelectMany(Flatten).ToArray();
                var addedWrappers = newWrappers.SelectMany(Flatten).ToArray();
                 
                var sourceCollectionItemsCountDifference = newItemsCount - oldItemsCount;
                var childrenCountDifference = addedWrappers.Length - removedWrappers.Length - sourceCollectionItemsCountDifference;
 
                for (int i = startIndex + newItemsCount; i < targetCollection.Count; i++)
                {
                    targetCollection[i].previousChildrenCount += childrenCountDifference;
                    targetCollection[i].SourceItemIndex += sourceCollectionItemsCountDifference;
                }
 
                var previousChildrenCount = startIndex > 0 ? targetCollection[startIndex - 1].previousChildrenCount + targetCollection[startIndex - 1].visibleChildrenCount : 0;
 
                foreach (var newWrapper in newWrappers)
                {
                    newWrapper.previousChildrenCount += previousChildrenCount;
                    previousChildrenCount += newWrapper.visibleChildrenCount;
                }
Ventzi
Telerik team
 answered on 15 Aug 2012
2 answers
193 views
Are there any example showing how to draw a red wavy line under a set of text?

In my project, I use a lot of custom annotations. The annotions have a DateTime property that is used to flag up an expiry time limit.
I would like a red wavy line to appear under the text in the custom annotation when the expirey time period has elapsed.

I've already used custom presentation to draw rectangles around certain annotations:

Rectangle rectangle = new Rectangle();
rectangle.Width = Math.Max(0, (endInline.BoundingRectangle.Location.X - startInline.BoundingRectangle.Location.X));
rectangle.Height = startInline.LineInfo.Height;
 
Canvas.SetTop(rectangle, startInline.ControlBoundingRectangle.Top - (startInline.LineInfo.Height / 1.5));
Canvas.SetLeft(rectangle, startInline.BoundingRectangle.Left);
 
rectangle.Fill = FillBrush;
rectangle.Opacity = MouseOverHighlightLayer.MouseOutOpacity;
rectangle.MouseEnter += (s, e) => { ((Rectangle)s).Opacity = MouseOverHighlightLayer.MouseInOpacity; };
rectangle.MouseLeave += (s, e) => { ((Rectangle)s).Opacity = MouseOverHighlightLayer.MouseOutOpacity; };

I'm mainly looking for the best way to draw a red wavy line.

Thank you very much for your time and help,

Rob
Iva Toteva
Telerik team
 answered on 15 Aug 2012
2 answers
341 views
Hi,

Is there a way to only allow one expander to be expanded? I have a group of expanders and I want only one expander expanded at a time.

Thanks,
Mark
Mark
Top achievements
Rank 1
 answered on 15 Aug 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?