I am developing a Silverlight 4 application using MVVM and MEF that uses Q3 2010 RadControls. I have a MainPage user control in the startup project in which I have defined several RadWindows for error, validation, deletion confirmation, etc. I have created a Main Page view model which is set to the DataContext in the OnLoaded procedure. The problem is that unlike other controls on the MainPage, the RadWindow bindings do not occur. When I trace in debug, all the other controls, including some other types of RadControls such as RadMenu, set properties in the view model. This does not happen with the RadWindows. Some code snippets:
I have used the TaskIt sample application as a model and have implemented the RadWindows in a similar fashion to the TaskIt app in which this behavior does not occur. The Telerik dlls in the TaskIt app are an older version than what I am using. Also, I am developing in VB whereas the TaskIt app was programmed in C#. I have spent several days trying to resolve this issue which ultimately manifests itself as having RadWindow popup with no text or usable pushbuttons for commands.
I am currently totally stymied by this and need help to resolve the issue.
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"{StaticResource AppBackgroundBrush}"
>
<
telerikNavigation:RadWindow
x:Name
=
"ValidationErrorWindow"
Header
=
"{Binding ResourceTitleValidationErrors}"
>
<
StackPanel
>
<
ItemsControl
ItemsSource
=
"{Binding ValidationErrors}"
>
<
ItemsControl.ItemTemplate
>
<
DataTemplate
>
<
StackPanel
>
<
TextBlock
Text
=
"{Binding ErrorContent}"
/>
<
Rectangle
Style
=
"{StaticResource SmallSpacerStyle}"
/>
</
StackPanel
>
</
DataTemplate
>
</
ItemsControl.ItemTemplate
>
</
ItemsControl
>
<
Rectangle
Style
=
"{StaticResource StandardSpacerStyle}"
/>
<
Button
Content
=
"{Binding ResourceCommandOK}"
Command
=
"{Binding CloseValidationWindowCommand}"
HorizontalAlignment
=
"Left"
TabIndex
=
"0"
/>
</
StackPanel
>
</
telerikNavigation:RadWindow
>
Partial Public Class MainPage
Public Sub New()
InitializeComponent()
'Me.loginContainer.Child = New LoginStatus()
AddHandler Loaded, AddressOf OnLoaded
End Sub
Private Sub OnLoaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
CompositionInitializer.SatisfyImports(Me)
DataContext = ViewModel
AddHandler ViewModel.ConfirmDeletion, AddressOf OnConfirmDeletion
AddHandler ViewModel.CloseConfirmDeletionWindow, AddressOf OnCloseConfirmDeletionWindow
I am currently totally stymied by this and need help to resolve the issue.