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

SVG viewbox, Image is set to parent element width and not fitted to parent element

I am trying to use the viewbox attribute of SVG to fit the selected area to the screen. The desired effect is that all of the view box area will be shown onscreen, with preserved aspect ratio. Internet explorer and Chrome have the correct behavior…
Peter Saxton
  • 4,466
  • 5
  • 33
  • 51
0
votes
1 answer

How to handle ViewBox

I'm facing problem with handling different screen sizes and the problem is text! I have next section: This is display 1024x768 This is display 2560x1440 On Stack someone gave me hint that ViewBox can help me to solve this problem, ok i try…
Developer
  • 4,158
  • 5
  • 34
  • 66
0
votes
2 answers

WPF: How to implement a panel with adjustable font size?

I have a panel with several TextBlocks. I want to modify this panel such that the font size of each TextBlock changes depending on the size of the panel. The size of the panel can change when the user changes the size of the window (e. g. maximizes…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
0
votes
1 answer

Why does UseLayoutRounding not seem to work with Viewbox?

I'm trying to write a tile-based game in WPF 4. I want the game board to scale to fit the window, so I'm using a Viewbox; but I want each tile to be on a nice, crisp pixel boundary. I might be wrong, but my understanding is that this is what the new…
Joe White
  • 94,807
  • 60
  • 220
  • 330
0
votes
0 answers

Viewbox disappears on restoring the WPF window down

I have a Viewbox Control that contains a WindowsFormsHost which in turn acts as a container to display images.
Maria
  • 77
  • 5
  • 13
0
votes
2 answers

How to create scrollable canvas in WinRT?

I tried this, but I can't scroll the canvas. I tried to handle mousewheel change event of other controls but scrolling is not working. Anybody has idea what I am doing wrong ?
0
votes
1 answer

Why WebBrowser is not shown in a ViewBox on Windows Phonw 8?

I am trying to display a browser in a ViewBox element on a Windows Phone 8 Nokia Lumia. The WebBrowser is displaying when it is alone, but when I put it in a ViewBox element, it does not show. Here is my sample code:
myexec
  • 470
  • 1
  • 4
  • 13
0
votes
1 answer

viewBox doesn't appear to work when width & height is set

I have a viewBox on my svg element. I simply wish for it to scale the svg to scale if the browser screen has been made smaller. However, if I try to set the width & height for my svg symbol also it STOPS scaling. var svg =…
Jose
  • 587
  • 2
  • 6
  • 21
0
votes
1 answer

Drawing semi-transparently on a BitmapImage on an Image in a ContentPresenter in a Viewbox

It seems like variations of this question have been asked before, but not this specifically. Also, it seems that BitmapImages are different from straight Bitmaps. So here we go: I've got a BitmapImage x:Name="HeightMapImage" that is pointing to an…
zetar
  • 1,225
  • 2
  • 20
  • 45
0
votes
1 answer

SVG viewBox affecting fill on text elements

I was trying to display some text filled with a pattern but can't find a way to avoid a strange behaviour with the mapping of my pattern. Here is a code sample of the problem : http://jsfiddle.net/queZM/
Michel
  • 338
  • 1
  • 13
0
votes
0 answers

WPF: How to make images scale together

I am dynamically adding images using view boxes to a UniformGrid. for (int i = 0; i < count; i++) { var viewbox = new Viewbox(); var filePath = "myFilePath"; if (!File.Exists(filePath)) continue; var newImage = new Image(); var…
Chutes
  • 123
  • 1
  • 8
0
votes
1 answer

Viewbox alternative using Winforms

I'm getting used to WPF and it's sometimes very painful to come back to Winforms development. I'm looking for some kind of alternative to the WPF Viewbox for Winforms. Do you have any idea? My major issue is that I need to update dynamically the…
TigrouMeow
  • 3,669
  • 3
  • 27
  • 31
0
votes
0 answers

ViewBox Stretch blurs the controls

ToolTip with numbers is a child UserControl, which is added to Canvas. Canvas is a child of the ViewBox. In order to scale the contents of the Canvas resizing control. The problem is that ToolTip getting blurred. ToolTip itself consists only of…
Mixer
  • 1,292
  • 3
  • 22
  • 41
0
votes
1 answer

Trouble with getting correct viewbox SVG

I am trying to plot some points with svg. They are x,y co-ordinates with a small range: 57.206116 -6.223032 57.2225 -6.2441702 57.233299 -6.1833301 57.246666 -6.210278 57.208561 -6.2244201 When they are plotted they are obviously very…
DGraham
  • 705
  • 2
  • 10
  • 23
0
votes
2 answers

Visibility of ViewBox set from code

On my Window, I have a ViewBox control, which contains a custom progress bar. I set its Visibility to Collapsed in design mode, because I need to display it in only certain moment (during login into app). In my progress bar, which is usercontrol, I…
sinkien
  • 289
  • 1
  • 3
  • 11
1 2 3
23
24