How to force properties to have a value (Dan) - 9/4/2007 9:01 AM PST RRS feed

  • Question

  • By: Dan

    We have 100's (if not thousands) of dialogs to create, we want to make this easy by guys dragging and dropping predetermined styles in Expression Belnd: <Style x:Key="GridRowStyle" TargetType="{x:Type DockPanel}"> <Setter Property="Width"> <Setter.Value> Auto </Setter.Value> </Setter> </Style> However if you drag this from the pallete you then get to mess the width up (it may look right but will it behave correctly?). Is there anyway to force the use of the width defined in the style? <DockPanel Style="{DynamicResource GridRowStyle}"> <Button Style="{DynamicResource ButtonStyle}" Content="B"/> <TextBox Style="{DynamicResource TextStyle}" Text="TextBox" /> </DockPanel> Or do I just suggest using notepad ;-) ? -- Dan
    Wednesday, February 20, 2008 5:49 PM