Telerik Forums
UI for WPF Forum
1 answer
281 views
Is it possible to databind the value of a RadProgressBar in XAML? For example:

<telerik:RadProgressBar  
     Name="PercentBar"  
     Orientation="Horizontal"  
     Margin="3"  
     Value="{Binding Path=My_Percent, StringFormat=P0}" /> 

Seems simple, but this particular code throws the following error:

System.InvalidOperationException was unhandled 
Message: A TwoWay or OneWayToSource binding cannot work on the read-only  
property 'My_Percent' of type 'System.Data.Common.DataRecordInternal'. 

There is no example in the current documentation for the control.
Art Kedzierski
Top achievements
Rank 2
 answered on 07 Apr 2010
2 answers
59 views
Hi...

Do you have some where your default styles for the grid view ?
I can't manage to load them in blend and modify them, so I thought to manually insert them to my app.xaml.

10x

Eran.
Eran Lahav
Top achievements
Rank 1
 answered on 07 Apr 2010
7 answers
674 views
Dear all
can some one give simple code for makie mdi for radwindows
(Multiple Document Interface (MDI) Design)

i need to make an aplication that creates multi radwindow on the mainwindow.
1.all the subwindow cannot go out of the mian page.
2.when i activiate the main window all the sub window will still on the front.
Miroslav Nedyalkov
Telerik team
 answered on 07 Apr 2010
1 answer
208 views
Hi!

We have two issues concerning the title of this post:

1) We're porting an application from VB6 to WPF. In VB6 we're using QuickTimePlayer to play MP4 files, but WPF MediaPlayer does not native play them and there is not any Support/Control using QuickTimePlayer directly. Questions: Is there a way to get MP4 files running in MediaPlayer (ideally without installing huge codec packages)? Or is there a way to get QuickTimePlayer into WPF not using WindowsFormsHost?

2) In the WPF application we need to play video files from stream because they are cryptographically secured an will be encrypted while streaming to the player (because only the application itself should be able to play the files). Is there a way within MediaPlayer?

Thx!

Miro Miroslavov
Telerik team
 answered on 07 Apr 2010
7 answers
147 views
Hello,

I'm running internal build 2010.1.326.35. When i host the RadDocking control inside of a windows form using a ElementHost I'm getting "Object reference not set to an instance of an object."

sample code.
using System; 
using System.Collections.Generic; 
using System.ComponentModel; 
using System.Data; 
using System.Drawing; 
using System.Linq; 
using System.Text; 
using System.Windows.Forms; 
 
namespace WindowsFormsApplication1 
    public partial class Form1 : Form 
    { 
        public Form1() 
        { 
            try 
            { 
                InitializeComponent(); 
                this.elementHost1.Child = new UserControl1(); 
            } 
            catch (Exception ex) 
            { 
                MessageBox.Show(ex.ToString()); 
            } 
        } 
    } 
 

usercontrol code
<UserControl x:Class="WindowsFormsApplication1.UserControl1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:radDock="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking"
    <Grid> 
        <radDock:RadDocking /> 
    </Grid> 
</UserControl> 
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using System.Windows; 
using System.Windows.Controls; 
using System.Windows.Data; 
using System.Windows.Documents; 
using System.Windows.Input; 
using System.Windows.Media; 
using System.Windows.Media.Imaging; 
using System.Windows.Navigation; 
using System.Windows.Shapes; 
 
namespace WindowsFormsApplication1 
    /// <summary> 
    /// Interaction logic for UserControl1.xaml 
    /// </summary> 
    public partial class UserControl1 : UserControl 
    { 
        public UserControl1() 
        { 
            InitializeComponent(); 
        } 
    } 


any suggestions for a workaround would be great. we have a conference coming up next week to demonstrate our product and this control is in all of our WPF maintenance screens.

Thanks much
~Boots
Miroslav Nedyalkov
Telerik team
 answered on 07 Apr 2010
2 answers
256 views
Problem:
    1. How to Refresh Radgridview when i Insert Record in database and update record.
    2.when i am Insert or Update Record than in radgridview that row is selected.

i am useing sql server 2005.

i am use to set data source of radgridview like " radgridview1.ItemsSource = ds; "  ==> ds is dataset.

i am beginner so if possible than tel me by code it is easy to understand.......

can u help me as early as possible ....


xola139
Top achievements
Rank 1
 answered on 06 Apr 2010
2 answers
157 views
Hi,

is this a bug or have i missed some configuration for horizontal zooming. Please look at the screen I attached - horizontal zooming is not working for my chart. Any suggestions?

Besides, I'm still waiting for an answer or help with the horizontal drawing line problem ...

PS: It would be very helpful if you allow users to attach word-files or pdfs...
Monika Kogler
Top achievements
Rank 1
 answered on 06 Apr 2010
9 answers
287 views
A client is keen to use a custom theme that does not closely match any of the out-of-the-box themes.

a. How can I easily modify an existing Telerik theme to create a new one?
b. Can I make standard MS WPF controls adopt such a theme?
c. Or, will some 3rd party theme provider also work with Telerik controls?

Many thanks for any guidance,

James.

RoxanaC
Top achievements
Rank 1
 answered on 06 Apr 2010
1 answer
288 views
In RadDatePicker, when click the Date picker button, the drop down calendar control will display.
It aligns on the left and bottom of RadDatePicker control.
Is there a way that we can reposition the Drop down calendar control position?
such as align it on the right and top of the RadDatePicker?
thx!
Konstantina
Telerik team
 answered on 06 Apr 2010
