xamarin.forms

Resizing frame and controls according to device size .Suggestions?

三世轮回 提交于 2021-02-05 09:26:49
问题 I have a frame with 2 buttons and label. What is the best practice to make sure the frame and controls inside resize according to the screen size? Whatever I have tried doesnt seem to do it!!! I thought that flexlayout could do it out of the box ,but cannot make it work. I have used absolute layout to resize the frame. Any suggestions <AbsoluteLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="Lavender"> <Frame Margin="20" AbsoluteLayout.LayoutBounds="0

XamarinForms DataGridView (DevExpress) doesn't show values on some fields

坚强是说给别人听的谎言 提交于 2021-02-05 08:33:25
问题 So I am consuming a Web Service and I have the value: CustomersList with the list of customers. When I bind the Data to my Grid like this: <ContentPage.BindingContext> <vm:ApiVewModel/> </ContentPage.BindingContext> <dxg:DataGridView x:Name="grid" ItemsSource="{Binding CustomersList}"> </dxg:DataGridView> I can see the Grid but I see only certain fields like OID and CategoryFPA. The other columns are shown but they are empty. While in the Json (response) they have a value. Any idea of what is

Xamarin Forms Shell TitleView does not center image

我的未来我决定 提交于 2021-02-05 07:57:06
问题 I have an app that uses the new Shell in Xamarin.Forms. I added the following code to one of my pages in an attempt to use the TitleView area to display my app header image centered. (FYI - I have tried Center for both of the alignment options and it made no difference.) <Shell.TitleView> <Image Source="UCIApp.png" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" /> </Shell.TitleView> What I get after doing this is the image in the title bar but centered in the space the

Xamarin forms global storage

ぐ巨炮叔叔 提交于 2021-02-05 07:48:32
问题 I am new to xamarin forms. I am working on an app with 3 pages. One of the pages has a listview. Clicking on a row takes you to another page. I want to make this available for authenticated users only. You have to be logged in to use this feature. I have been looking online and no luck. Is there anything like session in xamarin forms? Is there anything I can use for storage which all pages can have access to? Any ideas/link will be appreciated 回答1: As Jason mentions, use Application.Current

Animation doesn't show steps-in-between

北慕城南 提交于 2021-02-05 06:38:05
问题 I have created a simple function that would "animate" the cell backcolor at a tap, it works perfectly fine: Color nOldColor = _grid.BackgroundColor; for (int i = 0; i <= 100; i += 5) { double f = (double)i / (double)100; Color nNewColor = PCLHelper.BlendColors(nOldColor, Color.Red, f); _grid.BackgroundColor = nNewColor; _label1.BackgroundColor = nNewColor; await Task.Delay(5); } _grid.BackgroundColor = nOldColor; _label1.BackgroundColor = nOldColor; Now I wanted to do the same with an

How to retrive json string from Url in Xamarin.forms pcl

限于喜欢 提交于 2021-02-05 06:34:09
问题 For example i have URL http://www.pizzaboy.de/app/pizzaboy.json As WebClient is not supported in Xamarin.forms PCL , i went with Xamarin documentation of using web services in forms and followed this example . Link I have tried all what i can do go get the json string . but its not working . below code doesn't work for mentioned URL public async Task<List<TodoItem>> RefreshDataAsync () { var uri = new Uri ("http://www.pizzaboy.de/app/pizzaboy.json"); HttpClient myClient = new HttpClient();

Xamarin Forms Custom Navigation Transitions

◇◆丶佛笑我妖孽 提交于 2021-02-05 06:19:45
问题 I am aware that this question has been asked before but most of them are from over a year ago and I am wondering whether the issue still persists. Does Xamarin Forms still provide no support on custom navigation page transitions? I know that you can make animations well in the native applications but it seems from my research that Xamarin Forms requires either a custom renderer or package for doing a simple custom page transition. Has this changed at all or is that still the norm? Hoping they

Xamarin Forms Custom Navigation Transitions

痴心易碎 提交于 2021-02-05 06:18:42
问题 I am aware that this question has been asked before but most of them are from over a year ago and I am wondering whether the issue still persists. Does Xamarin Forms still provide no support on custom navigation page transitions? I know that you can make animations well in the native applications but it seems from my research that Xamarin Forms requires either a custom renderer or package for doing a simple custom page transition. Has this changed at all or is that still the norm? Hoping they

Xamarin : Loading resources via GetManifestResourceStream

大城市里の小女人 提交于 2021-02-05 06:10:51
问题 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 : Loading resources via GetManifestResourceStream

北慕城南 提交于 2021-02-05 06:10:33
问题 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");