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.
Questions tagged [viewbox]
358 questions
0
votes
1 answer
In snap.svg how to apply the viewBox attribute?
I asked this question on the snap google, group, but I'll try here too. I'm having trouble applying the viewBox attribute to a new Snap object.
s= Snap(400, 400);
var bodyPath = s.path(bodyUp).attr({ "viewBox":"0 0 1378.4 1332", stroke: '#000',…

icicleking
- 1,029
- 14
- 38
0
votes
3 answers
How do I make the path scale to the container in Flex (View Box)?
I have the following markup:

Brian Genisio
- 47,787
- 16
- 124
- 167
0
votes
1 answer
ViewBox crashes the UWP app
I'm trying to make my interface fit all phone screen resolutions so I thought of using ViewBox since it supposed to scale the content nicely the problem is whenever I wrap the Canvas that has all my elements with the ViewBox like this:
…

Fadi Banna
- 554
- 1
- 10
- 26
0
votes
1 answer
Resizing SVG D3 calendar using viewbox - And making it look pretty
I'm having trouble to get this to look nice when resizing.
I'm sure there is some logic between the parent/child sizes and aspect I'm not understanding. If anyone could give me some pointers it would be much appreciated.
$(window).resize(function…
0
votes
1 answer
How can I dynamically create svg viewboxes from a master svg object using javascript?
I've got a very large and complicated svg element on my page. My goal is to make the svg printable in a variety of sizes all the way up to plotter scale. In the event the graphic is larger than the paper size the image needs to tile to span multiple…

nickvans
- 898
- 13
- 24
0
votes
0 answers
Viewbox positioning trouble, svg moves top left
I m having trouble to position my svg in the middle of the viewbox. I tried to change the coordinate in the transform, however, if I resize the browser, the svg does not stick in the middle.
Below is my code and screenshot of the problem:
function…

Vimlan.G
- 193
- 1
- 13
0
votes
1 answer
Window not Resizing to content
I have a window:

wingerse
- 3,670
- 1
- 29
- 61
0
votes
1 answer
Unable understand how viewbox is working with svg without mentioning viewport i.e. height and width
how the viewbox attribute is working without viewport (i.e. height and width being mentioned),in this case, its taking all the width available, but i don't understand why ?

user3516328
- 99
- 7
0
votes
0 answers
Why is SVG preserveAspectRatio not working? rsvg-convert
I am using SVG graphics to create images for an app I'm working on. As an example I will use one of my simplest images.

William Rosenbloom
- 2,506
- 1
- 14
- 37
0
votes
1 answer
Skip one element from viewBox SVG
I have an SVG with several group elements. I need to apply the viewBox and preserveaspectratio to only one group in that. Is there any way to apply that to one group? or Is there any way to skip some elements from taking the viewBox and…

Fasna
- 564
- 1
- 10
- 28
0
votes
1 answer
WPF FlowDocument will not fill Viewbox container
I have a WPF usercontrol that I want to load with dynamic content in code using a FlowDocument: textblocks, bulleted lists, etc. Content is loaded as expected. And the box sizes looks fine in designer, but in runtime the FlowDocument insists on…

Jakob Lithner
- 4,225
- 6
- 38
- 59
0
votes
1 answer
Specifying a WPF's databound attribute's design-time value in XAML
I'm playing around with a Canvas inside of a Viewbox, and unforunately, the only way to see the elements in the Canvas, I have to assign it a Height and Width. However, the problem is that my Height and Width values come from my ViewModel via…

Dave
- 14,618
- 13
- 91
- 145
0
votes
1 answer
Position SVG Rectangle absolutely outside of viewbox using python
I am generating an SVG image in python. This part of the code works fine and uses a viewbox to position the main image in the right place.
My problem comes because I want to add a background colour. I am adding a rectangle after the main image…

EnduroDave
- 1,013
- 7
- 18
- 37
0
votes
1 answer
make svg graph responsive with viewBox
I have this chart which I try to make responsive.
The original size is width: 800px and height: 400px
I am trying to make it responsive and dependant on the size of the parent div.
- First when I change the width and height to 100%, the chart size…

Bondifrench
- 1,272
- 1
- 20
- 35
0
votes
1 answer
Replacement for ViewBox in free for commercial use framework under Windows
I want to develop windows C/C++ program, but i need
in it functionality like a Viewbox from .NET WPF.
But i don't want buying Visual Studio platform because
it has this control.
Can anyone tell me something replacment for this?
I want to do window,…

Svisstack
- 16,203
- 6
- 66
- 100