I am using a relative layout inside ContentPage.
within the relative layout it i create childern such as labels, button, and image from from file (using the ImageSource.FromFile method), where the image is all over the screen (like backgroundImage)
what i see when presenting the page,is a black screen with all the labels and button and after one second the image appears.
I can't use BackgroundImage property because the file is created dynamically at runtime...
What is the solution for presenting the image at the same time as the labels / buttons ?
You may try using FFImageLoading. This library can be used with Xamarin.Forms and faster than
https://github.com/luberda-molinet/FFImageLoading
Related
I am trying to place two svg files side by side in a web page. This I have done using susy to create the spans, first one is 2 columns wide, the second 10 columns. I place a narrow bar graph in the first span, and a wide line graph in the second span.
The problem I am having is scaling the graphs. they look like this:
But I want them to look more like this:
They are svg files generated with pygal and I achieved the second image by forcing a size in pygal, but it's not elegant and fails wehn the screen size changes.
How can I make the svg bar chart scale the height without scaling the width and do it dynamically in a web browser instead of manually changing the size in pygal? I also cant manually edit the svg files as they are generated via another system and update frequently.
Your graphs should load in two different divs, so that you can set a different width style for each, depending on a view-based css class (like col based classes in Twitter Bootstrap). If you load dynamic svg's (without any explicit_size setting in Pygal) you should be able to handle different window sizes.
I am new to GWT, I am trying to apply style to the pages that I created using CSS
How do we position the text boxes and other gwt widgets using css, after having positioned them using window builder.
I tried using relative positioning but the text boxes are overlapping with the labels that i dragged and dropped using window builder.
please suggest me how I can style it without the over lapping
You have to alter their style attribute at runtime : you have a good starting point in Declarative Layout with UiBinder.
Object annotated with #UiField are widgets and you can manipulate like this.
I'm using a spark ItemRenderer in a list with useVirtualLayout="true"
The itemRenderer has an image loaded in it.
When the list scrolls, and a new Item is brought into view - the image flickers, briefly showing the previous image in the itemrenderer.
When the itemrenderer is re-used, how can I prevent the flicker?
Is there an event when an itemrenderer is discarded? then I could hide the image or load a blank image.
Try this
A simple way to avoid Flickering images is to give a height according to the total images to show
example
if the List have vertical layout
myList.height = myList.dataProvider.length;
if the List have horizontal layout
myList.width = myList.dataProvider.length;
It depends on how you use the image. I tend to load the image and save its BitmapData ONCE!. Then you can directly use it without any flickering. You just have to inject some sort of ImageRespository into the renderer.
This can easily be done by listing to the rendererAdd event of the DataGroup and stuff the repo into the renderer.
Ok, here is my problem:
I have a vertical layout which contains a QPlainTextEdit and a horizontal layout (containing 2 QPushButtons) below the text edit.
The vertical layout is just a part of GUI, and gets resized depending on screen resolution. Btw. it is a mobile app, so I don't have a lot of space on screen.
Push buttons have some text which is dynamically set, I don't know it from the beginning to code it manually.
My problem occurs when the text in push buttons is big, and my whole vertical layout is expanded to fit the buttons.
How can I make the vertical layout unexpandable? note, that this is different from "fixed" because of different screen resoulutions.
I'd just like the clip the buttons if they do not fit, but keep the layout width untouched.
Anyway to do this?
You'll need to set the maximum width for the buttons, not the layout, which is only widening to fit the wider buttons. Check out the docs on QPushButton and look for QWidget inherited functions called setMaximumSize or setMaximumWidth.
You can always GetWidth() on the button when it is an appropriate size, then setMaximumWidth using that value since you wouldn't ordinarily know this. Pick an appropriate default text size/val and use that to create your "dynamic" default since this is going on screens of varying size.
Would it be possible to show an image in full screen mode using silverlight. I'm looking out for some thing like the full screen option of the flash video players.
You can set
Application.Current.Host.Content.IsFullScreen = true;
this has to be done from a mouse button event or a click, you can't force the user into full screen without some interaction on their part.
Then you'll need to scale the image. If it's in an element that scales automatically, like a Grid cell and the Grid resizes automatically (like if it's the root element on the page and the page doesn't have a width or height specified) then you're good, but otherwise you'll need to handle the Application.Current.Host.Content.FullScreenChanged event and either resize or apply a scale transform to the image or its container to make it fill the screen, and do the same when you go back to non full screen mode.
Set System.Windows.Interop.BrowserHost.IsFullScreen = true.