Is it possible to change the width of the fixed field splitter?

Answered (Verified) This post has 1 verified answer | 2 Replies | 3 Followers Thread's RSS feed.

allpowers
Points 40
Replied On: Mon, Mar 29 2010 10:45 AM Reply

Is it possible to set FixedFieldSplitter's Width property in Style? The following code doesn't seem to do a blessed thing for the width, although the background works fine. 

<

 

Style TargetType="{x:Type igDP:FixedFieldSplitter}">

<

 

Setter Property="Width" Value="1"/>

<

 

Setter Property="Background" Value="Red"/>

</

 

Style>

  • Post Points: 20

Verified Answer

John Doe
Points 69,336
Infragistics Employee
Answered (Verified) Replied On: Mon, Mar 29 2010 11:15 AM Reply
Verified by allpowers

Hello,

This style does work, however, in the control template we are setting other sizes which are bigger than one pixel. That is why you are not seeing any change. If you set it to 10, then you will see it bigger.

If you want to change this, you would have to change the control template and remove the triggers/widths set there. The default templates you can find in the DefaultStyles directory in the Infragistics folder (DataPresenterGeneric_Express.xaml file).

Sincerely,
Alex Fidanov
Developer Support Engineer
www.infragistics.com\support

  • Post Points: 40

All Replies

John Doe
Points 69,336
Infragistics Employee
Answered (Verified) Replied On: Mon, Mar 29 2010 11:15 AM Reply
Verified by allpowers

Hello,

This style does work, however, in the control template we are setting other sizes which are bigger than one pixel. That is why you are not seeing any change. If you set it to 10, then you will see it bigger.

If you want to change this, you would have to change the control template and remove the triggers/widths set there. The default templates you can find in the DefaultStyles directory in the Infragistics folder (DataPresenterGeneric_Express.xaml file).

Sincerely,
Alex Fidanov
Developer Support Engineer
www.infragistics.com\support

  • Post Points: 40
vijay_karajgikar
Points 160
Replied On: Wed, Oct 20 2010 4:04 PM Reply

Hi Alex,

I am trying to style the field splitter from the DefaultStyles provided as per the attached requirement. I am finding problem with the splitter taking up space of the header area. Is it possible for the splitter not to take up the header space at all. 

The XAML style is as below.

<!-- ___________________________ Fixed Field Splitter Style ___________________________ -->

           

           

            <Style TargetType="{x:Type igDP:FixedFieldSplitter}">               

                <Setter Property="Template">

                    <Setter.Value>

                        <ControlTemplate TargetType="{x:Type igDP:FixedFieldSplitter}">

                            <Grid Background="Transparent">

                                <Border x:Name="splitterMainBd" Background="Transparent" BorderBrush="Transparent"

                                        BorderThickness="0" Padding="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>

                                <Border x:Name="splitterHoverBd" BorderBrush="Transparent" BorderThickness="0" Opacity="0"

                                        Padding="0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"

                                        Background="Transparent"/>

                                <Border x:Name="innerStroke" Margin="0" BorderBrush="Transparent" BorderThickness="0" Opacity="0"/>

                                <Grid x:Name="gripperLinesVertical" Visibility="Collapsed" HorizontalAlignment="Center">                                   

                                    <Border Width="25" Height="10" HorizontalAlignment="Center" VerticalAlignment="Bottom"

                                            Background="Red" />

                                </Grid>

                                <Grid x:Name="gripperLinesHorizontal" Visibility="Collapsed" VerticalAlignment="Center" Margin="0,1,0,0">

                                    <Grid.ColumnDefinitions>

                                        <ColumnDefinition Width="0.15*"/>

                                        <ColumnDefinition Width="0.7*"/>

                                        <ColumnDefinition Width="0.15*"/>

                                    </Grid.ColumnDefinitions>

                                    <Border

                                                Height="2"

                                                Grid.Column="1"

                                                HorizontalAlignment="Stretch"

                                                Margin="0,0,0,2"

                                                VerticalAlignment="Center"

                                                Background="{DynamicResource {x:Static igDP:DataPresenterBrushKeys.FixedFieldsSplitterGripperDarkLineBrush}}"

                                                BorderBrush="{DynamicResource {x:Static igDP:DataPresenterBrushKeys.FixedFieldsSplitterGripperLightLineBrush}}"

                                                BorderThickness="0,0,0,1"/>

                                    <Border

                                                Height="2"

                                                Grid.Column="1"

                                                HorizontalAlignment="Stretch"

                                                Margin="0,2,0,0"

                                                VerticalAlignment="Center"

                                                Background="{DynamicResource {x:Static igDP:DataPresenterBrushKeys.FixedFieldsSplitterGripperDarkLineBrush}}"

                                                BorderBrush="{DynamicResource {x:Static igDP:DataPresenterBrushKeys.FixedFieldsSplitterGripperLightLineBrush}}"

                                                BorderThickness="0,0,0,1"/>

                                </Grid>

                            </Grid>

                            <ControlTemplate.Triggers>

                               

                                <MultiTrigger>

                                    <MultiTrigger.Conditions>

                                        <Condition Property="Orientation" Value="Vertical"/>

                                        <Condition Property="IsInHeader" Value="True"/>

                                    </MultiTrigger.Conditions>

                                    <Setter TargetName="gripperLinesVertical" Property="Visibility" Value="Visible"/>

                                    <Setter TargetName="splitterMainBd" Property="Visibility" Value="Collapsed"/>

                                </MultiTrigger>                               

                            </ControlTemplate.Triggers>

                        </ControlTemplate>

                    </Setter.Value>

                </Setter>

                <Style.Triggers>

                    <Trigger Property="Orientation" Value="Vertical">

                        <Setter Property="MinWidth" Value="7" />

                        <Setter Property="BorderThickness" Value="1,0,1,0"/>

                        <Setter Property="Background" Value="{DynamicResource {x:Static igDP:DataPresenterBrushKeys.FixedFieldsSplitterVerticalFillBrush}}"/>

                        <Setter Property="Cursor" Value="Hand" />

                    </Trigger>

                </Style.Triggers>

            </Style>

            <!-- ___________________________ Fixed Field Splitter Style ___________________________ -->


  • Post Points: 5
Page 1 of 1 (3 items) | RSS