Telerik Forums
UI for WPF Forum
1 answer
92 views
Two questions into one....

1: Can I customize the style of the scrollbars when using the scrolling/zooming features
2: Can I make it so that the width of the bars are fixed?

I'm trying to make a chart where there are a larger number elements that can be scrolled through (keeping the Y-Axis fixed).

Thanks!

Sia
Telerik team
 answered on 14 Apr 2010
2 answers
377 views
Hi,

I'm trying to bind the background of a GridViewDataColumn to a property in my ViewModel:
<radGrid:GridViewDataColumn Header="State" Width="090" Background="{Binding Path=State, Converter={StaticResource StateToColorConverter}}" DataMemberBinding="{Binding Path=State}"/> 

Based on the value of the State property the background should change: if State = new, the background should be green, if State = rejected the value should be red, and so on.
However, if I bind the State property to the Background, i get a BindingExpression path error stating that my State property is not found on my object, while the same databinding works fine on the DataMemberBinding.
Anyone got a clue what is wrong here?

The Xaml:
<radGrid:RadGridView ItemsSource="{Binding Orders}" > 
     <radGrid:RadGridView.Columns> 
          <radGrid:GridViewDataColumn Header="State" Width="090" 
                                     
Background="{Binding Path=State, Converter={StaticResource StateToColorConverter}}" 
                                     
DataMemberBinding="{Binding Path=State}"/>  
     </radGrid:RadGridView.Columns> 
</radGrid:RadGridView> 

and the code from the viewModel:
private ObservableCollection<SingleOrder> _orders = new ObservableCollection<SingleOrder>()  
public ObservableCollection<SingleOrder> Orders { get { return _orders; } }  
 
public class SingleOrder   
        : ViewModelBase  
{  
        private Instrument _instrument;  
        public Instrument Instrument  
        {  
            get { return _instrument; }  
            set 
            {  
                if (!Instrument.Equals(_instrument, value))  
                {  
                    _instrument = value;  
                    this.OnPropertyChanged("Instrument");  
                }  
            }  
        }  
 
        private System.String _state;  
        public System.String State  
        {  
            get { return _state; }  
            set 
            {  
                if (!String.Equals(_state, value))  
                {  
                    _state = value;  
                    this.OnPropertyChanged("State");  
 
                }  
            }  
        }  
}  
 

Thanks a lot!

Hans
Hans Smit
Top achievements
Rank 1
 answered on 14 Apr 2010
1 answer
353 views
Not a question this time. I just thought I might post this in case it is of help to others playing with the RadMap.
 
This is how to add images to the radmap map with a bit more control over the image than is available by simply adding a bitmap using the pinpoint method.

        // Set provider
                BingMapProvider provider = new BingMapProvider(MapMode.Aerial, true, "YOUR CODE GOES HERE");
                provider.IsTileCachingEnabled = true;
                mWindow.radmap.Provider = provider;

        // Create information layer
                iLayer = new InformationLayer();
                iLayer.MapControl = mWindow.radmap;
                mWindow.radmap.Items.Add(iLayer);

        // Create a new image object and add it to bing map.
                Uri uri = new Uri(@"" + imageName, UriKind.Relative);

                BitmapImage bitmap = new BitmapImage();
                bitmap.BeginInit();
                bitmap.UriSource = uri;
                bitmap.EndInit();

                Image image = new Image();
                image.Source = bitmap;
                image.Opacity = 0.85;
                image.Width = imageWidth;
                image.Height = imageHeight;
                image.Stretch = Stretch.UniformToFill;
                image.SnapsToDevicePixels = true;
                image.Name = Name;

        // When added to map, centre image over Lat/Long rather than use upper left corner for placement
                image.VerticalAlignment = VerticalAlignment.Center;
                image.HorizontalAlignment = HorizontalAlignment.Center;

        // Add the image to the map
                MapLayer.SetLocation(image, new Location(dLatitude, dLongitude));
                iLayer.Items.Add(image);

Andrey
Telerik team
 answered on 14 Apr 2010
1 answer
83 views

Hello!

I’m working with your Chart, and I found it working incorrectly.

<QuickStart:ExampleControl x:Class="Telerik.Windows.Examples.Chart.WPF.TwoDimensional.Bar.Example"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:QuickStart="clr-namespace:Telerik.Windows.QuickStart;assembly=Telerik.Windows.QuickStart"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Grid>     
        <telerik:RadChart x:Name="RadChart1"/>
    </Grid>
</QuickStart:ExampleControl>

As a result I expect to see a Chart of 0x0 size, but instead it’s 800x600.
I do not understand where this size comes from, because it’s not written anywhere.
How can I solve that problem?
The matter is crucial for me, since in my application I need to implement the floating layout.
Thank you very much.

RadarSoft

Velin
Telerik team
 answered on 14 Apr 2010
1 answer
72 views
Out of the blue, I have started getting an assembly error when i try to debug my application. I am utilizing RadControls for WPF Q1 2010 in VS 2008:

Error   1   Could not load type 'Microsoft.Windows.Design.Metadata.ProvideMetadataAttribute' from assembly 'Microsoft.Windows.Design.Extensibility, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Line '1' Position '491'.   C:\Documents and Settings\akedzier\My Documents\Visual Studio 2008\Projects\CCMB_WPF\WpfApplication1\panels\Panel_04.xaml   12   13   CCBM_Wpf

