xamarin.forms

Xamarin : Loading resources via GetManifestResourceStream

有些话、适合烂在心里 提交于 2021-02-05 06:09:45
问题 I am working on a Xamarin forms project to use OpenGL/OpenTK. I am trying to load a shader using GetManifestResourceStream. Whatever I do I get null code is being run from .Shared project, shaders are in .ios / .Android resources directory string prefix; #if __IOS__ prefix = "OpenGLTesting.iOS."; #endif #if __ANDROID__ prefix = "OpenGLTesting.Droid."; #endif var assembly = typeof(App).GetTypeInfo ().Assembly; Stream stream = assembly.GetManifestResourceStream (prefix + shaderName + ".glsl");

Xamarin.Forms之主题

百般思念 提交于 2021-02-05 03:09:54
Xamarin.Forms应用程序可以使用 DynamicResource标记 扩展在运行时动态响应样式更改。 此标记扩展类似于StaticResource标记扩展,两者都使用字典键从ResourceDictionary中获取值。 但是,在StaticResource标记扩展执行单个字典查找的同时,DynamicResource标记扩展维护与字典键的链接。 因此,如果替换了与键关联的值,则更改将应用于VisualElement。 这使得可以在Xamarin.Forms应用程序中实现运行时主题。 在Xamarin.Forms应用程序中实现运行时主题的过程如下: 创建一个xaml文件,继承ResourceDictionary,并在其中为每个主题 定义资源 。 使用DynamicResource标记扩展在应用程序中 使用主题资源 。 在应用程序的App.xaml文件中 设置默认主题 。 添加代码以在运行时加载主题。 定义主题 创建xaml文件,主题定义为存储在ResourceDictionary中的资源对象的集合。 以下示例显示了示例应用程序中的LightTheme: < ResourceDictionary xmlns ="http://xamarin.com/schemas/2014/forms" xmlns:x ="http://schemas.microsoft.com

How to add a grid view under Master-Detail detail page in Xamarin Forms?

邮差的信 提交于 2021-02-04 21:42:07
问题 I'm trying to add a grid view at the bottom of the screen containing 'Current Playing' information about a media being played in a media player. The problem is that I want this view to be there no matter what is the page visible. The main layout is a Master-Detail page for the navigation menu panel, where the detail page should contain everything. The detail page can be a content page, a navigation page (mostly) or a modal content page. However, if I might only choose one, I would choose it

How to add a grid view under Master-Detail detail page in Xamarin Forms?

≯℡__Kan透↙ 提交于 2021-02-04 21:42:01
问题 I'm trying to add a grid view at the bottom of the screen containing 'Current Playing' information about a media being played in a media player. The problem is that I want this view to be there no matter what is the page visible. The main layout is a Master-Detail page for the navigation menu panel, where the detail page should contain everything. The detail page can be a content page, a navigation page (mostly) or a modal content page. However, if I might only choose one, I would choose it

Xamarin.Forms Upload Multiple Images with Data

和自甴很熟 提交于 2021-02-04 21:40:50
问题 I have found several tutorials on how to upload an image or multiple images in Xamarin. However, I have not found how to send multiple images with each image containing some satellite data. This is how the model looks like on the server: public class AppFileDTO { public IFormFile File { get; set; } public string CategoryName { get; set; } public string CategoryDescription { get; set; } public string Detail { get; set; } } But the controller needs a list of data. Here is the Asp.Net Web Api

Xamarin.Forms Upload Multiple Images with Data

*爱你&永不变心* 提交于 2021-02-04 21:40:40
问题 I have found several tutorials on how to upload an image or multiple images in Xamarin. However, I have not found how to send multiple images with each image containing some satellite data. This is how the model looks like on the server: public class AppFileDTO { public IFormFile File { get; set; } public string CategoryName { get; set; } public string CategoryDescription { get; set; } public string Detail { get; set; } } But the controller needs a list of data. Here is the Asp.Net Web Api

Loading a font in skiasharp

余生长醉 提交于 2021-02-04 19:14:10
问题 How to use a custom font in skiasharp from Xamarin forms. I tried paint.Typeface = SKTypeface.FromFamilyName("CoText_Bd"); and paint.Typeface = SKTypeface.FromFile("CoText_Bd"); But both didn't worked out. Do i need to access the path of the font using dependency service ? 回答1: If you want trully multiplatform solution, put all SkiaSharp/PaintCode drawing Code into .NET standard library, including fonts as embedded resource (Don't forget to set Build action to Embedded resource!). Then you

Xamarin.Forms.Platform.Android does not exist after Xamarin update from 2.5 to 3.5

时间秒杀一切 提交于 2021-02-04 07:32:07
问题 I have updated my projects Xamarin.Forms NuGet package from version 2.5 to 3.5. After this update I got an error in my Android project saying: The type or namespace name 'Android' does not exist in the namespace 'Xamarin.Forms.Platform' (are you missing an assembly reference?) What I've tried so far: Delete bin, obj folders Close and Reopen solution Clean and Rebuild solution Reinstalling Xamarin Forms NuGet 回答1: @Jaymin is right. You must make sure that the version of the installed Xamarin

Xamarin.Forms.Platform.Android does not exist after Xamarin update from 2.5 to 3.5

北慕城南 提交于 2021-02-04 07:30:08
问题 I have updated my projects Xamarin.Forms NuGet package from version 2.5 to 3.5. After this update I got an error in my Android project saying: The type or namespace name 'Android' does not exist in the namespace 'Xamarin.Forms.Platform' (are you missing an assembly reference?) What I've tried so far: Delete bin, obj folders Close and Reopen solution Clean and Rebuild solution Reinstalling Xamarin Forms NuGet 回答1: @Jaymin is right. You must make sure that the version of the installed Xamarin

Actionsheet with arrow using Xamarin

假如想象 提交于 2021-01-29 22:16:52
问题 I want to show Actionsheet with an arrow in my iPad app. I need this arrow to be displayed at a different position (may be based on the object being tapped) 回答1: I've done it before using with Rg.Plugins.Popup. I created a frame and added a triangular image below the frame. https://github.com/rotorgames/Rg.Plugins.Popup 来源: https://stackoverflow.com/questions/58945863/actionsheet-with-arrow-using-xamarin