Page 1 of 1

Silverlight Migratipn - SolidColorBrush

Posted: Mon May 20, 2019 2:14 am
by Rajesh
I migrated our SilverLight project to CSHTML5.

We make frequent use of SolidColorBrush from System.Windows.Media namespace.
I am unable to find references to resources from these namespaces:

xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
xmlns:prim="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"

The assemblies for SLMigration.CSharpXamlForHtml5..... included in the project during migration does not seem to support these C# / .Net classes.

Using version 1.2.132 of SilverLight Migration trial version of Userware.

Please let me know if I am missing something.

Thanks
Rajesh

Re: Silverlight Migratipn - SolidColorBrush

Posted: Mon May 20, 2019 3:37 am
by JS-Support @Userware
Hi

Rajesh wrote:We make frequent use of SolidColorBrush from System.Windows.Media namespace.

The SolidColorBrush is perfectly supported. Its namespace is "http://schemas.microsoft.com/winfx/2006/xaml/presentation". If you get a message that says that SolidColorBrush cannot be found, please double-check that the namespace is the same as above. Please also verify that the error is a "compile-time" error and not a "design-time" error (which can be ignored). Please post your XAML if the error persists.

Rajesh wrote:I am unable to find references to resources from these namespaces:
xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
xmlns:prim="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"

The name of the CSHTML5 assemblies is different than that of Silverlight. Therefore, the "assembly=System.Windows.Controls.Data" code above won't work. To fix the issue, please replace the namespaces with "http://schemas.microsoft.com/winfx/2006/xaml/presentation". For example:

Code: Select all

xmlns:data="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:prim="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation"