xamarin.mac

Xamarin.Forms: Platform-indepenent application menu

為{幸葍}努か 提交于 2021-02-19 04:39:27
问题 I'm writing a Xamarin.Forms desktop application, and I'll ultimately want to target MacOS and Windows. Does Xamarin.Forms have any platform independent mechanisms which you can use to build the application menu (i.e. the one where you find "File", "Edit", "View", etc; and which appears in the MacOS menu bar at the top of the screen)? The most I've found is the Xamarin.Forms.Menu and Xamarin.Forms.MenuItem classes, but I'm not clear on what they actually do or how to use them. 回答1: Although

Why is my MacOS App Napping despite me instructing it not to

久未见 提交于 2021-02-10 06:12:53
问题 Although this is happening within a Xamarin.Mac project, I think the issue is more to do with MacOS, as the signs are that of App Nap. In my AppDelegate.cs file, I have this: public override void DidFinishLaunching(NSNotification notification) { _activity = NSProcessInfo.ProcessInfo.BeginActivity( NSActivityOptions.Background | NSActivityOptions.LatencyCritical, "You charge $3,500AUD for this laptop and yet " + "can't provide enough resources for a smooth " + "operation of this app in the

Why is my MacOS App Napping despite me instructing it not to

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-10 06:11:37
问题 Although this is happening within a Xamarin.Mac project, I think the issue is more to do with MacOS, as the signs are that of App Nap. In my AppDelegate.cs file, I have this: public override void DidFinishLaunching(NSNotification notification) { _activity = NSProcessInfo.ProcessInfo.BeginActivity( NSActivityOptions.Background | NSActivityOptions.LatencyCritical, "You charge $3,500AUD for this laptop and yet " + "can't provide enough resources for a smooth " + "operation of this app in the

Does Xamarin.mac Support GTK# User Interface

谁说我不能喝 提交于 2021-02-08 07:22:06
问题 I have an application coded with Mono.Mac using GTK# for the UI.I now have access to Xamarin.mac.Im trying to migrate the mono.mac solution to xamarin.mac. I'm trying copy-paste the code from mono.mac to a new xamarin.mac project,but there is no GUI builder in the Xamarin.mac project.So does Xamarin.mac support GTK#? Is there a better way i can migrate? EDIT: My goal is to bundle the mono runtime with the app package so that the user need not install it manually. 回答1: MonoMac .csproj

Does Xamarin.mac Support GTK# User Interface

回眸只為那壹抹淺笑 提交于 2021-02-08 07:20:43
问题 I have an application coded with Mono.Mac using GTK# for the UI.I now have access to Xamarin.mac.Im trying to migrate the mono.mac solution to xamarin.mac. I'm trying copy-paste the code from mono.mac to a new xamarin.mac project,but there is no GUI builder in the Xamarin.mac project.So does Xamarin.mac support GTK#? Is there a better way i can migrate? EDIT: My goal is to bundle the mono runtime with the app package so that the user need not install it manually. 回答1: MonoMac .csproj

How to detect key press on Xamarin.Mac NSTexField?

帅比萌擦擦* 提交于 2021-01-29 03:10:16
问题 I am trying to detect when a user presses enter while editing a single line NSTextField, so as to submit the data they've entered. There doesn't appear to be any events on NSTextField which would be useful, 回答1: You can subclass NSTextField and override the keyUp method: [Register("CustomTextField")] private class CustomTextField : MonoMac.AppKit.NSTextField { public CustomTextField(IntPtr handle) : base(handle) { } public override void KeyUp (NSEvent theEvent) { if (theEvent.KeyCode == 36) {

Xamarin.mac unit test project

久未见 提交于 2021-01-28 04:51:34
问题 I am trying to create a unit test project for a Xamarin Mac Class Library project. .NET NUnit Library Project it doesn't work because I can't add a reference to my Xamarin Mac Class Library so I tried creating a new Xamarin Mac Class Library project and added NUnit Nuget package to it. <package id="NUnit" version="3.5.0" targetFramework="xamarinmac20" /> For the first part it worked because the tests are visible in Test Manager but unfortunately every time I try to run the unit tests I

Visual Studio for Mac cannot select provisioning profile

假装没事ソ 提交于 2020-05-17 07:06:43
问题 I have created a new Mac app project in Xcode, the only change being to specify the bundle id in the target Signing & Capabilities section. I can select the corresponding Provisioning Profile and sign the app. I have created a new Xamarin.Mac project in Visual Studio for Mac 8.5.5 (build 7), the only change being to specify the bundle id in Info.plist. I am unable to select a provisioning profile and so cannot sign the app. The bundle ids are identical. How can I diagnose and fix this problem

Compile OSX app on Windows with Xamarin

社会主义新天地 提交于 2020-03-19 05:44:11
问题 I have a Xamarin Mac app I've been handed to make some changes. I've got everything working correctly as far as Windows Visual Studio Xamarin connecting to Mac Xamarin -- the Mac ssh agent works and whatnot. However, how do I compile the app? When I build it on Windows, it generates an .exe file. Is something supposed to be generated on the Mac side, too? Or do I take that .exe file and somehow package it into an OSX app? I was trying to stay in my Windows environment to do the coding and

Compile OSX app on Windows with Xamarin

偶尔善良 提交于 2020-03-19 05:42:04
问题 I have a Xamarin Mac app I've been handed to make some changes. I've got everything working correctly as far as Windows Visual Studio Xamarin connecting to Mac Xamarin -- the Mac ssh agent works and whatnot. However, how do I compile the app? When I build it on Windows, it generates an .exe file. Is something supposed to be generated on the Mac side, too? Or do I take that .exe file and somehow package it into an OSX app? I was trying to stay in my Windows environment to do the coding and