Questions tagged [viewbox]

The ViewBox is a very useful control in WPF. If does nothing more than scale to fit the content to the available size. It does not resize the content, but it transforms it.

358 questions
0
votes
1 answer

Draw huge svg from an array and scale it within the parent element

I have grabbed the svg file (the map of Russia) and have got the array of paths. Here is the snippet: var states = [ { id: "1", d: [ "m 6477.42,3306.03 -13.31,-25.82 -71.82,-40.46 -52.18,49.61 -52.21,5.21…
GHopper
  • 366
  • 4
  • 15
0
votes
1 answer

itextsharp auto font size and Linebreak only on Spaces

I have a itextsharp Table, with a strict height and width of the Cells. I then get a string that can differ in word count and work length. How can i set the Font size automaticaly to go as big as possible, and only allow breaks after a word has…
nuuse
  • 109
  • 1
  • 11
0
votes
1 answer

User Control with Viewbox - binding Path Data

I have a usercontrol that contains the following Xaml: In the…
cce1911
  • 363
  • 3
  • 20
0
votes
2 answers

SVG for print with scale

I have an SVG file representing a flat in my browser and I need to print the output in a specific scale. I'm using SVG.js to manipulate the SVG content but I can't find a combination of correct viewport viewbox setup to meet my needs. What I know is…
uncleBounty
  • 673
  • 8
  • 14
0
votes
0 answers

Centering on specific points when zooming using SVG viewBox

All other code aside, this question only has to do with the SVG viewBox attribute at the end of line 8: viewBox="0 0 100 100. The question is: What formula can I use to pick an arbitrary point and zoom in specifically on that point, keeping the…
basement
  • 718
  • 8
  • 15
0
votes
0 answers

Viewbox and Canvas

this is my first intervention here. I'm sorry in advance for my poor english and i wish i will be clear. I'm Making a custom control. (i'm a beginner in wpf) his goal is depending of a Property "Type Control". It could be a simpe textblock…
0
votes
2 answers

Does the viewBox attribute work on included SVGs via the IMG tag?

In example1 below is a snippet of the inline SVG code included in the html document. Notice viewbox="0 0 25 25" "zooms" the image on the top left corner so it appears larger than the second example. example 1
basement
  • 718
  • 8
  • 15
0
votes
1 answer

Vertically Center SGV View Box

I'm trying to vertically align a SGV View Box within a DIV through CSS but I keep failing. I'm only capable of horizontally centering it by the width='100%' attribute. Applying some CSS tricks to vertically align it has failed as well. I really have…
theflarenet
  • 642
  • 2
  • 13
  • 27
0
votes
0 answers

Wpf grid inside viewbox not working properly

I'm trying to use a viewbox in order to resize the grid within it. The problem is the after I add grid inside the viewbox it distorts all the grid and its childs. The grid contains a Listview which items have a custom template and style as in the…
Mr. Nobody
  • 340
  • 3
  • 17
0
votes
1 answer

Why Frame does not find local resource when it's placed inside a ViewBox?

I tried to use a control inside a . Source of Frame Control is a page that lay in folder named Pages. And in the page there is just one element. A Rectangle that is filled with XAML vector image. Why this is not display…
user2551669
0
votes
1 answer

Can the Viewbox only contain square Grid inside of it?

I just want to know whether the Viewbox is only capable of containing the Squre elements like square grid or not? Can the Viewbox contain rectangle grids? reason of my question: I'm trying to place rectangle Grid into Viewbox control but when i do…
Keval Langalia
  • 1,762
  • 1
  • 16
  • 29
0
votes
1 answer

SVG : viewbox property strech text inside

I have a histo bar chart with viewbox property on svg element. I can not find a solution with the text inside which is stretched as you can see below. Obviously, I don't want to externalize text elements from g elements. svg path { fill:…
robynico
  • 157
  • 1
  • 12
0
votes
0 answers

SVG text baseline position in Chrome not scale-invariant

I have an SVG containing the words "foo" and "bar": foo
0
votes
1 answer

Scale-In & Centre A Shape in SVG

I have struggling forming the logic of centring an svg shape in SVG. The viewBox scale function is fine, however, I struggle with the centring of the shape using viewBox. Jsbin Here is the code: // SCALE & CENTRE THE TEMPLATE ON SCREEN const svg =…
Kayote
  • 14,579
  • 25
  • 85
  • 144
0
votes
1 answer

Resizing a TextBox so font is correctly displayed when Control is resized

Im looking to style a TextBox so that when the size of my control changes the TextBox and/or font is resized so that it correctly displays. I almost have it working. My Style: