or
| <telerik:RadProgressBar |
| Name="PercentBar" |
| Orientation="Horizontal" |
| Margin="3" |
| Value="{Binding Path=My_Percent, StringFormat=P0}" /> |
| 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'. |
| 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 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(); |
| } |
| } |
| } |