Telerik Forums
UI for WPF Forum
3 answers
130 views
Hi,

I'm having memory issues with TileView control. Basically, I have a dialog with a TileView inside and when this dialog is popped up and closed I expect all the objects to be cleaned up from the memory. I do trigger Garbage Collection and looks like it is guaranteed that there are nothing in my application that holds those objects in the memory.

I used ANTS Memory profiler and it shows there are 3 "things" referencing TileView control:
1) some WeakHashTable.
2) some WeakEventTable.
3) and another Hashtable in ReflectTypeDescriptionProvider class.

Please take a look to the following object retention graph -  http://rubenhak.com/TileViewMemoryLeak.png
Looks like ReflectTypeDescriptionProvider does not let objects to be garbage collected.

What you think?

Thanks,
Ruben
Tina Stancheva
Telerik team
 answered on 25 Aug 2010
1 answer
70 views
I have a GridView with some column footers. I'm finding in some situations (which I have difficulty repeating) that the controls in the column footers do not display. I run Snoop and can see that the controls are in the control tree but they are not visible. If I select the item in the Snoop tree, the item displays. Sounds like a bug to me.
Maya
Telerik team
 answered on 25 Aug 2010
2 answers
226 views
Hello All,

We have a RadMenu which we do not need or want icons on.  I successfully set the IconColumnWidth="0" and this hides the icon column just fine.  However, the <telerik:RadMenuItem IsSeparator="True" /> menu item doesn't seem to respect this.  The separator bar is moved over to the right for the width of the icon column used to be.

Not sure if this is a bug, working as designed, or there is a workaround for this.  Has anyone else run across this behavior?
Dani
Telerik team
 answered on 25 Aug 2010
1 answer
52 views
Hello

We are developing WPF aplication with telerik controls ver.2010.1.603
Now we bought licence for your controls ver 2010.2.0812.
And application stopped to work properly.

Here is code causes problem.

Here is our control, that is binded to two DateTime Objects. With ver. 2010.1.603
it was working fine, but with new one we have null exception, when we want to get
MarketDepthFrom, or MarketDepthTo

 

 

 

<
controls:PeriodControl From="{Binding Path=MarketDepthFrom, Mode=TwoWay}" To="{Binding Path=MarketDepthTo, Mode=TwoWay}" />


Here is XAML of our control:

 

<UserControl x:Class="LT.Desk.Controls.PeriodControl"
    xmlns:trans="clr-namespace:LT.Language;assembly=LT.Language"
    xmlns:telerikRibbonBar="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.RibbonBar"
    xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
    xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input">
  
    <StackPanel Orientation="Horizontal">
        <Grid Name="PeriodGroup">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
  
            <TextBlock Text="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[Period]}" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="2,0,2,0"/>
            <telerik:RadComboBox HorizontalAlignment="Stretch" x:Name="PeriodTypeCombo" Margin="3,0,0,0"
                                  Grid.Row="0" Grid.Column="1" Height="15" Width="100" SelectionChanged="PeriodTypeCombo_SelectionChanged">
                <telerik:RadComboBoxItem Content="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[Day]}" />
                <telerik:RadComboBoxItem Content="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[Week]}" />
                <telerik:RadComboBoxItem Content="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[Month]}" />
                <telerik:RadComboBoxItem Content="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[Quarter]}" />
                <telerik:RadComboBoxItem Content="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[Year]}" />
            </telerik:RadComboBox>
  
            <TextBlock Text="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[From]}" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="2,0,6,0"/>
            <telerik:RadDatePicker Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Width="100" Name="fromDP" SelectionChanged="fromDP_SelectionChanged"/>
  
            <TextBlock Text="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[To]}" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="2,0,6,0" />
            <telerik:RadDatePicker Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" Width="100" Name="toDP" SelectionChanged="toDP_SelectionChanged" IsReadOnly="False" IsEnabled="True" />
        </Grid>
  
        <Grid>
            <StackPanel Orientation="Horizontal">
                <telerikRibbonBar:Separator Width="2"/>
                <telerikRibbonBar:RadRibbonButton Size="Large" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="Previous" Click="Prevoius_Click">
                    <StackPanel Name="PreviousButton" Orientation="Vertical">
                        <Image VerticalAlignment="Top" Height="38"  Source="/LT.Desk;component/Resources/back-icon32.png"/>
                        <TextBlock VerticalAlignment="Top" FontSize="12" HorizontalAlignment="Center" Margin="0,6,0,0" Text="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[Previous]}"/>
                    </StackPanel>
                </telerikRibbonBar:RadRibbonButton>
                <telerikRibbonBar:Separator Width="1"/>
                <telerikRibbonBar:RadRibbonButton Size="Large" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="Next" Click="Next_Click">
                    <StackPanel Name="NextButton" Orientation="Vertical">
                        <Image VerticalAlignment="Top" Height="38" HorizontalAlignment="Right" Source="/LT.Desk;component/Resources/next-icon32.png"/>
                        <TextBlock VerticalAlignment="Top" FontSize="12" HorizontalAlignment="Center" Margin="0,6,0,0" Text="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[Next]}"/>
                    </StackPanel>
                </telerikRibbonBar:RadRibbonButton>
                <telerikRibbonBar:Separator Width="2"/>
            </StackPanel>
        </Grid>
    </StackPanel>
  
