Telerik Forums
UI for WPF Forum
3 answers
62 views
I have a WPF application which calls a dialog using the ShowDialog method and then sets the e.NewObject of the GridView event to the newly created row. Everything works very well, however I am attempting to change the ShowDialog calls to remove the synchronous actions. This is to get the code working in an XBap environment and to get it closer to Silverlight if a port is needed.

I am however baffled as to how to do this without blocking the UI thread to wait for the dialog information.

This is basically what I am doing now:

RadWindow NewWindow = new RadWindow();
  
NewWindow.ShowDialog();
e.NewObject = NewWindow.NewRow;

This is what I would like to do

RadWindow NewWindow = new RadWindow();
  
NewWindow.Closed += delegate
{
  e.NewObject = NewWindow.NewRow;
};
  
NewWindow.Show();
Yavor Georgiev
Telerik team
 answered on 28 Apr 2011
3 answers
177 views
Hi. I'm using the WPF RadTreeListView with EnableRowVirtualization = false and EnableColumnVirtualization = false. I hook the TreeListViewRow's IsExpandedChanged event and, in the handler, I go through all the RadTreeListView's Items. Ultimately, I want to get the item containers (the TreeListViewRows) for each item.

But when an row is collapsed (as opposed to expanded) all its child items disappear from RadTreeListView's Items collection! When I expand the row, the child items come back.

Even if virtualization were on, that should only affect the existance of TreeListViewRows, not the existence of Items. How do I fix this?

Thanks,
   Bob Alexander
Bob
Top achievements
Rank 1
 answered on 28 Apr 2011
1 answer
56 views
I have implemented a class that inherits from the ScheduleView.Appointment class. The only thing that I added to this class is a constructor and 2 properties (Start & End).

