Click here to Skip to main content
15,891,204 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: XamlParseException at startup under debug Pin
Mark Salsbery21-Jul-09 8:53
Mark Salsbery21-Jul-09 8:53 
GeneralRe: XamlParseException at startup under debug Pin
Gary Wheeler21-Jul-09 9:20
Gary Wheeler21-Jul-09 9:20 
GeneralRe: XamlParseException at startup under debug Pin
Mark Salsbery21-Jul-09 9:41
Mark Salsbery21-Jul-09 9:41 
GeneralRe: XamlParseException at startup under debug Pin
Gary Wheeler21-Jul-09 9:52
Gary Wheeler21-Jul-09 9:52 
QuestionHow to get Windows-wide DPI Scaling number within WPF Pin
fjparisIII20-Jul-09 7:47
fjparisIII20-Jul-09 7:47 
AnswerRe: How to get Windows-wide DPI Scaling number within WPF Pin
Ian Shlasko20-Jul-09 10:09
Ian Shlasko20-Jul-09 10:09 
GeneralRe: How to get Windows-wide DPI Scaling number within WPF Pin
fjparisIII20-Jul-09 12:20
fjparisIII20-Jul-09 12:20 
GeneralRe: How to get Windows-wide DPI Scaling number within WPF [SOLVED] Pin
fjparisIII21-Jul-09 11:27
fjparisIII21-Jul-09 11:27 
It does work! The beauty of this solution is that it is device-specific, so if Microsoft ever does get around to supporting individual DPI Scalings per monitor, this code will work without change.

Consider the following code snippet:

// Find out which monitor the ViewerWindow should be on.
_left = Monitor.Rect.left;
_top = Monitor.Rect.top;
_width = Monitor.Width;
_height = Monitor.Height;

// Account for the DPI scaling of this monitor.
Matrix m = PresentationSource.FromVisual(this).CompositionTarget.TransformToDevice;
double dpiX = m.M11;
double dpiY = m.M22;
_left /= dpiX;
_top /= dpiY;
_width /= dpiX;
_height /= dpiY;


The original values of _left, _top, _width and _height are the direct result of the monitor properties of the monitor the code is going to display images on. dpiX and dpiY are then the DPI scaling factors of the X and Y directions of that monitor. for 96 DPI (the standard) the values are 1.0. For 120 DPI, the values are 1.25. So I just scale the four monitor dimensions and Voila! Absolute perfection for this particular monitor.

End of story.
QuestionTrying to understand the logical tree and ItemsControl problem Pin
Super Lloyd20-Jul-09 3:19
Super Lloyd20-Jul-09 3:19 
QuestionWPF +WCF Pin
bhavna432120-Jul-09 1:51
bhavna432120-Jul-09 1:51 
AnswerRe: WPF +WCF Pin
Kunal Chowdhury «IN»20-Jul-09 1:56
professionalKunal Chowdhury «IN»20-Jul-09 1:56 
GeneralRe: WPF +WCF Pin
bhavna432120-Jul-09 2:16
bhavna432120-Jul-09 2:16 
GeneralRe: WPF +WCF Pin
Kunal Chowdhury «IN»21-Jul-09 3:01
professionalKunal Chowdhury «IN»21-Jul-09 3:01 
AnswerRe: WPF +WCF Pin
Jammer20-Jul-09 5:34
Jammer20-Jul-09 5:34 
AnswerRe: WPF +WCF Pin
Vijaykishan21-Jul-09 0:15
Vijaykishan21-Jul-09 0:15 
QuestionHow to make groupbox invisble on select of a radiobutton Pin
Krishna Aditya19-Jul-09 20:34
Krishna Aditya19-Jul-09 20:34 
AnswerRe: How to make groupbox invisble on select of a radiobutton Pin
Kunal Chowdhury «IN»19-Jul-09 21:00
professionalKunal Chowdhury «IN»19-Jul-09 21:00 
AnswerRe: How to make groupbox invisble on select of a radiobutton Pin
#realJSOP20-Jul-09 0:23
mve#realJSOP20-Jul-09 0:23 
QuestionWPF: Is there any Flip Book Control available? Pin
Kunal Chowdhury «IN»19-Jul-09 20:08
professionalKunal Chowdhury «IN»19-Jul-09 20:08 
AnswerRe: WPF: Is there any Flip Book Control available? Pin
Pete O'Hanlon19-Jul-09 22:18
mvePete O'Hanlon19-Jul-09 22:18 
QuestionDeriving new class [modified] Pin
#realJSOP18-Jul-09 2:08
mve#realJSOP18-Jul-09 2:08 
QuestionWPF Call to WCF Service - Sessions? Pin
jeremyadell17-Jul-09 14:47
jeremyadell17-Jul-09 14:47 
AnswerRe: WPF Call to WCF Service - Sessions? Pin
Mark Salsbery18-Jul-09 7:09
Mark Salsbery18-Jul-09 7:09 
GeneralRe: WPF Call to WCF Service - Sessions? Pin
jeremyadell18-Jul-09 9:57
jeremyadell18-Jul-09 9:57 
GeneralRe: WPF Call to WCF Service - Sessions? Pin
Mark Salsbery18-Jul-09 16:59
Mark Salsbery18-Jul-09 16:59 

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.