xaml

How to override/modify the Content property of Frame to accept multiple Views in Xamarin.Forms?

房东的猫 提交于 2021-01-02 05:17:35
问题 Here's the C# template code I have: public class PopupFrame : Frame { public PopupFrame() { this.SetDynamicResource(BackgroundColorProperty, "PopUpBackgroundColor"); this.SetDynamicResource(CornerRadiusProperty, "PopupCornerRadius"); HasShadow = true; HorizontalOptions = LayoutOptions.FillAndExpand; Padding = 0; VerticalOptions = LayoutOptions.Center; } } I am using it like this: <t:PopupFrame> <StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"> <t:PopupHeader Text

How can you restrict/control the navigation routes the user can visit based on login status/role?

穿精又带淫゛_ 提交于 2021-01-01 09:12:33
问题 For my Xamarin.Forms app, I am looking for a way to check if a user has the right role/authentication status to access a page. I know Angular has route guards that can be reused for different routes to check for an authentication status. Is there something similar in Xamarin.Forms? 回答1: Here is an example showing how you can control the visibility or navigation to your pages based on the login status of the user. By default Shell will always displays initially the first element defined in

How can you restrict/control the navigation routes the user can visit based on login status/role?

陌路散爱 提交于 2021-01-01 09:11:30
问题 For my Xamarin.Forms app, I am looking for a way to check if a user has the right role/authentication status to access a page. I know Angular has route guards that can be reused for different routes to check for an authentication status. Is there something similar in Xamarin.Forms? 回答1: Here is an example showing how you can control the visibility or navigation to your pages based on the login status of the user. By default Shell will always displays initially the first element defined in

How can you restrict/control the navigation routes the user can visit based on login status/role?

烈酒焚心 提交于 2021-01-01 09:09:19
问题 For my Xamarin.Forms app, I am looking for a way to check if a user has the right role/authentication status to access a page. I know Angular has route guards that can be reused for different routes to check for an authentication status. Is there something similar in Xamarin.Forms? 回答1: Here is an example showing how you can control the visibility or navigation to your pages based on the login status of the user. By default Shell will always displays initially the first element defined in

How can you restrict/control the navigation routes the user can visit based on login status/role?

人走茶凉 提交于 2021-01-01 09:07:57
问题 For my Xamarin.Forms app, I am looking for a way to check if a user has the right role/authentication status to access a page. I know Angular has route guards that can be reused for different routes to check for an authentication status. Is there something similar in Xamarin.Forms? 回答1: Here is an example showing how you can control the visibility or navigation to your pages based on the login status of the user. By default Shell will always displays initially the first element defined in

Button text always showing in uppercase

旧时模样 提交于 2020-12-30 04:54:40
问题 In my xamarin forms project button text are always show in uppercase format. But I am providing upper and lower case letters in xaml. When I build the solution all the letters are changed to uppercase. 回答1: I'm guessing you see this on Android as it is the default for button text and has been since Lollipop. To change this behavior add the following to your styles.xml file which can be found in the Android project under the Resources then values folders <item name="android:textAllCaps">false<

Button text always showing in uppercase

*爱你&永不变心* 提交于 2020-12-30 04:54:02
问题 In my xamarin forms project button text are always show in uppercase format. But I am providing upper and lower case letters in xaml. When I build the solution all the letters are changed to uppercase. 回答1: I'm guessing you see this on Android as it is the default for button text and has been since Lollipop. To change this behavior add the following to your styles.xml file which can be found in the Android project under the Resources then values folders <item name="android:textAllCaps">false<

How can I do this floating action button where can run even in background mode in Xamarin forms

半腔热情 提交于 2020-12-30 04:48:22
问题 Here's my sample: I need this to be a connection in other apps... Thank you! 回答1: Floating Windows are implemented primarily through the WindowsManager class. Here is a simple sample you could refer to. Create a FloatingService : [Service] class FloatingService : Service,Android.Views.View.IOnTouchListener { WindowManagerLayoutParams layoutParams; IWindowManager windowManager; View floatView; public override void OnCreate() { base.OnCreate(); } [return: GeneratedEnum] public override

How can I do this floating action button where can run even in background mode in Xamarin forms

纵然是瞬间 提交于 2020-12-30 04:45:00
问题 Here's my sample: I need this to be a connection in other apps... Thank you! 回答1: Floating Windows are implemented primarily through the WindowsManager class. Here is a simple sample you could refer to. Create a FloatingService : [Service] class FloatingService : Service,Android.Views.View.IOnTouchListener { WindowManagerLayoutParams layoutParams; IWindowManager windowManager; View floatView; public override void OnCreate() { base.OnCreate(); } [return: GeneratedEnum] public override

WPF window with custom chrome has unwanted outline on right and bottom

感情迁移 提交于 2020-12-29 05:47:49
问题 I have created a WPF window with custom chrome using the Microsoft.Windows.Shell dll. Here is the code for that: <Style TargetType="Window" x:Key="ChromeLessWindowStyle"> <Setter Property="shell:WindowChrome.WindowChrome"> <Setter.Value> <shell:WindowChrome GlassFrameThickness="0" ResizeBorderThickness="5" CornerRadius="5" CaptionHeight="30"> </shell:WindowChrome> </Setter.Value> </Setter> <Setter Property="WindowStyle" Value="None"/> <Setter Property="Template"> <Setter.Value>