This is a migrated thread and some comments may be shown as answers.

How to bind a new string property from project QuickStartUI_SL to project Examples ->Example.Xaml?

1 Answer 20 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Jacky
Top achievements
Rank 1
Jacky asked on 01 Apr 2013, 03:49 PM
I am studing Telerik Silverlight demo code (RadControls for Silverlight Q1 2013).
I created a new TestString property in QuickStartUI_SL/ViewModels/MainViewModel.cs
        private string testString;
        public string TestString
        { get { return testString; }
            set { testString = value; this.OnPropertyChanged("TestString");}
        }

Then I assign TestString value and bind this property in Examples/GanttView.Silverlight/FirstLook/Example.xaml
like: <TextBlock Text="{Binding TestString}" Style="{StaticResource DemoGroupTextBlock}" />

But it failed. The value is null.

Anybody guide me how can I do?

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 04 Apr 2013, 10:23 AM
Hi Jacky,

The ViewModel used in the GanttView FirstLook demos is in the same folder as Example.xaml ( .../Demos/Examples/GanttView/FirstLook ) and is called ViewModel.cs.  You should add the TestString property there in order to bind it properly.

Greetings,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GanttView
Asked by
Jacky
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or