xamarin.forms

Remove borders on custom Entry & Editor for Xamarin Forms UWP

断了今生、忘了曾经 提交于 2020-08-10 19:12:46
问题 I am currently working with a UWP project in Xamarin Forms. When i use the default Entry & Editor, it comes with a border that i wish to remove as well as add a rounded background. I have setup the renderer and some code, but the border is still intact. [assembly: ExportRenderer(typeof(Xamarin.Forms.Entry), typeof(MyRenderer))] namespace App1.UWP { class MyRenderer : SearchBarRenderer { protected override void OnElementChanged(ElementChangedEventArgs<Entry> e) { base.OnElementChanged(e); if

[翻译] .NET 官宣跨平台 UI 框架 MAUI

谁都会走 提交于 2020-08-10 17:38:40
MAUI Build 2020 大会上,微软终于正式公布 .NET 上的跨平台框架,正式版将在 .NET 6 和大家见面。 MAUI 是日益流行的 Xamarin.Forms 的进化,Xamarin.Forms 已经有6年历史了。 多年来,UPS,Ernst&Young 和 Delta 等公司一直在利用 .NET 上的 Xamarin 来推动其业务发展。它在帮助小型企业最大化其 95% 以上代码共享的开发投资并击败竞争对手进入市场方面也非常成功。 MAUI 将这一成功扩展到移动设备上,使其包含桌面设备,这是跨两者构建多平台应用程序的最佳方法,尤其是新设备(例如新的Surface Duo)。 MAUI 简化了.NET开发人员的选择,提供了一个堆栈来支持所有现代工作负载:Android,iOS,macOS 和 Windows。 每个平台和 UI 控件的本机功能都可以通过一个简单的跨平台 API 触手可及,您可以在提供不妥协的用户体验的同时共享比以前更多的代码。 单一项目开发体验 MAUI 的构建考虑了开发人员的生产力,包括开发人员需要的项目系统和跨平台工具。MAUI 将项目结构简化为一个针对多个平台的项目,这意味着您只需单击一下鼠标,便可以轻松地将其部署到所需的任何目标,包括台式机,仿真器,模拟器或物理设备。 使用内置的跨平台资源,您可以将任何图像,字体或翻译文件添加到单个项目中,并且

Splash Screen is resizing when switching to Main Activity

久未见 提交于 2020-08-08 10:47:46
问题 im currently working on an xamarin.forms application, which then will get shipped to android and ios. In the end it is just an in app browser implementation of our website, so that cookie handling for our customers is secured. Main Problem right now is that the splashscreen does a resize when switching to the main activity, at least that's what it looks like, this doesn't happen in the Android Emulator with android 9.0, but on my pixel 2 with android 10. But see for yourself: The Application

Splash Screen is resizing when switching to Main Activity

风流意气都作罢 提交于 2020-08-08 10:47:05
问题 im currently working on an xamarin.forms application, which then will get shipped to android and ios. In the end it is just an in app browser implementation of our website, so that cookie handling for our customers is secured. Main Problem right now is that the splashscreen does a resize when switching to the main activity, at least that's what it looks like, this doesn't happen in the Android Emulator with android 9.0, but on my pixel 2 with android 10. But see for yourself: The Application

Binding to StaticResource with a property of View Model in Xamarin.Forms?

走远了吗. 提交于 2020-08-08 05:20:13
问题 I have some custom fonts defined in ResourceDictionary <Application xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Fonlow.VA.App"> <Application.Resources> <ResourceDictionary> <OnPlatform x:TypeArguments="x:String" x:Key="SuperFont"> <On Platform="Android" Value="Super.ttf#Super" /> <On Platform="UWP" Value="/Assets/Super.ttf#Super" /> <!--<On Platform="iOS" Value="OpenSans-Bold" />--> </OnPlatform> <OnPlatform x:TypeArguments="x

Extra bottom and top space in iPhone X in Xamarin form

独自空忆成欢 提交于 2020-08-06 09:15:10
问题 I'm using XAML for UI design my app is working fine in less then Iphone X device.Only problem in Iphone X it's getting top and bottom Extra space. If I use below code for Iphone X Safe area enable, it's getting more space in bottom and top. On<Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(true); I got SafeArea layout setting code here SetUserSafeArea Also i'm using SetHasNavigationBar for disable header navigation title.But there is no luck in Iphone X. NavigationPage

How to Store Lists in Xamarin Forms Settings Plugin

北城以北 提交于 2020-08-06 07:10:21
问题 can anyone please help me for how to Store Lists in Xamarin Forms Settings Plugin. 回答1: In settings Plugin you can store in a key-value fashion, so you can not directly store lists. A workaround can be, you can serialize your list into a json string, and you can store that using a key. And when you need the list back, you can get that json string using the key and deserialize it to the original format. 回答2: The Xamarin Settings plugin is obsolete and no longer maintained. Its functionality

How to use async method in DelegateCommand

浪子不回头ぞ 提交于 2020-08-01 09:43:25
问题 I want to link async method to a delegate command in prism framework in Xamarin.Forms and my question is how to do it? Is below solution correct? Is there exist any pitfall? (deadlock, UI slow or freezing, bad practices, ...) { // My view model constructor ... MyCommand = new DelegateCommand(async () => await MyJobAsync()); ... } private async Task MyJobAsync() { ... // Some await calls ... // Some UI element changed such as binded Observable collections } 回答1: You can use async void directly

Xamarin Form : Master Detail Page : How to disable swipe gesture to load the menu on iOS

こ雲淡風輕ζ 提交于 2020-07-30 05:23:50
问题 I need the screen to draw stuff on it. Since I have a Master Detail Page on the same screen, whenever I draw in a direction as opening the menu, the menu will swipe open at the same time as I draw. Is there a way to stop it from swipe open, but still have the menu button clickable to open it. 回答1: I found the solution: #if __IOS__ IsGestureEnabled = false #endif Setting Is GestureEnabled to false will stop from the menu being swiped open. This value only can be set for iOS. If I set for

How to create a table with vertically sticky header and horizontally sticky first column using Xamarin Forms?

こ雲淡風輕ζ 提交于 2020-07-22 13:10:14
问题 When displaying tabular data, I think that in some cases having an always visible header row and an always visible first column can really improve the readability and the overall usability of a table, especially if there is a lot of data in the table. The problem occurs when the table has to support both horizontal and vertical scrolling. A good example of such a table can be found from the NBA application when viewing box score of a past game. Here's an example image from the NBA Android