</UserControl>

 

 

 

 

####################################################

And here is code behind for it:

 

 

 

 

public partial class PeriodControl 
  
   
  
  
{
  
 public DateTime? From 
  
{
  
  
get { return (DateTime)GetValue(FromProperty); } 
  
  
set { SetValue(FromProperty,value); } 
  
}
  
   
  
  
public DateTime? To 
  
{
  
  
get { return (DateTime)GetValue(ToProperty); } 
  
  
set { SetValue(ToProperty, value); } 
  
}
  
   
  
  
public PeriodTypeEnum PeriodType 
  
   
  
{
  
  
get { return (PeriodTypeEnum)GetValue(PeriodTypeProperty); } 
  
  
set { SetValue(PeriodTypeProperty, value); } 
  
}
  
  
public static DependencyProperty FromProperty = DependencyProperty.Register("From", typeof(DateTime?), typeof(PeriodControl)); 
  
  
public static DependencyProperty ToProperty = DependencyProperty.Register("To", typeof(DateTime?), typeof(PeriodControl)); 
  
  
public static DependencyProperty PeriodTypeProperty = DependencyProperty.Register("PeriodType", typeof(PeriodTypeEnum), typeof(PeriodControl)); 
  
   
  
   
  
  
public PeriodControl() 
  
   
  
{
  
InitializeComponent();
  
fromDP.SelectedDate = 
  
  
DateTime.Today; 
  
   
  
toDP.SelectedDate = DateTime.Today; 
  
From = DateTime.Today; 
  
To = DateTime.Today; 
  
PeriodTypeCombo.SelectedIndex = 0;
  
}
  
  
private void fromDP_SelectionChanged(object sender, SelectionChangedEventArgs e)............ 
  
private void toDP_SelectionChanged(object sender, SelectionChangedEventArgs e)............. 
  
  
private void Next_Click(object sender, RoutedEventArgs e)................. 
  
  
private void PeriodTypeCombo_SelectionChanged(object sender, SelectionChangedEventArgs e)............. 
  
}



Please help me if you know the answer
we have 2 days left to deadline so it is
quite urgent

Regards
Michal

Kaloyan
Telerik team
 answered on 25 Aug 2010
2 answers
205 views
Hi There

We basically require that the user can select a value in the combo that sets the bound value to null, ie "Nothing Set"

From some reading I have found that the ClearSelectionButtonVisibility property should be able to do this yet with the code below, there is no difference to the drop down items.

