Telerik Forums
UI for WPF Forum
1 answer
81 views
Where do I go on the Telerik site to download the latest internal release?

-eric
Yavor Georgiev
Telerik team
 answered on 23 Jul 2010
11 answers
346 views
hi,

I'm getting error "Specified argument was out of the range of valid values.
Parameter name: index" on radgridview.

Currently, I use list collection(example : List<address>) bind to itemsource. -> address is class
Step to reproduce:
1. click "clik here to add new data", Input data -> let say name. then press enter.
2. clik button save. ->otomaticly save to database and reload data from database and rebind to radgridview.
3. click "clik here to add new data", I getting error "Specified argument was out of the range of valid values.
Parameter name: index"
Any ideas?

Regards,

Marc Roussel
Top achievements
Rank 2
 answered on 23 Jul 2010
2 answers
122 views
Hello :)

I have use a GridViewToggleRowDetailsColumn in my gridview to enable the user to see the rowDetails of each row.
I would like to know how can I set a row as selected when the user click the button generated by the GridViewToggleRowDetailsColumn.

For example I have 5 rows and the current selected row is the first row, so when the user wants to see the details of the fifth row, he make visible the row detail by pressing the button generated by the GridViewToggleRowDetailsColumn and just before the user releases the mouse button I want to make this row the current selected one.

Is this possible? I hope you can help me.

Best Regards
Jorge
Jorge Alberto
Top achievements
Rank 1
 answered on 23 Jul 2010
2 answers
91 views
Hello,
I am having trouble setting the focus to a RadPane.  This is true in both docked and undocked panes, However the undocked floaing pain is my main problem.

This is the code that I am using.

            RadPane rp = lc.Pane;
            rp.IsSelected = true;
            rp.Focus(); 

Thank you,
Rick Knicely
Top achievements
Rank 1
 answered on 23 Jul 2010
1 answer
66 views
How do I tell a floating pane which monitor to use?
It seems that if it get a Point from my form and use an offset that the floating pane uses the whole screen area available and not the monitor that the form is on.  I can subtract from the point to get the floating pane to be on the correct monitor, however if I use a machine with anohter monitor orientation it does not show up where expected.

Is there a way to determine which monitor a floating pane should display?
Rick Knicely
Top achievements
Rank 1
 answered on 23 Jul 2010
1 answer
405 views
Hi,

I've some problem with my treeview, idk if my problem is directly from the treeview or not.
What i'ld like to do is somethink like this :
- Website 1
- Month A
- picture 1
- picture 2
- Month B
- picture 1
- Website 2
- Month A
- picture 1

The problem i've meet is that for all node "website", i've the same child nodes.
Thx :)

Here is my code :
MainWindow.xaml
<Window xmlns:my="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"  x:Class="BonjourWPF.MainWindow"
        xmlns:local="clr-namespace:BonjourWPF"
        xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
        Title="MainWindow" Height="768" Width="1024">
    <Window.Resources>
        <local:WebSites x:Key="WebsiteCollection" />
 
        <CollectionViewSource
            x:Key="Sites"
            Source="{Binding Source={StaticResource WebsiteCollection}}">
        </CollectionViewSource>
        <CollectionViewSource
                            x:Key="GroupMonth"
                            Source="{Binding Source={StaticResource Sites},Path=Pictures}">
            <CollectionViewSource.SortDescriptions>
                <scm:SortDescription PropertyName="date"></scm:SortDescription>
            </CollectionViewSource.SortDescriptions>
            <CollectionViewSource.GroupDescriptions>
                <PropertyGroupDescription PropertyName="month" />
            </CollectionViewSource.GroupDescriptions>
        </CollectionViewSource>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="256" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="256" />
            </Grid.RowDefinitions>
            <Grid.Resources>
                <DataTemplate x:Key="Picture" DataType="Picture">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding date, StringFormat={}{0:dd/MM/yyyy}}"  Foreground="Black" />
                    </StackPanel>
                </DataTemplate>
 
                <HierarchicalDataTemplate x:Key="Mois" ItemsSource="{Binding Path=Items}" ItemTemplate="{StaticResource Picture}">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding Name}" Foreground="Black" />
                    </StackPanel>
                </HierarchicalDataTemplate>
 
                <HierarchicalDataTemplate x:Key="Site" ItemsSource="{Binding Source={StaticResource GroupMonth},Path=Groups}"  ItemTemplate="{StaticResource Mois}">
                    <StackPanel Orientation="Horizontal">
                        <Image Source="{Binding icon}" Margin="0,0,6,0"/>
                        <TextBlock Text="{Binding name}"  Foreground="Black" FontWeight="Bold"
                            FontSize="15" />
                    </StackPanel>
                </HierarchicalDataTemplate>
 
            </Grid.Resources>
 
            <my:RadTreeView Name="RadTreeView1" ItemsSource="{Binding Source={StaticResource Sites}}" ItemTemplate="{StaticResource Site}" IsSingleExpandPath="True">
            </my:RadTreeView>
             
        </Grid>
        <Image Grid.Column="1" Name="image1" Stretch="Uniform" />
    </Grid>
