Extended UIButton border is not initially drawn

This works public class MyButton : UIButton { public MyButton() : base(UIButtonType.RoundedRect) { } public override RectangleF Frame { get { return base.Frame; } set { var temp = TranslatesAutoresizingMaskIntoConstraints; TranslatesAutoresizingMaskIntoConstraints = false; var constraints = new [] { NSLayoutConstraint.Create(this, NSLayoutAttribute.Width, NSLayoutRelation.Equal, null, NSLayoutAttribute.NoAttribute, 1.0f, value.Width), NSLayoutConstraint.Create(this, NSLayoutAttribute.Height, NSLayoutRelation.Equal, null, NSLayoutAttribute.NoAttribute, 1.0f, value.Height) }; AddConstraints(constraints); … Read more

Mixing C# with Objective-C

There is, obviously, no such language as C++/CLI on Mac OS. On Windows, C++/CLI actually compiles as managed code ran by the CLR, that runs native code; since on Mac OS Mono isn’t integrated to the system, it’s rather the other way around. Your app is native, and it can host managed code. Mono exposes … Read more

Is .NET Execution Environment (DNX) similar to Mono?

Yes, DNX compares pretty well to Mono’s mono.exe. Or for that matter the runtime of other VM languages like Java (java.exe) or Python (python.exe). They all solve the same chicken-and-egg problem, they run on operating systems that don’t know beans about the VM. It has to be initialized first, the program’s entry point needs to … Read more

WCF support in Mono

The most comprehensive, concise place to look is probably here: http://go-mono.com/status/ For example, look at System.ServiceModel, etc. for WCF status. You can look class by class at the features that you need. We’re using Mono’s WCF stack to host some basic http services on Linux and a few things don’t work (such as serving up … Read more

nameof with Generics

I would expect some details about the type parameters From the design docs: Result of nameof. The result of nameof depends on the symbols that its argument bound to: One or more members: if all members have the same metadata name then the result of nameof is that name; otherwise it is an error “This … Read more

How to include the reference of DocumentFormat.OpenXml.dll on Mono2.10?

Being new to this myself, here’s what I did: I’m using MS Visual Studio 2010 Pro. Download and install the OpenXML SDK Within my project in Visual Studio, select “Project” then “Add Reference” Select the “Browse” tab In the “Look in:” pull down, navigate to: C:\Program Files(x86)\Open XML SDK\V2.0\lib and select the “DocumentFormat.OpenXml.dll Hit OK … Read more

Bash script: bad interpreter

The first line, #!/bin/bash, tells Linux where to find the interpreter. The script should also be executable with chmod +x script.sh, which it appears you did. It is highly likely that you created this file with a windows editor, which will place a <cr><lf> at the end of each line. This is the standard under … Read more