<telerikInput:RadComboBox Width="200" HorizontalAlignment="Left" VerticalAlignment="Center"
                ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="Nothing Set"
                Margin="3" SelectedValuePath="contact_id" DisplayMemberPath="FullName" ItemsSource="{Binding AllCustomerContacts}"
                SelectedValue="{Binding contact_id, Mode=TwoWay, ValidatesOnExceptions=True,
                ValidatesOnDataErrors=True, NotifyOnValidationError=True}" />


Please Help.

Nick
Nick Wood
Top achievements
Rank 1
 answered on 25 Aug 2010
5 answers
164 views
I am looking for a drag and drop sample for that allows me to reoorder items within a single RadGridView. Many of the examples posted previously are outdated and raise exceptions. The version I am using is 2010.2.812.

I have have tried to adapt the example given for silverlight here: http://www.telerik.com/help/silverlight/raddraganddrop-within-radgridview.html. The functionality is exactly what I am looking for, however I need a WPF version.

Each item contained wihtin the collection bound to the RadGridView has a property, of type int, named Position. In addition to the above, where and how can I update the Position property of the items in the collection once the drop has occurred so that I can get these objects to persist their position change?
David
Top achievements
Rank 1
 answered on 25 Aug 2010
7 answers
226 views
Hi,

I've added 7 images to my RadCarouselPanel, as children.

From the MouseLeftButtonUp event, how can I get the selected item (not only the top container, I want to know the currently selected item on the panel)?

Thanks
Ela
Milan
Telerik team
 answered on 24 Aug 2010
2 answers
123 views
I have a very large dataset I'd like to use DataFilter for. I currently have a DataFilter, a DataPager, and a GridView set up with the DataPager source set to the FilteredSource and the GridView ItemsSource set to the PagedSource. For reference I've also tried it the other way where I've tied the GridView to the FilteredSource and the Source for the DataPager to the GridView Items.

Both ways work as far as filtering and paging the data.

The problem arises when I want to know what the filtered data set is. I want to display a count to the user of how many items are currently in the set and when they are done filtering I need to grab all of the filtered items and do something with them.

I've found if I access the FilteredSource and get a count, I only have 10 items (which is my page size). So it seems no matter when I try to get to the filtered set of items I only get the current page.

How can I get access to both a current count and the full set of items in this scenario?
Alex Peachey
Top achievements
Rank 1
 answered on 24 Aug 2010
5 answers
251 views
Hi everyone,

We're trying to add a menu that looks like the context menu in one of the docking panels in our application. In order to get an idea of what we're trying to achieve, think of it like this - when you click on a drop down button and get a context menu you essentially get a list of action that you can execute. We want this list of actions to appear on the left side of our application without requiring the clicking of any button or menu. So, we did this:

<telerik:RadPane CanUserClose="False"
<telerik:RadContextMenu ItemsSource="{Binding AllItems}" Height="200"
    <telerik:RadContextMenu.ItemTemplate> 
        <DataTemplate> 
            <telerik:RadMenuItem  
                Header="{Binding Title,Mode=OneWay}" 
                Command="{Binding ShowTask}" 
                /> 
        </DataTemplate> 
    </telerik:RadContextMenu.ItemTemplate> 
</telerik:RadContextMenu> 
</telerik:RadPane> 

The menu appears and is functional, however the text gets cut off after roughly 100 pixels. 

Anyone familiar with this behavior? Any solution to this or another way to achieve a similar effect?

Thanks,
yonadav
Pana
Telerik team
 answered on 24 Aug 2010
1 answer
120 views

Hi,

I have hashtable that contain wpf and telerik controls, and I need to serialize it to xml file. I found this code for wpf controls:

string savedButton = XamlWriter.Save(origianlButton);
File.WriteAllText(@"C:\test.xml", savedButton);

but it doesn't work for telerik controls, it stuck and I get this error:

An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll

Is there any other way to do that?
Thanks in advance.

Vanya Pavlova
Telerik team
 answered on 24 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?