Build a control within a circle/ellipse on Windows phone - windows-phone-8.1

I want to use a circle/ellipse as a design element around a custom control (three text blocks) on Windows Phone. I am having trouble finding any examples. It seems like this should be rather simple.
I want to make the control a little more complex by adding select boxes for two of the text blocks.
Think of it as simply selecting minutes and seconds and then running a timer with a circle around it to differentiate it from other controls on the page.

Related

Move two divs separately with touch

So I have two leavers/divs that i want people to be able slide with iPad/Android on website. At the moment I have tried jQuery UIs slider + touch punch to make it (it's basically slider with two handles) but seems I cannot move two handles simultaneously. With one handle at a time it works great but yes, I would need to have it so you move both handles with two fingers same time.
Is there better way to do this then jQuery UI's slider? I don't really need to get any values or anything from it. Just visual stuff. Could touchmove be option? Can I move div using it?
EDIT. hmm, is it even possible? I think iPad for example takes it always as pinch?

How to force report items to overlap?

I'm trying to create doughnut chart and insert label inside the chart's hole. When I render report, label is being moved outside the chart.
Is it possible to force report items to overlap instead of position it automaticaly?
I was looking for an answer to this earlier! I was trying to overlay a rectangle shape on to an image of a site-map.
Unfortunately the answer is no, due to the way that HTML renders objects:
http://msdn.microsoft.com/en-us/library/dd255248.aspx
Very old question, but page overlapping is supported in hard page break formats, such as PDF, or physical print of a report. Essentially, any other format (such as HTML or the Report Builder tool) will move your items around the page, but if you export that same (non-overlapped) report to PDF, your items will be displayed as you intended, with overlapping items.
See here for further details
You can "Add New Title" at the chart at set its position to "BottomCenter".
Right click the chart and select "Chart">"Add New Title". Place the title bottom centered and resize the text
The result in Report Manager:
Number within a chart
Overall Answer:
Unfortunately, SSRS is not graphic, design, layer friendly. The way it renders objects is based on it's boarders. So overlapping is very difficult, time consuming and in most scenarios not possible. Unless you are good with VB programming you may be able to get by with custom code at the report properites -> Code window. It's sad that powerpoint, word, excel natively have better design capabilities than SSRS. Like who in their right mind would ever think that people only want to see data represented in a tablix or box. SSRS <= 2012 native graphing options are a joke! ~ If you can use SSRS 2016, they may have fixed a lot of those customization options.
What I have tried:
Every possible combination/settings workarounds you can think of and unlimited coffee googling to the max. If you are barely starting this journey to figure it out. Let us save you hours of research and stress so you can meet your deadlines. Either build the design in broken up graphic portions (considering that SSRS will render based on borders). If you can crop images do that as much as you can; I found Windows 10 Paint 3D to be very helpful with that, Out of everything I tried, cropping/breaking apart images was the best alternative to get a better level of customization.

Achieving cyclic tile behavior with Flip tile.

Currently I implemented my Flip Tile with the help of Scheduled Task, So one issue with similar approach is the Flip tile will flip the same image during the time interval. So what I am trying to achieve is I need to flip my images like cyclic tile. Ie one after another manner. One thing to notice here is I am using local (Isolated storage) images as Tile images not remote uri’s. Is it possible to achieve similar implementation in windows phone 8.
If you want to get the behaviour of the CycleTemplate then this is not possible with the FlipTemplate.
If you are trying to achieve having tiles which include a combination of images and text (set as Content in the FlipTemplate) then a solution would be to generate an image which includes the text you're interested in and then use that image, along with any other, in the CycleTemplate.

programmatically create Background Images in Flex 3

I'm developing a visualization for certain parts of a Warehouse with Flex 3. In this visualization there are lot of blocks where 1 to x pallets can be placed where x is between 9 and 15. I need to represent each pallet with a black square, each place which is already assigned to a pallet but not physically taken with a grey square and each free place with a white square. I first thought to just use a canvas for each place on a block and change their color if the state changes. But the hundreds of canvases which are there as a result of this approach are not updated quickly enough for my purposes (screen freezes for a few seconds).
I don't want to use embedded images because of the great amount of images I had to embed in the application (those Images appear in 4 orientations).
My idea was to create background images which reflect the state of the whole block only when needed for that certain state and cache them, so that the computation time is spread over the whole runtime.
My problem now is I don't know how to create them in a way that I can use them as "backgroundImages". As far as I understand I would need them as a class object but I don't know how to achieve that, when not embedding the images.
I'm of course open to better approaches to solve my problem. Thanks for your support.
I would suggest using Graphics property of a Sprite for example. It provides basic drawing API, like drawing lines, circles and rectangles.
Besides, you can draw bitmap images on the Graphics to produce more advances results.

How to implement text selecting?

My question is not language based or OS based. I guess every system is offering some sort of TextOut(text, x, y) method. I am looking for some guidlines or articles how should I implement selection of outputed text. Could not find any info about this.
The only thing which comes to my mind is like this:
When user clicks some point on the text canvas I know the coordinates of this point. I need to calculate where exactly it will be in my text buffer. So I am traversing from the begining of the buffer and I am applying to each character (or block of text) a style (if it has any). After this, I know that after given style the letter has given size. I am adding its width and height to previously calculated X,Y coordinates. In this way, I am traversing the buffer until the calculated position has not reached the point that has been clicked by the user. After I reach the point within range of some offset I have starting point for the selection.
This is the basic idea. I don't know if this is good, I would like to know how this is done for real like for example in Firefox. I know I could browse the sources and if I won't have a choice I'll do it. But first I am trying to find some article about it...
Selecting text is inherently specific to the control which is containing it and the means it stores that text.
A very simple (though questionably inefficient means) is to run the text flow algorithm you are using when clicking on a point and stopping the algorithm when you have reached what is closest to that point. More advanced controls might cache the text layout to make selections or drawing their content more efficient. Depending on how much you value CPU time or memory there are ways to use caches and special cases to make this “hit test” cheaper.
If you can make any assertions (only one font in the control, so every line has the same height) then it is possible to make these tests cheaper by indexing the font layout by lines and then doing simple arithmetic to find out which line was clicked on. If your text control is also using monospace fonts (every character occupies the same width as well as height) then you are in even more luck, as you can jump straight to the character information via a lookup table and two simple divisions.
Keep in mind that writing a text control from scratch is obscenely difficult. For best practice, you should keep the content of the document separate from the display information. The reason for this is because the text itself will need to be edited quite often, so algorithms such as Ropes or Gap Buffers may be employed on the data side to provide faster insertion around the caret. Every time text is edited it must also be rendered, which involves taking that data and running it through some kind of formatting / flow algorithms to determine how it needs to be displayed to the user. Both of these sides require a lot of algorithms that may be annoying to get right.
Unfortunately using the native TextOut functions will not help you. You will need to use methods which give you the text extents for individual characters, and more advanced (multiline for example) controls often must do their own rendering of characters using this information. Functions like TextOut are not built to deal with blinking insertion carets for example, or performing incremental updates on text layouts. While some TextOut style functions may support word wrap and alignment for you, they also require re-rendering the entire string which becomes more undesirable in proportion to the amount of text you need to work with in your control.
You are thinking at a much lower level than necessary (not an insult. you are thinking that you need to do much more work then you need to). Most (if not all) languages with GUI support will also have some form of selectionRange that gives you either the string that was selected or the start and stop indices in the string.
With a modern language, you should never have to calculate pixels and character widths.
For text selection in Javascript, see this question: Understanding what goes on with textarea selection with JavaScript