Here is the code it tags as problematic. It is almost verbatim from the Telerik example:
            <ControlTemplate x:Key="NewGaugeBackground"  TargetType="{x:Type ContentControl}"
                <Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"
                    <Grid.ColumnDefinitions> 
                        <ColumnDefinition Width="20"/> 
                        <ColumnDefinition Width="*"/> 
                        <ColumnDefinition Width="20"/> 
                    </Grid.ColumnDefinitions> 
                    <Grid.RowDefinitions> 
                        <RowDefinition Height="20"/> 
                        <RowDefinition Height="*"/> 
                        <RowDefinition Height="20"/> 
                    </Grid.RowDefinitions> 
                    <Ellipse Stretch="Fill" Grid.ColumnSpan="3" Grid.RowSpan="3"
                        <Ellipse.Fill> 
                            <ImageBrush ImageSource="pack://application:,,,/images/bronze.jpg" /> 
                        </Ellipse.Fill> 
                        <Ellipse.BitmapEffect> 
                            <BevelBitmapEffect BevelWidth="20" 
                                EdgeProfile="BulgedUp" 
                                Relief="0.5" 
                                Smoothness="0.3" /> 
                        </Ellipse.BitmapEffect> 
                    </Ellipse> 
                    <Ellipse Grid.Row="1" Grid.Column="1" Stretch="Fill" Fill="White" /> 
                    <Ellipse Grid.Row="1" Grid.Column="1" Height="48" Width="48"
                        <Ellipse.Fill> 
                            <ImageBrush ImageSource="pack://application:,,,/images/bronze.jpg" /> 
                        </Ellipse.Fill> 
                        <Ellipse.BitmapEffect> 
                            <BevelBitmapEffect BevelWidth="5" 
                                EdgeProfile="BulgedUp" 
                                Relief="0.5" 
                                Smoothness="0.3" /> 
                        </Ellipse.BitmapEffect> 
                    </Ellipse> 
                </Grid> 
            </ControlTemplate> 

This has compiled and run just fine previously. Not sure what changed to cause the error.


Andrey
Telerik team
 answered on 14 Apr 2010
1 answer
111 views
        I have seen the instruction about Map and know it supports Bing's map.  Now I wanna know if it supports Google's map.  If the answer is YES, how to do it?
Nikolay
Telerik team
 answered on 14 Apr 2010
3 answers
82 views
Hi,

The call to RadWindow.Alert("msg") crashes on Window XP PRO while it's working on Windows Seven boxes

We are using this telerik package RadControls_for_WPF_2010_1_0309_DEV.msi

Please find below the error stack we have during the crash 

{"La valeur '/Telerik.Windows.Controls.Navigation;component/Themes/GenericVista.xaml' ne peut pas être attribuée à la propriété 'Source' de l'objet 'System.Windows.ResourceDictionary'. La valeur '/Telerik.Windows.Controls.Navigation;component/themes/vista/CarouselDataFieldPresenter.xaml' ne peut pas être attribuée à la propriété 'Source' de l'objet 'System.Windows.ResourceDictionary'. La référence d'objet n'est pas définie à une instance d'un objet.  Erreur à l'objet 'System.Windows.ResourceDictionary' dans le fichier de balisage 'Telerik.Windows.Controls.Navigation;component/Themes/GenericVista.xaml'.  Erreur à l'objet 'System.Windows.ResourceDictionary'."} 


Thank you for your support.

Best Regards.

Luciano





Boyan
Telerik team
 answered on 14 Apr 2010
1 answer
99 views
I have a RadToolBar with some buttons.
Some of them are navigationbuttons which I want to Enable/Disable from codebehind:

<Button x:Name="btnFirst" Command="{Binding FirstCommand}" IsEnabled="{Binding IsLeftEnabled}" Width="26">
                <Image Width="16" Height="16" Source="/Star3;component/Images/16/navigate_beginning.png"/>     
</Button>     

It works not 100%: I had expected a gray image when disabled.
But the image just disappeares.
And it won't come back when enabled again...     

Marinus
Vladislav
Telerik team
 answered on 14 Apr 2010
3 answers
148 views
Hi,

Is there a way to export only the specified columns to excel. If not ;
<telerik:GridViewDataColumn IsFilterable="False" IsGroupable="False" IsReadOnly="True" IsSortable="False" Header="Adet" Width="125"
                        <telerik:GridViewDataColumn.CellTemplate> 
                            <DataTemplate> 
                                <StackPanel Orientation="Horizontal"
                                    <TextBlock Text="{Binding ItemAmount}" FontWeight="Bold"/> 
                                    <TextBlock Text=" yerine "/> 
                                    <TextBlock Text="{Binding ArrivedAmount}" FontWeight="Bold"/> 
                                </StackPanel> 
                            </DataTemplate> 
                        </telerik:GridViewDataColumn.CellTemplate> 
                         
                    </telerik:GridViewDataColumn> 

As you see at the code above i am using e cell template at the grid column. While exporting it does not export the data inside the cell template. Is the a way to solve this.

Regards.
Vlad
Telerik team
 answered on 14 Apr 2010
3 answers
169 views
I am a little unclear on the scope of the RadPanelBar. I understand that the RadPanelBar contains a tree-like structure of RadPanelBarItems. Can these items be any content such as Grids, StackPanels of controls, etc.? Or are they just tree-like text as shown in the demo project? The documentation only mentions an Item property that is an 'object'.

Also, the documentation is called RadControls for Silverlight. I assume it also applies to WPF. Is there any functionality that is Silverlight or WPF specific?

Thanks.

Greg
Valentin.Stoychev
Telerik team
 answered on 14 Apr 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?