Hi
I'm trying to bind a RichTextBox to a String that is in a application using the Prism framework.
The Xaml is
Initially the problem I got was
System.Windows.Markup.XamlParseException occurred
Message=The type 'XamlDataProvider' was not found because 'clr-namespace:Telerik.Windows.Documents.FormatProviders.Xaml;assembly=Telerik.Windows.Documents.FormatProviders.Xaml' is an unknown namespace. [Line: 14 Position: 59]
but when I added Telerik.Windows.Documents.FormatProviders.Xaml dll to the main Prism app project(ie the project with the Shell and bootstrapper) that error went away. Id prefer not to add the Dll to that project as it doesnt the reference.
Now I get the following error
System.AccessViolationException was unhandled
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
InnerException:
Can you tell me how to fix this?
Regards,
Joe
I'm trying to bind a RichTextBox to a String that is in a application using the Prism framework.
The Xaml is
<
UserControl
x:Class
=
"MaintenancePlanner.View.FormView.Log"
xmlns:Commands
=
"clr-namespace:Microsoft.Practices.Prism.Commands;assembly=Microsoft.Practices.Prism"
xmlns:telerik
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
xmlns:Controls
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
xmlns:telerikEditor
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Documents"
xmlns:telerikXaml
=
"clr-namespace:Telerik.Windows.Documents.FormatProviders.Xaml;assembly=Telerik.Windows.Documents.FormatProviders.Xaml"
Width
=
"auto"
Height
=
"auto"
>
<
UserControl.Resources
>
<
telerikXaml:XamlDataProvider
x:Key
=
"xamlDataProvider"
Xaml
=
"{Binding Path=SelectedLog.LogContent, Mode=TwoWay}"
RichTextBox
=
"{Binding ElementName=editor}"
/>
</
UserControl.Resources
>
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
Margin
=
"0 0 0 0"
ShowGridLines
=
"False"
>
...................
<
telerikEditor:RadRichTextBox
x:Name
=
"editor"
Grid.Row
=
"1"
Grid.Column
=
"1"
/>
.............
</
Grid
>
</
UserControl
>
SelectedLog is the object and LogContent is the variable which is a String.
Its defined in the ViewModel.private
ItemLog _selectedLog;
public
ItemLog SelectedLog
{
get
{
return
this
._selectedLog;
}
set
{
if
(value !=
this
._selectedLog)
{
this
._selectedLog = value;
this
.RaisePropertyChanged(() =>
this
.SelectedLog);
_selectedLog.PropertyChanged += (s, e) =>
{
if
(SubmitChangesCommand !=
null
)
SubmitChangesCommand.RaiseCanExecuteChanged();
CancelLogCommand.RaiseCanExecuteChanged();
};
}
}
}
Initially the problem I got was
System.Windows.Markup.XamlParseException occurred
Message=The type 'XamlDataProvider' was not found because 'clr-namespace:Telerik.Windows.Documents.FormatProviders.Xaml;assembly=Telerik.Windows.Documents.FormatProviders.Xaml' is an unknown namespace. [Line: 14 Position: 59]
but when I added Telerik.Windows.Documents.FormatProviders.Xaml dll to the main Prism app project(ie the project with the Shell and bootstrapper) that error went away. Id prefer not to add the Dll to that project as it doesnt the reference.
Now I get the following error
System.AccessViolationException was unhandled
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
InnerException:
Can you tell me how to fix this?
Regards,
Joe