Wpf materialdesign

This is now handled differently and the below text is not valid for versions after 2019-05-07

MDriven use internally, and you can use in MDriven WPF applications, the MaterialDesign styled controls provided by http://materialdesigninxaml.net/

These nuget assemblies works very well in providing a visual style based on Googles MaterialDesign concept

We have noticed an illusive problem : growing UI's - every second placed controls get a little bit bigger in a never ending loop. I have not been able to pinpoint the exact reason but it looks like if the line under the control is databound to the width of the control and it is as if they influence each other in a ping-pong way that gives the effect of a never ending loop.

In my hunt for a solution (that does not require a replacement of the control templates all together) I have found that setting the MaxWidth of the control stops the behavior (once the MaxWidth is reached). But this is not consistent with what we want - we want controls to adapt to the display grid - and not be restricted by a maxwidth. I also found that the MaxWidth only need to be in effect during the main setup pass of the ViewModel driven UI - after this initial pass the maxwidth can be removed.

Given these findings we are offering a workaround: Set the MaxWidth to the special value 3.14 (pi) - and if that value is found as MaxWidth we will remove it and put auto instead after the initialization.

This page was edited 79 days ago on 02/10/2024. What links here