Finding Flowdirection in Silverlight 4.0 - silverlight-4.0

Is there any way to find the flow direction of current culture in Silverlight 4.0. I know its possible in full .net with CultureInfo.TextInfo.IsRightToLeft, but since Silverlight has a cut down form of CLR and the internal implementation of IsRightToLeft in .Net uses COM, this property is not available in Silverlight version of CLR.
Any suggestions of setting an extension method?
I know to provide checking the culture name and set the direction as right to left only for say hebrew, arabic etc. Is this the only way???
Thanks

Related

Running a VB.NET webservice in .NET Core

I'm wondering what the best way to "Modernize" a VB.NET webservice is. I have a traditional webservice written using the System.Web.Services.WebService class in a old school website project.
<%# WebService Language="VB" CodeBehind="~/App_Code/JsonService.vb" Class="JsonService" %>
Assuming I can break the webservice into it's "own thing/API" that doesn't have a front end coupled with it, I would like to be able to run this in AWS Lambda or Docker etc.
What would my options be? Some things I can think of:
Re-write everything in C# in a .NET Core project
Somehow use VB.NET and .NET Core/.NET 5 at the same time? (I don't know how to do this, I think .NET core only supports C#?)
Use a "code converter" for the vb.net files, which the support seems pretty bad for at the moment.
I can read VB.NET code decently, but I am by no means an expert.
Here's a C# net5 web API project referencing a VB.NET net5 class library project, getting the VB to produce the value. You than thus leave most of the logic/objects in VB, and have the C# be a thin proxy for the logic. The debugger will step back and forth between c# and VB without complaint. You can gradually port over the VB if you want
ICSharpCode's VBNET converter is pretty good; gives a helpful start to any conversion at least. You'll learn the usual gotchas; VB using () for array indexers and methods, for example; converters don't always get that one right..

VB6 -> VB.NET ... Cannot find the Canvas control in .NET

I am trying to convert some old VB6 code to VB.NET. The VB6 uses a Canvas control, simply
Dim cv as Canvas
I cannot for the life of me figure out how to use the Canvas control in VB.NET (using VS2005). MSDN says it is in the System.Windows.Controls namespace, which doesn't seem to exist? All I see is System.Windows.Forms, which doesn't include the Canvas control. Any tips?
Thanks
You need to find out what the Canvas was in VB6, then you will be able to see what the nearest equivalent is in VB.Net.
I think it must have been an obscure third-party control or possibly some custom code. I've not come across Canvas before in VB6
In recent history things have changed a bit here. There are now two sets of windows frameworks.
Forms are the old one. The new ones are controls, and they come in the WPF and Silverlight variety. WPF is to replace windows forms, silverlight is meant for the web, etc etc.
Since you are using the older VS2005, I believe you will need to install the WPF extensions to get access to them.
Unfortunately the WPF Extensions for VS2005 are no longer supported by Microsoft:
http://blogs.msdn.com/b/acangialosi/archive/2008/06/27/vs-2005-extensions-for-net-framework-3-0-wpf-wcf-ctp-is-coming-off-the-ms-download-center.aspx
You can still get them from various places, but for your own ease you should probably consider upgrading to at least VS2008 if you want to use WPF/Silverlight.

Migrating project from .NET 2.0 to .NET 4.0

I'm migrating my solutions from .NET 2.0 to .NET 4.0. I open the solution file in VS 2010 and follow migration wizard.
While building the solution and comparing the changes with the server copy (since solution is under source control VSTS), I surprisingly found that
1) the public classes were changed to 'internal' and
2) the 'public static' properties were changed to 'internal static'
It gave me problem because the output assembly is referred in other projects.
Can someone explain why does it happen? Also, are there any other such changes taking place behind the scene? Or Am I doing something wrong ?
(Note: I have ReSharper 5.1 installed but I think it has no place in this case.)
ReSharper may have given the suggestion to make methods static for those methods which are not using any instance variable or method within it. This is what I have observed.
Similarly, if the methods are not accessed from any other project/assembly, it may give you suggestion to make them internal.

How do I use COM objects in an OOB Silverlight 4.0 application?

I am contemplating building an out of browser Silverlight application. One of the reasons it has to be OOB is because I need to access an old school ActiveX/COM object and that is only allowed OOB.
I am having trouble finding any examples on how to actually integrate a COM object into a Silverlight app. The Add References dialog does not have a COM tab so I am lost.
Any ideas?
Maybe this can help you.
Best

NetDataContractSerializer equivalent for Silverlight?

Has anyone developed or know of a place where I could find a Silverlight implementation of NetDataContractSerializer?
This WCF and Silverlight Comparison states that Silverlight does not ship with an implementation of NetDataContractSerializer.
I'm hoping to avoid developing one myself.
Thanks!
I might be wrong, but I think the Silverlight version of CSLA includes some form of binary serializer. It's not compatible with NetDataContractSerializer I think, so you'll need to use it on both the server and client (CSLA comes in a Windows flavour too). You can get the full framework (with source) for free at http://www.lhotka.net/cslalight/