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
4
votes
2 answers
Windows store app for all resolution
I trying to make my application working for all resolution for that I used ViewBox .
But ViewBox is not adapting the size of screen.It's somewhat bigger than the screen.
How page should appear for all resolutions :
But Problem is with increasing or…

Nitin Maheshwari
- 213
- 2
- 10
4
votes
1 answer
Blur background with Viewbox
i'm building a similar effect which AERO glass gives you, a blurred window. I quickly realized that is not easy in WPF, but i managed to get it to work almost completely.
I'm just stuck when a Viewbox is involved.
So what i did was: I created a…

dowhilefor
- 10,971
- 3
- 28
- 45
4
votes
1 answer
Zooming To Mouse Point With ScrollView and ViewBox in Wpf
I have some paths drawn to the screen in wpf. The coordinates being used are quite small so they have been made to fill the screen with a view box. I am now trying to implement pan and zoom functionality. I would like to be able to zoom to wherever…

Lukehb
- 454
- 5
- 15
3
votes
1 answer
Getting a TextBlock/Label in Viewbox to Scale without undesirable padding
Here is my very simple xaml:

Adam Nofsinger
- 4,004
- 3
- 34
- 42
3
votes
1 answer
Use Vector Graphics XAML file as an ImageSource in WPF RibbonButton
I converted an Adobe Illustrator file to .xaml using Expression Design 4. Now want to take the ControlTemplate that was generated and use this as as an ImageProperty in the LargeImageSource or SmallImageSource in the MS RibbonControl.RibbonButton.…

billmiller
- 191
- 1
- 2
- 6
3
votes
0 answers
Create and scale image element in svg from input type image base64
So I have a onChange listener on an input type image which triggers the appending of an image element onto the svg. The problem comes when i try to scale the image with viewbox or other methods. The image element is attached to the svg but it only…

Alex
- 71
- 1
- 6
3
votes
2 answers
SVG viewBox with negative coordinates
I want to create re-usable shapes that will automatically scale to fit the size of the given viewPort when used.
My approach is to enclose the shape in a 'symbol' element, and give it a viewBox with the same size as the shape itself.
This seems to…

Frank Millman
- 653
- 1
- 7
- 13
3
votes
1 answer
Items not drawing on Resize of Viewbox, Silverlight
I am currently designing a layout app in Silverlight and have a Canvas inside of a Viewbox. I add shapes to the canvas and they display properly, when I resize the viewbox to zoom in at 2x the height and width, everything still draws properly.
The…

Ty Rozak
- 471
- 6
- 19
3
votes
1 answer
D3, tooltip position, when viewBox is applied
I am creating pie chart.
When hovering segments, I want to display custom html tooltip ...
All the time from the beginning, I was using d3.event.pageX and d3.event.pageY for calculating tooltip locations.
But now I want to display tooltip in the…

bumbeishvili
- 1,342
- 14
- 27
3
votes
1 answer
Two different views of the same svg drawing
I want to make a fairly large diagram using SVG (I have been using Snap.svg in JavaScript). I'd like to display a zoomable portion of the diagram in an element, and also a smaller version of the whole thing in a different element, in which the user…

Tim Erickson
- 582
- 5
- 15
3
votes
3 answers
WPF TextBox Inside ViewBox loses Cursor on resize
I have a textbox inside a viewbox. When I try to resize the window, the textbox size and font size getting scaled, but if I try to focus the textbox and try move the cursor inside the textbox using keyboard, sometimes the cursor is getting…

Ayyappan Subramanian
- 5,348
- 1
- 22
- 44
3
votes
2 answers
Mathematically transform the values in an SVG path to fill the viewBox
So, let's say I have an SVG that looks like this:
3
votes
1 answer
Javascript – Change SVG viewBox with Modernizr Media Queries
i'm trying to change the values of an svg viewbox with javascript and modernizr media queries. however, this is not working. what am i doing wrong?