1 answer
124 views
Hi,
I have a carousel, and when i scroll , click through the items and then double click on a item, I would like to extract the  value from the carousel. As I can't see anything obvious like you would find in a combo box.

For example I have  a list of employees with a 'name' and 'employee id'. I select double click on a employee and i want to then be able to get the employee id.

My Xaml

<Page x:Class="Elica_WardView.Page1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="Page1"   
    xmlns:local="clr-namespace:Elica_WardView" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
    xmlns:carousel="clr-namespace:Telerik.Windows.Controls.Carousel;assembly=Telerik.Windows.Controls.Navigation">  
    <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="BackGround" Width="2000" Height="900" Canvas.Left="0" Canvas.Top="0">  
        <Canvas.Background> 
            <LinearGradientBrush StartPoint="0.505999,-0.00069987" EndPoint="0.505999,1.0007">  
                <LinearGradientBrush.GradientStops> 
                    <GradientStop Color="#FF388CE3" Offset="0"/>  
                    <GradientStop Color="#FFFFFFFF" Offset="1"/>  
                </LinearGradientBrush.GradientStops> 
            </LinearGradientBrush> 
        </Canvas.Background> 
        <Grid Width="2000">  
            <Grid.ColumnDefinitions> 
                <ColumnDefinition Width="800" /> 
          </Grid.ColumnDefinitions> 
            <Grid.RowDefinitions> 
                <RowDefinition Height="Auto"/>  
                <RowDefinition Height="450"/>  
           </Grid.RowDefinitions> 
            <Grid.Resources> 
                <DataTemplate DataType="{x:Type local:MyMaps}">  
                      
                        <Grid> 
                            <Grid.ColumnDefinitions> 
                                <ColumnDefinition Width="450" /> 
                            </Grid.ColumnDefinitions> 
                            <Grid.RowDefinitions> 
                                <RowDefinition Height="290" /> 
                                <RowDefinition Height="100" /> 
                            </Grid.RowDefinitions> 
                            <Image Source="{Binding Path=Image}" Grid.Column="0" Grid.Row="0" MouseDown="Image_MouseDown"/>  
                            <TextBlock Grid.Column="0" Grid.Row="1" Text="{Binding Path=Description}" FontSize="14"/>  
                              
                        </Grid> 
                     
                </DataTemplate> 
            </Grid.Resources> 
           
            <Image Source="Images/Logo.png" Grid.Column="0" Grid.Row="0" Width="450" /> 
 
            <telerik:RadCarousel Name="radCarousel1" Height="390" Grid.Row="1" VerticalAlignment="Bottom" Grid.Column="0" AutoGenerateDataPresenters="False" SelectedItem="{Binding Path=Ward}">  
                  
            </telerik:RadCarousel> 
        </Grid> 
    </Canvas> 
</Page> 
 

Example of the  code beind
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Text;  
using System.Windows;  
using System.Windows.Controls;  
using System.Windows.Data;  
using System.Windows.Documents;  
using System.Windows.Input;  
using System.Windows.Media;  
using System.Windows.Media.Imaging;  
using System.Windows.Navigation;  
using System.Windows.Shapes;  
using System.Collections.ObjectModel;  
using System.ComponentModel;  
using System.Collections;  
using Telerik.Windows.Controls.Carousel;  
using Telerik.Windows.Controls;  
using Telerik.Windows;  
using Telerik.Windows.Data;  
 
namespace Elica_WardView  
{  
    /// <summary>  
    /// Interaction logic for Page1.xaml  
    /// </summary>  
    public partial class Page1 : Page  
    {  
        public Page1()  
        {  
            InitializeComponent();  
            radCarousel1.ItemsSource = this.CreateItemSource();  
 
       }  
 
      
        private List<MyMaps> CreateItemSource()  
        {  
            List<MyMaps> list = new List<MyMaps>();  
            list.Clear();  
            list.Add(new MyMaps(new BitmapImage(new Uri("Wards/22c_thumb.png", UriKind.Relative)),"22","1"));  
            list.Add(new MyMaps(new BitmapImage(new Uri("Wards/27g_thumb.png", UriKind.Relative)), "27""2"));  
            list.Add(new MyMaps(new BitmapImage(new Uri("Wards/a1_thumb.png", UriKind.Relative)), "a1""3"));  
            list.Add(new MyMaps(new BitmapImage(new Uri("Wards/wd16_thumb.png", UriKind.Relative)), "wd16""4"));  
            list.Add(new MyMaps(new BitmapImage(new Uri("Wards/27r_thumb.png", UriKind.Relative)), "27r""5"));  
            return list;  
        }  
 
        private void Image_MouseDown(object sender, MouseButtonEventArgs e)  
        {  
            if (e.ClickCount >= 2)  
            {  
              // Get the selected value here!!    
                string img = radCarousel1.CurrentItem.ToString();  
                 
                string x = e.OriginalSource.ToString();  
            }  
        }  
 
   
 
    
 
 }  
    public class MyMaps  
    {  
        private BitmapSource _Image;  
        private string _Description;  
        private string _Ward;  
 
        public MyMaps(BitmapSource Image, string Description,string Ward)  
        {  
            this._Image = Image;  
            this._Description = Description;  
            this._Ward = Ward;  
        }  
 
        public BitmapSource Image {   
            get {return _Image;}  
            set { _Image = value; }  
          
        }  
 
        public string Description {  
            get { return _Description; }  
            set { _Description = value; }  
        }  
 
        public string Ward {  
            get { return _Ward; }  
            set { _Ward = value; }  
        }  
    }    
      
      
    
 
     
}  
 


Can i have some help please or example of how it can be done.

Thanks
Milan
Telerik team
 answered on 06 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?