Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In WPF, how can I set a TextBox MaxHeight according to Two other controls
- <StackPanel
- Name="stkOuter">
- <StackPanel
- Name="stkInner">
- Content...
- </StackPanel>
- <TextBox>
- Content...
- </TextBox>
- </StackPanel>
- stkOuter.ActualHeight-stkInner.ActualHeight
- MaxHeight="{Binding RelativeSource={RelativeSource AncestorType={x:Type StackPanel}},
- Path=ActualHeight,
- Converter={StaticResource MyConverter},
- ConverterParameter={WHAT GOES HERE?}}"
- <TextBox.MaxHeight>
- <MultiBinding Converter={StaticResource myIMultiValueConverter}>
- <Binding /> <!-- bind the first value here -->
- <Binding /> <!-- bind the second value here -->
- ...
- </MultiBinding>
- </TextBox.MaxHeight>
Add Comment
Please, Sign In to add comment