Click here to Skip to main content
15,889,502 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: DATAGRID - WPF c# 2010 Pin
Wayne Gaylard25-Apr-11 22:57
professionalWayne Gaylard25-Apr-11 22:57 
GeneralRe: DATAGRID - WPF c# 2010 Pin
arkiboys25-Apr-11 23:02
arkiboys25-Apr-11 23:02 
AnswerRe: DATAGRID - WPF c# 2010 Pin
Pete O'Hanlon25-Apr-11 22:51
mvePete O'Hanlon25-Apr-11 22:51 
GeneralRe: DATAGRID - WPF c# 2010 Pin
arkiboys25-Apr-11 23:04
arkiboys25-Apr-11 23:04 
GeneralRe: DATAGRID - WPF c# 2010 Pin
Pete O'Hanlon25-Apr-11 23:36
mvePete O'Hanlon25-Apr-11 23:36 
GeneralRe: DATAGRID - WPF c# 2010 Pin
arkiboys26-Apr-11 0:08
arkiboys26-Apr-11 0:08 
GeneralRe: DATAGRID - WPF c# 2010 Pin
Pete O'Hanlon26-Apr-11 0:31
mvePete O'Hanlon26-Apr-11 0:31 
QuestionNewbie problem: laying out grid issues in silverlight Pin
Lee Reid25-Apr-11 1:31
Lee Reid25-Apr-11 1:31 
Hi everyone,
I'm very new to silverlight, and trying to build a custom control which is made up of a series of paths/shapes which are of varying sizes.

Is there some sort of container that exists which you can put a series of paths/shapes in, and when stretched it scales the whole lot like you'd scale a picture??

My problem is that whenever the control is resized, (e.g. while building main.xaml) my elements all scale by different amounts, because their margins are not scaled.

e.g. Say the control (200x100) consists of
A Grid (1x1) containing:
--A Large Rectangle 200 x 100 [size of entire control, margins 0]
--A Small Square 50x50 in the centre of the grid, [so margins are 75 L&R, 25 top&Bottom]

When the control is squashed to e.g. 100x50, the margins for the small square are bigger than the entire control (75L+75R = 150), so the square vanishes. Conversely, when the control is doubled in width to 400 pixels, the small square grows not by 2x, but by 5x (from 50pixels to 250 pixels), because the margins are still 150pixels total. I need these margins to scale, so when the control is half the size, so are the margins and visa versa.... Or at least something that emulates that.

I've tried trying to make the grid have a row/column for everything that needs laying out and using the 'star' system, but some of these controls will be made up of 20 or so different paths/shapes of different sizes and locations and it's beyond impractical to implement (also buggy :S ).

Surely there's some sort of container that exists which you can just put paths/shapes in, and when stretched it scales the whole lot like you'd scale a picture??

Help!
AnswerRe: Newbie problem: laying out grid issues in silverlight Pin
Pete O'Hanlon25-Apr-11 4:15
mvePete O'Hanlon25-Apr-11 4:15 
AnswerRe: Newbie problem: laying out grid issues in silverlight Pin
SledgeHammer0125-Apr-11 6:33
SledgeHammer0125-Apr-11 6:33 
GeneralRe: Newbie problem: laying out grid issues in silverlight Pin
Lee Reid25-Apr-11 14:14
Lee Reid25-Apr-11 14:14 
GeneralRe: Newbie problem: laying out grid issues in silverlight Pin
SledgeHammer0125-Apr-11 14:45
SledgeHammer0125-Apr-11 14:45 
GeneralRe: Newbie problem: laying out grid issues in silverlight Pin
Lee Reid25-Apr-11 16:02
Lee Reid25-Apr-11 16:02 
QuestionAny trick for *REUSABLE* "Application" class? Pin
SledgeHammer0121-Apr-11 8:32
SledgeHammer0121-Apr-11 8:32 
AnswerRe: Any trick for *REUSABLE* "Application" class? Pin
Ian Shlasko21-Apr-11 8:46
Ian Shlasko21-Apr-11 8:46 
GeneralRe: Any trick for *REUSABLE* "Application" class? Pin
SledgeHammer0121-Apr-11 8:48
SledgeHammer0121-Apr-11 8:48 
GeneralRe: Any trick for *REUSABLE* "Application" class? Pin
Ian Shlasko21-Apr-11 8:48
Ian Shlasko21-Apr-11 8:48 
GeneralRe: Any trick for *REUSABLE* "Application" class? Pin
SledgeHammer0121-Apr-11 8:59
SledgeHammer0121-Apr-11 8:59 
GeneralRe: Any trick for *REUSABLE* "Application" class? Pin
Ian Shlasko21-Apr-11 9:10
Ian Shlasko21-Apr-11 9:10 
GeneralRe: Any trick for *REUSABLE* "Application" class? Pin
SledgeHammer0121-Apr-11 9:33
SledgeHammer0121-Apr-11 9:33 
GeneralRe: Any trick for *REUSABLE* "Application" class? Pin
Ian Shlasko21-Apr-11 10:00
Ian Shlasko21-Apr-11 10:00 
GeneralRe: Any trick for *REUSABLE* "Application" class? Pin
SledgeHammer0121-Apr-11 11:29
SledgeHammer0121-Apr-11 11:29 
GeneralRe: Any trick for *REUSABLE* "Application" class? Pin
Ian Shlasko21-Apr-11 15:27
Ian Shlasko21-Apr-11 15:27 
GeneralRe: Any trick for *REUSABLE* "Application" class? Pin
SledgeHammer0121-Apr-11 17:06
SledgeHammer0121-Apr-11 17:06 
GeneralRe: Any trick for *REUSABLE* "Application" class? Pin
Ian Shlasko21-Apr-11 17:22
Ian Shlasko21-Apr-11 17:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.