How to create a compiled, redistributable class library in Silverlight? - silverlight

Is it possible to create a small library (similar to a Flash or Flex SWC component) that can be used in Silverlight apps?
Since I'm a Flash and Flex developer, I'll relate it. In Flex, if I have a SWC I can add it to my build path and then immediately use its included classes and functions in my project. Similarly, in Flash if I add a SWC to the Components folder then drag that SWC into my library, I can use the classes in my Flash project.
Does Silverlight have a similar concept? I just need a small code library that I can send to other developers, but it should be pre-compiled so the source is not readily available.
Thanks!

You should not have an issue pre-compiling the "Silverlight Class Library" project type in Visual Studio like you would traditional C# libraries, and release these to developers who can reference them in their Silverlight applications.

Related

Using dotnetbrowser in a WinForm via Com Interop?

We have an application where the main UI is coded in vb6. We also have multiple .net assemblies (winform and class libraries) built in vb.net (VS2015, targeting framework 4.5.2).
Can we utilize the winform dotnetbrowser in a .net assembly that is called via com interop from our vb6 main app?
The licensing articles instruct adding the license to the project as an embedded resourse - would this license be added to the .net assembly as an embedded resource? Or would it need to be added to the main app exe (vb6) as an embedded resource there?
Can we utilize the winform dotnetbrowser in a .net assembly that is called via com interop from our vb6 main app?
Yes, this use-case is possible.
The licensing articles instruct adding the license to the project as an embedded resourse - would this license be added to the .net assembly as an embedded resource? Or would it need to be added to the main app exe (vb6) as an embedded resource there?
There are several ways to provide the licence to DotNetBrowser:
the most common and recommended way is to include the licence into
the application .NET assembly as an Embedded Resource (it is
usually done when performing a build)
the other common way is putting
the licence file into the working directory of the application that
loads and uses DotNetBrowser
at last, you can specify the full path to the
licence file using the DOTNETBROWSER_LICENSE_PATH environment
variable

How do I set a default theme for my Gtk+ application?

I'm building my Gtk+-3.0 application on Windows 7 and I want to change it's default theme. I noticed GIMP does not require the Gtk+ Runtime to be installed in order to render it's
default theme. I can't find any function that sets a given theme at runtime for my application.
Also I considered using CSS styling however that feature was introduced in Gtk+-3.X and GIMP uses Gtk+-2.X as far as I know.
So my question is:
Is it even possible to change the Gtk theme at runtime and if so what functions does the application have to call?
Gimp on Windows probably doesn't require a separate Gtk+ runtime, because it has been bundled in the installer. This means the application lugs along its own libraries and runtime files just like a lot of Windows software usually does. System integration in Windows is pretty miserable (no repositories, libraries or dependency tracking, so almost nobody shares libraries).
I suspect because of this, setting a system wide GTK theme might not be applied everywhere. You can hunt for the gtk rc files, though.
If you want to style a single application, Gtk3 should be able to load custom CSS at runtime. There is an example for Python at http://wolfvollprecht.de/blog/gtk-python-and-css-are-an-awesome-combo/. The API will be similar.

ReactiveUI + Portable Class Library?

I'm porting a WPF app over to Windows Store app. I have some view models that I would like to put into a Portable Class Library. That code uses reactiveui framework. I created the library and I use nuget package manager to add reactiveui to the project. I get this:
Could not install package 'reactiveui-platforms 5.4.0'. You are trying to install this package into a project that targets 'portable-net45+wp80+win', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
Is this really an unsupported configuration or am I doing it wrong?
ReactiveUI-Platforms is specifically only the platform-specific code. You need to just reference ReactiveUI-Core in your PCL and reference ReactiveUI-Platforms in your WPF and Windows Store apps, and everything should work.

How to share DLL with developers?

I'm a graphic designer who is fairly new to XAML and blend. I've been reading a tutorial on Theming and It mentions about sharing DLL's with developers. It does not explain what specific Dll contains my resources to send to the developers. I've created a control library for my resources. Is there a specific Dll file that holds these resources?
Thanks!
When you build a class library project it compiles a dll. Give them that dll
The file will be in bin/(debug or release)/[project].dll

monodroid library in winforms

I am new to MonoDroid so maybe there is an easy answer, but so far searching hasn't turned it up... Since deploying to the Android emulator takes _for_ever_ on my PC, I would like to put most of my logic into a separate library and test it from a separate winforms application. Later, I can build a regular MonoAndroid application that provides the UI and just calls the library. However, when I try to link to the MonoAndroid class library I get this message:
Warning 1 The project 'MonoAndroidClassLibrary1' cannot be referenced. The referenced project is targeted to a different framework family (MonoAndroid)
Is there another way to achieve this objective? Yes, I could simply create a separate standard windows library and copy/paste the code between the two, but there must be a better way
You can use this extension http://msdn.microsoft.com/en-us/library/ff921108%28v=pandp.20%29.aspx
You would need to create a regular .Net 2.0/3.5/4.0/etc class library and copy (or link) your source code files into it. Use this assembly for testing in winforms, and the Android class library copy for Android.
Of course, this will only allow you to write code that doesn't reference anything in the Mono.Android.dll assembly.

Resources