Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
270
Styling Recordselector , Headerprefixarea , enlarge the area , checkboxes
posted

I'm creating a touch screen application, when i add the 2 styles included in this post.
my recordselector is changed to a checkbox , and also a checkbox appears in the headerarea
So all is well.

My problem , i would like large checkboxes, say 80*80
What would be the best way to go ?

Thx

<
Style TargetType="{x:Type dg:RecordSelector}" BasedOn="{x:Null}">
<Setter Property="Background"><Setter.Value><Binding Path="DataItem">
<Binding.Converter>
<conv:BrushConverter/>
</Binding.Converter>
</Binding>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type dg:RecordSelector}">
<Grid Background="{TemplateBinding Background}" >
<CheckBox HorizontalAlignment="Center" VerticalAlignment="Center" IsChecked="{Binding Path=DataItem.IsChecked, Mode=TwoWay}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style

>

 

 

 

 

 

<Style TargetType="{x:Type dg:HeaderPrefixArea}"
BasedOn="{x:Static themes:DataPresenterOffice2k7Silver.HeaderPrefixArea}">
<Setter Property="Visibility" Value="Visible" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type dg:HeaderPrefixArea}">
<CheckBox HorizontalAlignment ="Stretch" VerticalAlignment="Stretch" IsChecked="{Binding Path=DataPresenter.DataContext.AllMembersAreChecked, Mode=TwoWay}" 

 

 

 

/>

 

 

 

 

</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

 

Parents
No Data
Reply
  • 69686
    Suggested Answer
    posted

    Hello,

    The best way probably is to set the MinHeight and MinWidth properties to the CheckBox to ensure that this is the size that you will get. Please note that you might also want to increate the RecordSelectorExtent property of the FieldLayoutSettings as well

Children