System.Windows.Media.RenderCapability.Tier returns not the render mode
        Posted  
        
            by happyclicker
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by happyclicker
        
        
        
        Published on 2010-06-17T09:18:54Z
        Indexed on 
            2010/06/17
            9:33 UTC
        
        
        Read the original article
        Hit count: 263
        
I use System.Windows.Media.RenderCapability.Tier to show the current render mode within a diagnostics panel of my app. If I force the app (3.5sp1) to change the render-mode through the following code
HwndSource hwndSource = PresentationSource.FromVisual(visual) as System.Windows.Interop.HwndSource;
HwndTarget hwndTarget = hwndSource.CompositionTarget;
hwndTarget.RenderMode = renderMode;
neither System.Windows.Media.RenderCapability.TierChanged fires, nor has the System.Windows.Media.RenderCapability.Tier property changed. However the changes are applied to the app. If I look with Perforator, the render mode has been changed to the desired mode.
Although I’ve found at many locations that System.Windows.Media.RenderCapability.Tier can be used to detect the current render state (also msdn, see this), it seems, System.Windows.Media.RenderCapability only gives information about the capabilities and not about the current mode. That makes also sense if I look at the name of the class.
Is there another source to know how an actual wpf-content is rendered or am I doing something wrong?
© Stack Overflow or respective owner