I'm creating an iOS mobile application using Xamarin. I'm new in mobile development, especially on iOS. I have a table view rows, that have background images. So when I'm changing the iphone version from 5s to 6S, they are stretching. I need them to be auto resizable.
First one is my table view , the second one is the detail view of current row.
Can someone help me with this and at least tell a good topic to read.
Thanks before hands.
Here's what I have now , and I just can't remove that left offset that each row has.
First, you have to set the constraints on your UIImaveView to set the size and the position of your view.
Then, you have to set your UIImageView's Content Mode to Scale To Fill in order to have the image resized automaticaly.
You can take a look at this post to understand all Content Mode available.
Related
I've been working on a UWP application that will initially be deployed only to Surface Pro 4 (Maybe some SP3s) devices but I'm having a real difficult time getting my UI to fit on the screen.
Right now my Designer window is set to '12" Tablet (2160 x 1440) 150% Scale' with it locked in landscape mode (the only way this app will be used) so that the 'Effective: 1440 x 960' resolution is set.
I've got my MainPage page set to 960 x 1440 with a Frame for display content essentially filling the entire 960 x 1440 but when I run the app (either in full screen or windowed) it cuts off the content of my MainPage (not just the frame content but part of my app sidebar menu).
That all being said my question(s): How do I get my UWP to scale my content to fit inside what ever size window the app is displayed in when running (full screen or user adjusted window size), OR what settings do I need/How do I configure it to display my entire MainPage contents on my SP4 screen (2736 x 1824) in fullscreen without just trial/error adjusting elements manually until they fit.
I'm more concerned with the second question because I don't just want this app to do what I want (because I know I can figure it out myself by manually sizing elements) but I want to understand why it's doing what it's doing and the right way to go about doing what I want to do.
I did a lot of searching but could not find the answer to my question, if this is a duplicate please feel free to link the answer.
Thanks in advance.
The Designer just gives you a general guide on how things would look. The demensions are not for SP4 specifically.
At 150% DPI, try setting your MainPage to 1824, 1216.
You can call
ApplicationView.GetForCurrentView().VisibleBounds
at runtime to find how many pixels(epx) that your screen is currently set to.
Note that these are effective pixels. They are different from the physical pixels of the device. All UWP UI measurements are epx based. So when you see this -
<Button Width="24" />
You should know that the value 24 is measured in epx.
To find out what epx really is, give this a read.
I am new to Unity.
I am converting my Sudoku game written in WPF to Unity2D. I converted everything. However I cant achieve 9*9 grid with Buttons as I did in WPF.
In WPF I created 81 buttons with same event. So when it is called I jsut got their position displayed keyboard with only numbers that cell allowed.
Here is what I needed
Here is what I did.
1: I inserted canvas then tried vertical layout(for adding 3 rows) without success
2: Then I tried grid layout with canvas with fixable count column no success
3: grid layout with flexible option still no result.
I also tried via coding using GUI.BOX, and all still the result is not good.
How can I do it?
Do not use GridLayout, it is only for fixed size "icons" - irrelevant here, do not use.
First use VerticalLayoutGroup
include ..
Don't forget you must put a LayoutElement on each of your three items.
Get that working first.
Then, for your MIDDLE item, add a horizontal group and make that work.
I am working with Visual Studio 2010 ReportViewer WinForms.
I have been unable to figure out how to fix the rectangle height in a report. I've tried using a table within the rectangle, also a table in a sub report that is placed in the rectangle of the main report with no success.
Basically, I am setting up an invoice-type report that must keep its' form and should not be allowed to grow so that elements are pushed onto a second page.
Both rectangle and tables will always grow vertically based on the content. There is no way to really stop this.
There are a couple of properties that might be able to help you get the correct page breaking in place:
KeepTogether indicates whether to keep all sections of the data region together on pane page.
When set on true and the region is to large to fit the page, this will add a page-break before the start of the region to try and fit as much as possible on a single page.
So if you wish for the region to start at the initial location but break afterwards, make sure this is to false.
PageBreak has the parameter BreakLocation which can be used to determine a fixed place to add a page-break. You can set it on Start, End, StartAndEnd or Between.
You could split your report in fixed pages and use these to add standard page-breaks in the desired (fixed) locations.
These properties alone might not be enough to get your desired result. Especially when working with tables it is hard to add a page-break after a fixed amount of rows.
It is hard to give you a detailed description of a possible approach with the amount of information you gave me, but here is some general advice.
You should split your data in the correct intervals before sending the datasource to the reporter. You can for example use grouping to place them in the correct intervals and add page-breaks based on the grouping.
Another solution is to add them in separate containers, this will require you to have enough spare data regions at your disposal. If there are too many you can always hide the empty ones based on an expression set for the Hidden property.
It won't be easy to set this up correctly so that it can dynamically grow. It takes a lot of puzzling from your end but pretty much any layout should be possible to achieve.
I wish I could give you a more specific solution to your problem and am willing to help you further if you give me an example to work with. But ultimately this is something you should be able to achieve on your own.
I want to use auto layout for may table view cell content. This worked so far. Now I want to align a UILabel on the right side of the table view. If I do this, it isn't aligned right. Instead it is completely on the left side. So it seems the width of the table view is not calculated when the constraint is applied. I tried two different approaches:
No. 1:
this.ContentView.AddConstraints (NSLayoutConstraint.FromVisualFormat ("H:[iNumberLabel]-|", (NSLayoutFormatOptions)0, null, viewsDictionary));
No. 2:
this.ContentView.AddConstraint (NSLayoutConstraint.Create (iNumberLabel, NSLayoutAttribute.Right, NSLayoutRelation.Equal, this.ContentView, NSLayoutAttribute.Right, 1, 0));
The constraints are added in UpdateConstraints in my table view cell subclass. The code is in C# but that doesn't matter. I would be glad if you could provide a solution.
This format string: "H:|-[iNumberLabel]-|"
tells the system to pin the label to both sides of the cell with the default padding, so the label will be nearly the width of the cell. You should get rid of the spacing to the left side, if you want it right aligned,
"H:[iNumberLabel]-|"
I don't know why the second method didn't work. If that's the only horizontal constraint that you had, it should have worked.
In addition to pinning it to the right side with:
"H:[iNumberLabel]-|"
You should also rightAlight the text with:
cell.textLabel.textAlignment = NSTextAlignmentRight;
Edit: Only working for iOS 8. Currently no solution for iOS 7.
This was the culprit
this.ContentView.TranslatesAutoresizingMaskIntoConstraints = false;
I had this set when I created and added my labels as subview. When this is turned off the width of the cell seems to not get correctly laid out. Perhaps one has to add some additional constraints for the ContentView, but I don't know which (content view to super view?).
Auto resizing mask has to be enabled for the content view.
I am trying to create a Report with two columns.
Records should add in as below...
1.Bob 6.Sarch
2.Sue 7.Barrie
3.Adam 8.James
4.Dave 9.Steve
5.Robin 10.Euan
11.Fred
12.Heidi
13.Liz
For the first column (1-5 in this example), a page break should wrap the data to the second column (6-10). After the second column is full (11-13) the the data should page wrap.
The data used to generate the report will have a fixed number of columns. The height and width required for the data will not change.
I am using with C#, WinForms, .net4. I have tried several various approaches with no success. Thus far I have only managed
1.Bob 2.Sue
3.Adam...
Please help or point me in the right direction :-)
Many Thanks
TL;DR ---> This isn't possible with SSRS, afaik.
If I understand correctly, you want to list the items in a data set, that when rendered with a hard page break renderer will render with these requirements:
items are added vertically as long as there's space on the page
a new column of items is started when the first column ran out of space, vertically
a page break is inserted when the second column filled up the vertical space, thus starting a new, first column on a new page
Now, there's only these controls in SSRS:
Textbox
Table, Matrix
Chart
Gauge
List
Image
Subreport
Line, Rectangle
Out of these only the Tablix (Table/Matrix) and List are remotely capable of such a thing, but they can't satisfy your requirements. I'm afraid the answer to your question is that this can't be (easily) done.
The hard way that this may still be possible is perhaps by creating a custom report item and/or by creating a custom rendering extension. But that may be overkill for just wanting to create a nice little list.