xamarin.forms

C#/.Net Core/WPF框架初建(国际化、主题色)

浪尽此生 提交于 2020-12-24 07:43:05
C#/.Net Core/WPF框架初建(国际化、主题色) English | 简体中文 作为 TerminalMACS 的一个子进程模块 - WPF管理端,目前搭建框架部分功能:本地化、国际化、主题色修改等。 导航目录 框架已添加功能说明 1.1. 国际化、本地化 1.2. Metro风格主窗体 1.3. 动态更换主题色 关于TerminalMACS及本WPF管理端 关于项目开源 参考资料 1. 框架已添加功能说明 1.1. 国际化、本地化 源码放在Github上,希望分享给更多人,所以添加了国际化功能,默认支持中、英、日三国语言,按照已有套路扩展其他语言也方便,看下面的效果: 本项目(TerminalMACS的WPF管理端)使用的资源字典存储翻译文件,其他方式还有资源文件、微软官方的国际化方案(未研究)等。下面是翻译文件截图: 三个资源文件使用需要注意: 选择一个默认文件(比如en.xaml,英文)作为默认语言文件,需要将生成操作属性设置为 "页", 设置截图如下: 其他语言文件设置生成操作属性为内容,设置截图如下: 需要将默认语言资源文件添加到App.xaml中,其他语言不用: <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries>

WebView text too small cannot make bigger XForms (4.8)

被刻印的时光 ゝ 提交于 2020-12-23 13:47:12
问题 wondering if anyone can help, the text on the webView is too small, I have an HTML that I have NO control over. How can I increase the size? I have tried Xamarin forms: Webview content default size is too small but did not work for me as the page does not load at all. Is this a bug? Am I missing something? Any suggestions <WebView VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"> <WebView.Source> <HtmlWebViewSource Html="{Binding HtmlSource}" /> </WebView.Source> </WebView>

WebView text too small cannot make bigger XForms (4.8)

一笑奈何 提交于 2020-12-23 13:46:02
问题 wondering if anyone can help, the text on the webView is too small, I have an HTML that I have NO control over. How can I increase the size? I have tried Xamarin forms: Webview content default size is too small but did not work for me as the page does not load at all. Is this a bug? Am I missing something? Any suggestions <WebView VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"> <WebView.Source> <HtmlWebViewSource Html="{Binding HtmlSource}" /> </WebView.Source> </WebView>

WebView text too small cannot make bigger XForms (4.8)

痞子三分冷 提交于 2020-12-23 13:45:48
问题 wondering if anyone can help, the text on the webView is too small, I have an HTML that I have NO control over. How can I increase the size? I have tried Xamarin forms: Webview content default size is too small but did not work for me as the page does not load at all. Is this a bug? Am I missing something? Any suggestions <WebView VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"> <WebView.Source> <HtmlWebViewSource Html="{Binding HtmlSource}" /> </WebView.Source> </WebView>

Xamarin.Forms RadioButtons Text Not Visible

痴心易碎 提交于 2020-12-21 04:12:21
问题 I'm using the experimental radio buttons in Xamarin.Forms , everything was working fine but suddenly the radio buttons text stopped appearing. public RequestsPage() { InitializeComponent(); Device.SetFlags(new string[] { "RadioButton_Experimental" }); // to be able to use radio buttons } 回答1: There was a bug introduced in version 4.8.0 causing the RadioButton text not to show, fortounately this was fixed starting from version 5.0.0 pre-1 and higher. In your Nuget Package manager check the

Xamarin.Forms RadioButtons Text Not Visible

折月煮酒 提交于 2020-12-21 04:11:45
问题 I'm using the experimental radio buttons in Xamarin.Forms , everything was working fine but suddenly the radio buttons text stopped appearing. public RequestsPage() { InitializeComponent(); Device.SetFlags(new string[] { "RadioButton_Experimental" }); // to be able to use radio buttons } 回答1: There was a bug introduced in version 4.8.0 causing the RadioButton text not to show, fortounately this was fixed starting from version 5.0.0 pre-1 and higher. In your Nuget Package manager check the

Month Picker In Xamarin Forms

纵然是瞬间 提交于 2020-12-15 19:20:31
问题 I am having a requirement like a Month picker which is showing only month and year and not the date .How can we achieve the same for both IOS and Android platform using Xamarin forms ? 回答1: You could implement it by using Custom Renderer in Forms create a custom View using System; using System.Collections.Generic; using System.Text; using Xamarin.Forms; namespace App20 { public class MonthYearPickerView :View { public static readonly BindableProperty FontSizeProperty = BindableProperty.Create

Month Picker In Xamarin Forms

旧街凉风 提交于 2020-12-15 19:19:39
问题 I am having a requirement like a Month picker which is showing only month and year and not the date .How can we achieve the same for both IOS and Android platform using Xamarin forms ? 回答1: You could implement it by using Custom Renderer in Forms create a custom View using System; using System.Collections.Generic; using System.Text; using Xamarin.Forms; namespace App20 { public class MonthYearPickerView :View { public static readonly BindableProperty FontSizeProperty = BindableProperty.Create

How can I add an element to a template before a list of elements?

妖精的绣舞 提交于 2020-12-15 06:48:22
问题 I have created a frame with a StackLayout inside of it. What I would like to do is before the items are added to the inside of the frame then I would like Heading label to appear. Here is what I have so far: public class ContentFrame : Frame { StackLayout contentStack { get; } = new StackLayout() { Spacing = 0, Padding = new Thickness(0), Orientation = StackOrientation.Vertical }; public IList<View> Contents { get => contentStack.Children; } public static readonly BindableProperty

Xamarin Show/Hide Password

情到浓时终转凉″ 提交于 2020-12-15 06:43:25
问题 I am trying to create a registration form in Xamarin Forms. And I'm trying to enable the user to see the text input in Password Entry. I'm sorry for this question, but I am new to Xamarin. I saw this solution : Entry show and hide password But i don't know where to put the code. I added it to the MainActivity.cs but it does not work when i debug it using my android Phone. Can someone help me to implement this code to my RegisterPage. this is my code for Entry Password. <Entry Margin="20,0,20