When I drag an appointment within the ScheduleView, the Start and End properties (that overload the base class's Start and End properties) are not modified....the break points are never hit.

Since the class that inherits from ScheduleView.Appointment is also going to be wrapping my Model's "Appointment" class...I would really appreciate someone telling me how to get the GUI to update the Start and End properties when you drag the Appointment's start/end points to a new time value.

This is my very very simple appointment class...the start and end properties are never set when I drag an appointment in the ScheduleView:

Public Class TimeZoneAppointment
    Inherits Telerik.Windows.Controls.ScheduleView.Appointment
 
    Private _myModelAppointment As ModelAppointment
 
    Public Overloads Property Start As Date
        Get
            Return MyBase.Start
        End Get
        Set(ByVal value As Date)
            'this will also modify the model appointment's start property
            MyBase.Start = value
        End Set
    End Property
    Public Overloads Property [End] As Date
        Get
            Return MyBase.End
        End Get
        Set(ByVal value As Date)
            'this will also modify the model appointment's end property
            MyBase.End = value
        End Set
    End Property
 
 
 
    Public Sub New(ByVal ma As ModelAppointment)
        MyBase.New()
        _myModelAppointment = ma
         
        MyBase.Start = _myModelAppointment.startDate
        MyBase.End = _myModelAppointment.endDate
 
        Dim recurrencePattern As New RecurrencePattern()
        recurrencePattern.Frequency = RecurrenceFrequency.Weekly
        Dim recurrenceRule As New RecurrenceRule(recurrencePattern)
 
        MyBase.RecurrenceRule = recurrenceRule
 
    End Sub
End Class


Thanks for your time and help!
newbie
Top achievements
Rank 1
 answered on 28 Apr 2011
1 answer
426 views
Let me explain the scenario:

In a WPF-Window i have a grid with one row and three columns. The columns are used as follow:
Column 0 => RadDocking
Column 1 => GridSplitter
Column 2 => A ContentControl

When moving the gridsplitter, the raddocking will be resized well. But:

The RadDocking contains for example two panes. If i minimize the panes, they are shown on the left site - as expected. But the GridSplitter did not "follow to the left".

Okay - the RadDocking is "working" in the area defined by grid column 0 and may be it did not know anything about other controls in the grid that must be resized if all panes in a raddocking are minimzed. Is there a solution?

I have a small example app that shows the problem at runtime - below the xaml of the window.

Regards
Jan Waiz

<Window x:Class="WPFprismMEFRadDockingTest.Views.ShellView"
        xmlns:prism="http://www.codeplex.com/prism"
        xmlns:controls="clr-namespace:WPFprismMEFRadDockingTest.Controls"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        Title="Prism Shell" WindowStartupLocation="CenterScreen" Height="620" Width="850"
        Icon="../Images/PnPIcon.ico"
        mc:Ignorable="d" d:DesignHeight="720" d:DesignWidth="900">
    <Window.Background>
        <ImageBrush ImageSource="/Images/background.jpg"  Stretch="UniformToFill"/>
    </Window.Background>
    <Window.Resources>
    </Window.Resources>
  
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="100"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*" MinWidth="25"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="3*"/>
        </Grid.ColumnDefinitions>
  
        <!-- When minimizing the 2 panes, they will be showed at the left site -->
        <!-- but the area (defined by the grid) is not minimized, too. And the -->
        <!-- control in the right grid-area did not use the full space. Seems, -->
        <!-- that the gridsplitter did not "follow" the minimized panes...     -->
        <telerik:RadDocking x:Name="LeftRadDocking" 
                                telerikControls:StyleManager.Theme="Transparent" 
                                HasDocumentHost="False" 
                                Grid.Row="1" Grid.Column="0"
                                Margin="10,5,5,10" 
                                Padding="0">
            <telerik:RadDocking.Background>
                <SolidColorBrush />
            </telerik:RadDocking.Background>
            <telerik:RadDocking.BorderBrush>
                <SolidColorBrush />
            </telerik:RadDocking.BorderBrush>
              
            <telerik:RadSplitContainer Name="LeftRadSplitContainer" 
                                       Background="#99FFFFFF" Opacity="0.5"
                                       InitialPosition="DockedLeft">
                <telerik:RadPaneGroup Opacity="1">
                      
                    <telerik:RadPaneGroup.Background>
                        <SolidColorBrush />
                    </telerik:RadPaneGroup.Background>
                      
                    <telerik:RadPane Header="Pane Left 1">
                        <telerik:RadPane.Content>
                            <TextBlock TextWrapping="Wrap" 
                                       Text="This is Pane Left 1 to fill the area with some senseless text." />
                        </telerik:RadPane.Content>
                    </telerik:RadPane>
                    <telerik:RadPane Header="Pane Left 2" Content="Pane Left 2" >
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>
  
        <GridSplitter Grid.Row="1" Grid.Column="1"
                      HorizontalAlignment="Center" 
                      VerticalAlignment="Stretch"
                      Width="5" 
                      ShowsPreview="True" 
                      ResizeDirection="Columns" 
                      Background="Transparent"/>
  
        <ContentControl x:Name="DesktopRegion"
                        Grid.Row="1" Grid.Column="2"
                        Margin="5,5,15,10">
            <ContentControl.Template>
                <ControlTemplate TargetType="ContentControl">
                    <Grid>
                        <controls:RoundedBox />
                        <ContentPresenter Margin="10,0,10,0" Content="{TemplateBinding Content}" />
                    </Grid>
                </ControlTemplate>
            </ContentControl.Template>
        </ContentControl>
  
    </Grid>
</Window>
Dani
Telerik team
 answered on 28 Apr 2011
1 answer
131 views
I'm trying to have the Legend lay on top of the chart area. To my understanding the following code should work. I am setting my data in codebehind. If I change the value of UseDefaultLayout to True the chart control displays the correct chart by using the default ChartArea and default ChartLegend etc. However, when I set UseDefaultLayout to False, like in the code below, the ChartArea displays the error No Series Data. The ChartLegend is located at the desired location so I need to know why my data is not being displayed. Please help me understand why this is not working and how to fix it.

<DataTemplate x:Key="ChartDataTemplate"
    <telerik:RadChart x:Name="Chart" UseDefaultLayout="False"
        <Grid
            <Grid.RowDefinitions
                <RowDefinition Height="1*" /> 
                <RowDefinition Height="19*" /> 
            </Grid.RowDefinitions
            <Grid.ColumnDefinitions
                <ColumnDefinition Width="19*" /> 
                <ColumnDefinition Width="1*" /> 
            </Grid.ColumnDefinitions
            <telerik:ChartLegend x:Name="LegendArea"
                                 Grid.Row="1"
                                 Grid.Column="0"
                                 HorizontalAlignment="Right"
                                 VerticalAlignment="Top" /> 
            <telerik:ChartArea LegendName="LegendArea" /> 
        </Grid
    </telerik:RadChart
</DataTemplate>
Thank you,
Danny
Evgenia
Telerik team
 answered on 28 Apr 2011
3 answers
79 views

Hi,

We've had issues with horizontal scrolling in our RadGridViews with the Q1 2011 version of the WPF package for .NET 3.5 (both the first one and SP 1).

In our grids that reside inside RadExpanders (if that matters) we have several columns which in lower resolutions requires scrolling horizontally. We bind them as GridViewDataColumns. In some we have DataTemplates, but in most we just do a normal bind using the DataMemberBinding.

Until you start scrolling everything looks fine like it did in Q3 2010 and earlier versions, but when scrolling horizontally by dragging the scrollbar with the mouse especially the smaller columns tend to grow and be very wide instead of keeping the preferred width according to the content of the columns.

So now for the second time we have to revert to Q3 2010 until this gets fixed.

Has something changed which require us to add something to the XAML to make them keep the preferred width or is this a bug that will be fixed in future versions?

Tsvyatko
Telerik team
 answered on 28 Apr 2011
1 answer
66 views
Hi,
I am using scattered point graph with zooming functionality. I found the following bug, when i zoom in and add new series mapping
 The Binary Operator GreaterOrEqualTo is not defined for the types System.Objects. and System.Double. The Graph starts showing No Data Series in the graph. Any Help?
Nikolay
Telerik team
 answered on 28 Apr 2011
1 answer
82 views
Hello!

On the chart the main series of candles. How to make the mouse cursor on the spot were two crossed lines and these lines move with the mouse pointer.

Library Version 2011.1.419.
Evgenia
Telerik team
 answered on 28 Apr 2011
2 answers
186 views
Hi,

I have set up a rowstyle for my radtreelistview,
however, the rows without any children are still displayed without the expand arrow infront of them

the reason for this is because I have implemented the loadondemand or lazy loading function using MVVM in the control
in order to make all the rows expandable, i have put a dummy child in each row's view model object
however, this throws me object not initialised error when I tried to filter the rows

the code below describe how i set up the rowstyle

<telerik:RadTreeListView.RowStyle>
    <Style TargetType="{x:Type telerik:TreeListViewRow}">
        <Setter Property="IsExpandable" Value="True" />
        <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
        <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Style.Triggers>
            <Trigger Property="IsSelected" Value="True">
                <Setter Property="FontWeight" Value="Bold" />
            </Trigger>
        </Style.Triggers>
    </Style>
</telerik:RadTreeListView.RowStyle>


please can you advise what was wrong? note I don't want to set IsExpandable as shown in the treelistview loadondemand demon as I'm using MVVM and want to keep the code behind clean

btw, I'm using radcontrol q1 2011

Cheers

Tim Ge
Top achievements
Rank 1
 answered on 28 Apr 2011
2 answers
160 views
Trying to install the latest WPF VSExtensions (2011.1.422.0) shows the following error in the log:

4/27/2011 12:07:21 PM - Beginning to install extension to Microsoft Visual Studio 2010 Ultimate...
4/27/2011 12:07:22 PM - Install Error : System.IO.PathTooLongException: C:\Documents and Settings\<USER: 18 characters long>\Local Settings\Application Data\Microsoft\VisualStudio\10.0\Extensions\Telerik\Telerik WPF VSExtensions\2011.1.422.0\ProjectTemplates\Telerik\Windows\TlrkWPFCSBrowserTk.zip: CS/Browser/RadControlsWpfBrApp.csproj
   at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.BeginInstall(IInstallableExtension installableExtension, Boolean perMachine, AsyncOperation asyncOp)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.InstallWorker(IInstallableExtension extension, Boolean perMachine, AsyncOperation asyncOp)
4/27/2011 12:07:22 PM - Reverting uninstall of version 2011.1.419.0 of the extension.


Since we can't change the install directory there is no way to install it, however the 419 and previous versions did work.


Travis
Travis
Top achievements
Rank 1
 answered on 27 Apr 2011
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?