I am making a lot of camera tracking applications. I want to open the selected cameras in a layout. But mostly one camera will be watched. But I also have to do something to watch multiple. I want the screen to be divided into 2 when there are 2 cameras and when there are 3 cameras, the screen will be divided into 4. I couldn't do it with FlowLayoutControl. Because it is necessary to give dimension to the video control that I added. How should I do such a thing. I'm adding a screenshot of the fixed size control insertion part. I did the thing in the image but gave 200x200 dimensions to the controls inside. This is not what I really want to do. I want controls that change dynamically in size according to the number of controls. How do i do this?
Related
I’m writing in c# with Visual Studio 2013. I need to have a pixelPictureBox that the user can zoom (1:1 only) and move what parts show. I also want to make the window it’s in scalable and allow more or less room for the picture. However, this is causing white space to be added when the 2 shapes don’t match, which is not OK. I can take care of properly scaling the pixelPictureBox, but I need to stop the automatic scale from happening. Is there any way to do this? Thanks!
This looks like it's actually a problem with the display panel size and the image size. Before I've zoomed it, the image is bigger than the display area but it still wiggles with a bit of white space when the user drags it one way or the other.
I have a problems with text boxes overlapping when I use an emulator with different screen size. What is the best way to optimize my output so it is independent of phone screen size and resolution?
Here is an example of the issue I am running into
This is written in C# with XAML.
http://1drv.ms/1znAqJ9
thank you in advance for any help.
The reason they Overlap is because I believe you have explicitly defined the Margin Pixels in your Code which does not allow relative scaling on different sized phones.
As per your Images, I see you want text boxes in a Horizontal aligned Format.
So I suggest you Use a Stack Panel with the Orientation Property set to Horizontal and Add all your TextBoxes to the Stackpanel.
Then they will scale automatically in different Resolutions in Emulator.
I am creating a Windows Store app, using XAML and C#.
If for example I run my application on the Windows Simulator (tablet), the layout is perfect. When I run my application on my local machine, the layout does not at all look like what it looks on the simulator.
How do I design my application to fit both perfectly?
Should I have multiple designs, and with start up check screen resolution and choose the layout best suited for that resolution?
Basically, how do I make sure my app will always look its best, no matter on what screen size it my run out there in the real world?
I am currently making use of a Grid for the layout of the controls, 3 columns, and 3 rows, with the Width and Height set to "*". I understand that with larger screen sizes, the column width and row heights will increase, and the opposite for smaller screen sizes.
I am basically just looking for good design practices, as to always try best and avoid massive layout changes.
I attended a Microsoft seminar lastly for 2 days. I asked if ViewBox exist for Windows Store Apps. They said "I don't think so" :)
But it exist :D
I'm sure it will be easy with a ViewBox http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.ui.xaml.controls.viewbox
Put your design in a view box. That's all. We use it for silverlight.
I am trying to populate a large horizontal list with small images.
There may be thousands of these images that need to be scrolled through.
I want to avoid pagination as the non-fluid motion can make distinguishing your position in the list tricky.
I know iOS, Android and Flex have "List Renderer" patterns. How is the best way to accomplish this in Windows Forms?
The list items aren't going to be of uniform sizes. But the size is predicatable without loading the control.
Ie. I can dictate how wide the whole list is going to be, without loading the entire list.
I'm creating a map editor for game in C# Windows Forms. What I need is a grid that will have to store even a few thousands of images.
My first approach was to create a Panel control and then add multiple PictureBoxes to it. Unfortunately 2000 images took about 3 seconds to draw.
Then I decided to try creating Rectangles and drawing Images on them in Panel's OnPaint() method in hope to get better results but it's still very slow.
Is there any better, efficient way to render so many images in Windows Forms?
Thanks in advance for any advices.
Use the Paint event as you have done but...
As part of the loading of the images, cache a zoomed out version where you merge 16 images into one, which is only 125 images, when you zoom out over a certain scale, switch to using the pre-rendered zoomed out version.
You can do that as often as you like for multiple zoom levels with the idea of keeping as few images as possible on screen at anyone time. So you could divide it by 4 again.
I do this for a project which has a map comprised of 65536 images (256 x 256). The cache is also writted to disk so each time you zoom out you see the same number of images. In my editior I can only view 16 images at any one time, even if I'm looking at the whole map.
You can further improve on the this by knowing the available options to the user (e.g. Pan and Zoom) this gives you a limited subset of images the user could potentially view next so you can preload these to improve performance.
You'll increased load time initially but I bet you already have a significant load time pulling 2000 images off disk