ItemsControl Height Binding
Last Post 02 Aug 2016 10:15 PM by Filip Dušek. 1 Replies.
Printer Friendly
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Bernd SUser is Offline
New Member
New Member

02 Aug 2016 08:08 AM

    the Binding -> Height="{Binding ButtonHeight}" <- does not work.
    If I set an explicit value like 144 the height is ok but if I use the binding, the ToggleButton is far to big.

    Is this supported? I try to scale Button sizes with the DPI of the device. So the Image is 48x48 pixel on 96 DPI and 96x96 on 192 DPI etc.


    <ItemsControl ItemsSource="{Binding UnitRoster}">
    <WrapPanel />
    <StackPanel Margin="5" >
    <TextBlock Text="{Binding Name}" />
    <ToggleButton Margin="1" Command="{Binding ViewModel.PlaceUnitCommand}" CommandParameter="{Binding Name}" IsChecked="{Binding IsChecked, Mode=TwoWay}" IsEnabled="{Binding Enabled}" Height="{Binding ButtonHeight}">
    <Image HorizontalAlignment="Center" Opacity="{Binding Opacity}" Source="{Binding Image}" />
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member

    02 Aug 2016 10:15 PM
    Hi, thanks for posting. I will check that out.
    You are not authorized to post a reply.