</Window>


public class WebSites : ObservableCollection<WebSite>
{
    public WebSites()
    {
        this.Add(new WebSite()
        {
            id = 1,
            name = "Site 1",
            icon = "site1.ico"
        });
 
        this.Add(new WebSite()
        {
            id = 2,
            name = "Site 2",
            icon = "site2.ico"
        });
    }
}

public class Picture
{
    public DateTime date { get; set; }
    public String year
    {
        get
        {
            return date.Year.ToString();
        }
    }
    public String month
    {
        get
        {
            return DateTimeFormatInfo.CurrentInfo.GetMonthName(date.Month);
        }
 
    }
    public String path { get; set; }
}

    public class WebSite
    {
        public Int32 id { get; set; }
        public String name { get; set; }
        public String icon { get; set; }
 
        public WebSite()
        {
        }
 
 
        private ObservableCollection<Picture> _pictures;
        public ObservableCollection<Picture> Pictures
        {
            get {
                if (_pictures == null)
                {
                    _pictures = new ObservableCollection<Picture>();
                    if (Directory.Exists(name))
                    {
                        foreach (String file in Directory.GetFiles(name))
                        {
                            _pictures.Add(new Picture() { date = Convert.ToDateTime(Path.GetFileNameWithoutExtension(file)), path = Path.GetFullPath(file) });
                        }
                    }
                }
                return _pictures;
            }
            set
            {
                _pictures = value;
            }
        }
}
Hristo
Telerik team
 answered on 23 Jul 2010
4 answers
397 views
I have to format numbers to a user defined precision; I created a binding to a property where precision is stored:

            Binding precisionBinding;
            precisionBinding = new Binding("Item.Format[" + column.UniqueName + "].Precision");
            precisionBinding.Mode = BindingMode.OneWay;
            precisionBinding.Converter = new PrecisionConverter();

and set CellStyle:

            cellStyle.Setters.Add(new Setter(GridViewCell.ContentStringFormatProperty, precisionBinding));

but format returned by PrecisionConverter() is ignored at all.
Thanks
Yavor Georgiev
Telerik team
 answered on 23 Jul 2010
5 answers
258 views
Hello everyone,

I am using WPF App with carousel on an IPC with Windows 7 Embedded and 1GB RAM and Intel Atom 1,6 GHz. I have the Q1 Version of telerik controls. Carousel has shadow, scalling and opacity on.

My problem is that the performance is to bad, the scrolling of the carousel isn't fluid.

My question is what are the minimum requirements concering RAM, CPU for carousel control ?
How far performance depends on graphic chip ? 
Have somebody faced the same problems ?
How can I increase performance generally ?

It will be very pity to remove carousel from my application.

Thank you.

Daniel
Milan
Telerik team
 answered on 23 Jul 2010
2 answers
128 views
Hello everyone!

I am currently trying to display a map in a window using WPF. Unfortunately, I do not succeed in changing the size of the map.
In my WPF view I have two buttons and my RadMap control, and if I manually change the width and height of the RadMap object the buttons disappear but also the zoom control which is supposed to be on the map.

Here is my code:

<Window x:Class="WpfRadMapApplication.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    MinHeight="300" MinWidth="300"
    Height="600" Width="600">
    <Grid HorizontalAlignment="Center" VerticalAlignment="Top">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="10*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Button Grid.Row="0" Grid.Column="0" Name="map24Button" Content="Map24" Margin="5" HorizontalAlignment="Center" Click="map24Button_Click" />
        <Button Grid.Row="1" Grid.Column="0" Name="openStreetMapButton" Content="OpenStreetMap" Margin="5" HorizontalAlignment="Center" Click="openStreetMapButton_Click" />
        <telerik:RadMap Grid.Row="2"
                    Grid.Column="0"
                    Name="radMap"
                    ZoomLevel="0"
                    Center="0,0"
                    Background="White"
                    HorizontalAlignment="Center">
        </telerik:RadMap>
    </Grid>
</Window>

Thanks for your help :)!
Mapi
Top achievements
Rank 1
 answered on 23 Jul 2010
1 answer
73 views
on the RadMaskedTextBox, there's a property called IsSpinEnabled that you can turn on or off. This property doesn't seem to be exposed on the GridViewMaskedTextBoxColumn.. Is there another way to turn spin on or off?
Maya
Telerik team
 answered on 23 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?