Dynamically stretch Textbox in DataFormDataField

12 posts, 1 answers
  1. Leos
    Leos avatar
    57 posts
    Member since:
    Jul 2010

    Posted 25 Jul 2011 Link to this post

    Hi,
    I have RadDataGrid, GridSplitter and RadDataForm in my form.
    In RadDataForm are 4 fields defined in DataTemplate, last TextBox is for Description.
    <DataTemplate x:Key="tplForm">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="50"/>
                <RowDefinition Height="50"/>
                <RowDefinition Height="50"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <telerik:DataFormDataField Label="Id" Grid.Row="0"
                DataMemberBinding="{Binding Id,Mode=TwoWay}" IsReadOnly="True" />
            <telerik:DataFormComboBoxField Label="Subject"  Grid.Row="1" 
               ItemsSource="{Binding Source={StaticResource dcp},Path=DataSource.ViewSubjekt}" 
              DisplayMemberPath="Nazev" SelectedValuePath="Id" 
              DataMemberBinding="{Binding SubjektId,Mode=TwoWay}" />
            <telerik:DataFormDateField Label="Date"  Grid.Row="2" 
                 DataMemberBinding="{Binding Datum,Mode=TwoWay}"/>               
            <telerik:DataFormDataField Label="Description" Grid.Row="3"
                 VerticalContentAlignment="Stretch" >
                <telerik:DataFormDataField.ContentTemplate>
                    <DataTemplate>                           
                            <TextBox Text="{Binding Popis,Mode=TwoWay}" 
                                     AcceptsReturn="True"                  
                                     TextWrapping="Wrap"
                                     VerticalAlignment="Stretch"/>
                    </DataTemplate>                       
                </telerik:DataFormDataField.ContentTemplate>
            </telerik:DataFormDataField>
        </Grid>
    </DataTemplate>

    I need to enlarge last textbox (Desription), when GridSplitter is moved up.
    For now, RadDataForm is enlarged but TextBox is the same - only empty space below this last field in bigger.
    Thank you very much.
    Leos
  2. Leos
    Leos avatar
    57 posts
    Member since:
    Jul 2010

    Posted 28 Jul 2011 Link to this post

    I am adding two pictures.
    First picture shows required state, where "Note" textbox is correctly stretched to browser border (and englarges in relation to splitter position and/or browser window changes).
    Second picture is with RadDataForm with Height and Width properties not specified for Note field. One row without vertical stretch, no wrapping, no horizontal limits.

    Telerik, please send me some example, how to create the same behaviour as is on picture 1.
    Thanks.

    I uploaded example with this easy solution here:
    http://www.edisk.cz/stahni/83116/TextboxWrapTest.zip_28.72KB.html
    or
    https://rapidshare.com/files/3177392232/TextboxWrapTest.zip
  3. DevCraft banner
  4. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 28 Jul 2011 Link to this post

    Hi Leos,

    This TextBox won't wrap as long as its parent panel provides it the space it needs to display the text. In your case there are no measurement constraints, so this place can be unlimited. Please, try setting MaxWidth of this TextBox, in order to make it wrap the text when this value is reached.

    Kind regards,
    Ivan Ivanov
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  5. Leos
    Leos avatar
    57 posts
    Member since:
    Jul 2010

    Posted 28 Jul 2011 Link to this post

    See picture, I need to have "Note" TextBox in red space (on picture is this field limited to 800 horizontally and vertically by text length).
    I do not want  (and cannot) specify 800x300 or 2000x1500 or something similar.
  6. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 29 Jul 2011 Link to this post

    Hi Leos,

    Please, try measuring it like it is illustrated in the attached project. You can specify your own values that fit your needs best.

    Kind regards,
    Ivan Ivanov
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  7. Leos
    Leos avatar
    57 posts
    Member since:
    Jul 2010

    Posted 29 Jul 2011 Link to this post

    Sorry, from my point of view none of "Height", "Width", "MaxHeight", "MaxWidth" values solved this problem.

    One user has monitor with 1024x800 pixels, second with 2560x1600. Third has opened Adobe Reader and Browser together and is rewriting some text from PDF to "Notes" field.

    Width of my TextBox must be dynamically changed with browser to have text correctly wrapped. Height can be scrolled, if needed.

    I mean that solution is in specifing ControlTemplate of RadDataForm, but I do not know how. Here is part of Template but how to change it to use with my own fields and replace "StackPanel" layout with  "Grid" layout??

    <Border BorderBrush="{StaticResource DataFormPanel_Border}" BorderThickness="0,0,0,1" Grid.Row="2">
     <StackPanel Orientation="Vertical">
      <Telerik_Windows_Controls_Data_DataForm:AutoGeneratedFieldsPresenter x:Name="PART_AutoGeneratedFieldsPresenter" AutoGenerateFields="{Binding AutoGenerateFields, RelativeSource={RelativeSource TemplatedParent}}" CurrentItem="{Binding CurrentItem}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
      <ContentPresenter x:Name="PART_FieldsContentPresenter" Content="{Binding CurrentItem}"/>
     </StackPanel>
    </Border>

    L.
  8. Answer
    Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 29 Jul 2011 Link to this post

    Hello Leos,

    Well, you can achieve such horizontal measurement by finding PART_ItemScrollViewer in RadDataForm's template and disabling its horizontal scrolling, leaving DataFormFields' width to "Auto". However, since you cannot force this textbox to occupy the remaining space vertically, I would advise you to disable do vertical scrolling too and hardcode some height value that is large enough. Please, refer to the attached project.

    Best wishes,
    Ivan Ivanov
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
  9. Leos
    Leos avatar
    57 posts
    Member since:
    Jul 2010

    Posted 02 Aug 2011 Link to this post

    I did mark it as answer, it is working correctly for horizontal resizing and is acceptable for vertical resize.
    But will be nice to have more easy way in future :)
  10. Michael
    Michael avatar
    35 posts
    Member since:
    Jan 2012

    Posted 22 Oct 2012 Link to this post

    Hy,

    sorry for reopen this topic.

    But I have the same problem.

    The marked solution is working for me too, but i will get an "Unhandled Error" when i change in EDIT mode and press the "Cancel" button.

    Can you reproduce this bug and give me a solution for that?

    Cheers
    Mike
  11. Michael
    Michael avatar
    35 posts
    Member since:
    Jan 2012

    Posted 22 Oct 2012 Link to this post

    The same happens in the "New Item" mode
  12. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 22 Oct 2012 Link to this post

    Hi,

    Would you please test this with our latest internal build for Q2, or Q3, as we have fixed a similar issue recently?

    Greetings,
    Ivan Ivanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  13. Michael
    Michael avatar
    35 posts
    Member since:
    Jan 2012

    Posted 22 Oct 2012 Link to this post

    Im using Telerik version 2012.03.1017.1050.

    I already have found a solution for the problem!

    I have read out the current resourceDictionary for RadDataForm and changed the
    ScrollViewer.HorizontalScrollBarVisibility
     and 
    ScrollViewer.VerticalScrollBarVisibility
    
    to Disabled. Now it works like befor.

    <SolidColorBrush x:Key="ValidationSummary_BorderBrush" Color="White"/>
        <SolidColorBrush x:Key="ValidationSummary_Background" Color="#FFBFBFBF"/>
        <SolidColorBrush x:Key="ControlOuterBorder" Color="#FF848484"/>
        <Telerik:Office_BlackTheme x:Key="Theme" />
        <SolidColorBrush x:Key="ValidationSummary_Foreground" Color="#FFFF0000"/>
        <TelerikDataForm:DescriptionVisibilityConverter x:Key="DescriptionVisibilityConverter" />
        <SolidColorBrush x:Key="DataForm_HeaderOuterBorder" Color="#FF282828"/>
        <LinearGradientBrush x:Key="DataForm_HeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FF5B5B5B" Offset="1"/>
            <GradientStop Color="#FF868686"/>
            <GradientStop Color="#FF4F4F4F" Offset="0.42"/>
            <GradientStop Color="#FF0E0E0E" Offset="0.43"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="DataForm_HeaderInnerBorder" Color="#FFB5B5B5"/>
        <SolidColorBrush x:Key="DataForm_HeaderForeground" Color="White"/>
        <SolidColorBrush x:Key="DataFormPanel_Border" Color="#FF848484" />
        <LinearGradientBrush x:Key="DataForm_FooterPanel_Background" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFB5B5B5"/>
            <GradientStop Color="#FFF0F0F0" Offset="0.5"/>
        </LinearGradientBrush>
        <Telerik:InvertedBooleanToVisibilityConverter x:Key="InvertedBooleanToVisibilityConverter"/>
        <LinearGradientBrush x:Key="Background_Disabled" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#7F000000"/>
            <GradientStop Color="#7F000000" Offset="1"/>
            <GradientStop Color="#33000000" Offset="0.5"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="NagigatorIconColor" Color="Black" />
        <SolidColorBrush x:Key="DataField_Foreground"  Color="Black"/>
        <SolidColorBrush x:Key="ControlBackground" Color="White"/>
        <SolidColorBrush x:Key="DataField_Background" Color="Transparent"/>
        <SolidColorBrush x:Key="DataField_BorderBrush" Color="Transparent"/>
        <SolidColorBrush x:Key="DataForm_CollectionNavigator_Border" Color="#FF848484"/>
        <LinearGradientBrush x:Key="DataForm_CollectionNavigatorBackground" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="White" Offset="0"/>
            <GradientStop Color="#FFCDCDCD" Offset="1"/>
            <GradientStop Color="#FFCECECE" Offset="0.42"/>
            <GradientStop Color="#FFAFAFAF" Offset="0.43"/>
        </LinearGradientBrush>
     
        <ControlTemplate x:Key="DataFormValidationSummaryTemplate" TargetType="TelerikDataForm:DataFormValidationSummary">
            <Border BorderThickness="0,1,0,0" BorderBrush="{StaticResource ValidationSummary_BorderBrush}" Background="{StaticResource ValidationSummary_Background}" Height="{TemplateBinding Height}">
                <ItemsControl IsTabStop="False" ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Errors}" >
                    <ItemsControl.Style>
                        <Style TargetType="ItemsControl">
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate>
                                        <ScrollViewer IsTabStop="False" Name="ScrollViewer" BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="0,0,0,1" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto" Telerik:StyleManager.Theme="{StaticResource Theme}">
                                            <ItemsPresenter/>
                                        </ScrollViewer>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="ItemTemplate">
                                <Setter.Value>
                                    <DataTemplate>
                                        <StackPanel Orientation="Horizontal">
                                            <TextBlock Foreground="{StaticResource ValidationSummary_Foreground}" Margin="5,5,0,5" FontWeight="Bold" Text="{Binding SourceFieldDisplayName}"/>
                                            <TextBlock Foreground="{StaticResource ValidationSummary_Foreground}" FontWeight="Bold"  Text=":" Margin="0,5,0,0" />
                                            <TextBlock Margin="5,5,0,5" Text="{Binding ErrorContent}" />
                                        </StackPanel>
                                    </DataTemplate>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="MaxHeight" Value="75"/>
                        </Style>
                    </ItemsControl.Style>
                </ItemsControl>
            </Border>
        </ControlTemplate>
     
     
        <ControlTemplate x:Key="RadDataFormTemplate" TargetType="TelerikControls:RadDataForm">
            <Border x:Name="PART_RootElement"  BorderBrush="{TemplateBinding BorderBrush}"  BorderThickness="{TemplateBinding BorderThickness}">
                <Grid x:Name="PART_DataFormGrid" Background="{TemplateBinding Background}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border x:Name="Header" Visibility="{Binding Header,RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DescriptionVisibilityConverter}}"  BorderThickness="1" BorderBrush="{StaticResource DataForm_HeaderOuterBorder}" Margin="-1,-1,-1,0">
                        <Border Background="{StaticResource DataForm_HeaderBackground}" BorderBrush="{StaticResource DataForm_HeaderInnerBorder}" BorderThickness="1">
                            <ContentControl  x:Name="PART_ContentPresenter" Margin="4,6,4,6" Foreground="{StaticResource DataForm_HeaderForeground}" FontWeight="Bold" VerticalContentAlignment="Top" HorizontalContentAlignment="Stretch" Content="{TemplateBinding Header}" VerticalAlignment="Center"/>
                        </Border>
                    </Border>
                    <TelerikDataForm:CollectionNavigator x:Name="CollectionNavigator" Telerik:StyleManager.Theme="{StaticResource Theme}" Grid.Row="1"/>
                    <Border BorderBrush="{StaticResource DataFormPanel_Border}"  Grid.Row="2"  BorderThickness="0,0,0,1">
                        <ScrollViewer x:Name="PART_ItemsScrollViewer" IsTabStop="False"  Telerik:StyleManager.Theme="{StaticResource Theme}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled">
                            <StackPanel Orientation="Vertical">
                                <TelerikDataForm:AutoGeneratedFieldsPresenter x:Name="PART_AutoGeneratedFieldsPresenter" AutoGenerateFields="{Binding AutoGenerateFields,RelativeSource={RelativeSource TemplatedParent}}" Telerik:StyleManager.Theme="{StaticResource Theme}"  />
                                <ContentPresenter x:Name="PART_FieldsContentPresenter" />
                            </StackPanel>
                        </ScrollViewer>
                    </Border>
     
                    <TelerikDataForm:DataFormValidationSummary x:Name="PART_ValidationSummary" Grid.Row="3" Visibility="{TemplateBinding ValidationSummaryVisibility}" Margin="0,0,0,-1"  Telerik:StyleManager.Theme="{StaticResource Theme}"/>
     
                    <Border x:Name="FooterPanel_Background" Background="{StaticResource DataForm_FooterPanel_Background}" Grid.Row="4">
                        <StackPanel x:Name="PART_FooterPanel" Orientation="Horizontal" HorizontalAlignment="Right">
                            <Telerik:RadButton x:Name="PART_CommitButton" MinWidth="48"  MinHeight="20" Margin="2,4,4,4" Telerik:StyleManager.Theme="{StaticResource Theme}" Command="TelerikControls:RadDataFormCommands.CommitEdit" Content="{TemplateBinding CommitButtonContent}" />
                            <Telerik:RadButton  x:Name="PART_CancelButton" MinWidth="48" MinHeight="20" Margin="2,4,4,4" Telerik:StyleManager.Theme="{StaticResource Theme}" Command="TelerikControls:RadDataFormCommands.CancelEdit" Content="{TemplateBinding CancelButtonContent}" />
                        </StackPanel>
                    </Border>
                    <Border x:Name="Background_Disabled" Visibility="{Binding IsEnabled, Converter={StaticResource InvertedBooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}"  Grid.RowSpan="5" Background="{StaticResource Background_Disabled}" IsHitTestVisible="False"/>
                </Grid>
            </Border>
        </ControlTemplate>
     
         
        <ControlTemplate x:Key="AutoGeneratedFieldsPresenterTemplate"  TargetType="TelerikDataForm:AutoGeneratedFieldsPresenter">
            <ItemsControl IsTabStop="False" ItemsSource="{TemplateBinding Fields}">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <VirtualizingStackPanel Orientation="Vertical" />
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </ControlTemplate>
     
         
        <ControlTemplate x:Key="DataFormDataFieldTemplate" TargetType="TelerikControls:DataFormDataField">
            <Border x:Name="PART_RootElement" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                <Grid x:Name="PART_DataFormDataFieldGrid" Margin="{TemplateBinding Padding}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="2*"/>
                        <ColumnDefinition Width="24"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <ContentControl x:Name="PART_Label" IsTabStop="False" Content="{TemplateBinding Label}" Foreground="{TemplateBinding Foreground}"  Margin="5,0" ContentTemplate="{TemplateBinding LabelTemplate}"/>
                    <ContentPresenter Grid.Row="1" x:Name="PART_ContentPresenter" Grid.Column="1" Content="{TemplateBinding Content}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="5,0"/>
                    <Grid Grid.Row="1" x:Name="DescriptionIcon" Visibility="{Binding Description, Converter={StaticResource DescriptionVisibilityConverter},RelativeSource={RelativeSource TemplatedParent}}" Grid.Column="2" Width="16" Height="16"  Margin="4,0">
                        <ToolTipService.ToolTip>
                            <ToolTip Telerik:StyleManager.Theme="{StaticResource Theme}"  Content="{TemplateBinding Description}"/>
                        </ToolTipService.ToolTip>
                        <Ellipse>
                            <Ellipse.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF68A2DB" Offset="0"/>
                                    <GradientStop Color="#FF2C6CC0" Offset="1"/>
                                </LinearGradientBrush>
                            </Ellipse.Fill>
                        </Ellipse>
                        <Ellipse Margin="1">
                            <Ellipse.Stroke>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFA2C2E6" Offset="0"/>
                                    <GradientStop Color="#FF558DD3" Offset="1"/>
                                </LinearGradientBrush>
                            </Ellipse.Stroke>
                        </Ellipse>
                        <Path Data="M3.3820179,7.7910166 C3.9343026,7.7910166 4.3820181,8.2387314 4.3820181,8.7910166 C4.3820181,9.3433018 3.9343026,9.7910166 3.3820179,9.7910166 C2.8297331,9.7910166 2.3820179,9.3433018 2.3820179,8.7910166 C2.3820179,8.2387314 2.8297331,7.7910166 3.3820179,7.7910166 z M3.4866922,0 C4.5602031,0 5.4141321,0.28477871 6.0484791,0.8543362 C6.682826,1.423894 6.9999995,2.0868769 7.0000005,2.8432846 C6.9999995,3.2620106 6.8835549,3.6582246 6.6506658,4.0319262 C6.4177752,4.4056277 5.9253707,4.9212208 5.1568441,5.55825 C4.366394,6.2134514 4.350769,6.7758508 4.350769,6.7758508 C4.350769,6.7758508 2.382019,6.776 2.382019,6.776 C2.382019,6.776 2.460144,5.5571427 3.9524715,4.4033766 C4.511868,3.97089 4.8241448,3.6582246 4.9306087,3.5186491 C5.0947404,3.2980301 5.1768064,3.0548987 5.1768064,2.7892554 C5.1768064,2.4200568 5.0315275,2.103761 4.7409697,1.8403683 C4.4504123,1.5769768 4.0589356,1.4452807 3.56654,1.4452801 C3.0918882,1.4452807 2.6948667,1.5826048 2.3754754,1.8572525 C2.0560837,2.1319013 1.836502,2.5506272 1.7167301,3.1134305 L0,2.8973138 C0.048795935,2.0913794 0.38704056,1.40701 1.0147338,0.84420568 C1.6424271,0.28140187 2.4664133,0 3.4866922,0 z" Margin="4.618,3.209,4.382,3" RenderTransformOrigin="0.499999968851403,0.346031483547006" Stretch="Fill" >
                            <Path.Fill>
                                <SolidColorBrush Color="White">
                                    <SolidColorBrush.RelativeTransform>
                                        <MatrixTransform Matrix="Identity"/>
                                    </SolidColorBrush.RelativeTransform>
                                    <SolidColorBrush.Transform>
                                        <MatrixTransform Matrix="Identity"/>
                                    </SolidColorBrush.Transform>
                                </SolidColorBrush>
                            </Path.Fill>
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                    </Grid>
                </Grid>
            </Border>
        </ControlTemplate>
     
         
        <ControlTemplate x:Key="CollectionNavigatorTemplate" TargetType="TelerikDataForm:CollectionNavigator">
            <Border x:Name="PART_RootElement" BorderThickness="{TemplateBinding BorderThickness}"  Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
                <Grid x:Name="PART_CollectionNavigatorGrid">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Grid.Column="0">
                        <Telerik:RadButton x:Name="MoveCurrentToFirst" Visibility="{Binding NavigationButtonsVisibility}" Command="TelerikControls:RadDataFormCommands.MoveCurrentToFirst" Height="18" Margin="4,4,2,4" Width="18" Telerik:StyleManager.Theme="{StaticResource Theme}">
                            <ToolTipService.ToolTip>
                                <ToolTip Telerik:StyleManager.Theme="{StaticResource Theme}" Telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToFirst"/>
                            </ToolTipService.ToolTip>
                            <StackPanel Orientation="Horizontal">
                                <Rectangle Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" VerticalAlignment="Center" Width="1"/>
                                <Path Data="M0,0 L3.5,3.5 0,7 Z" Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" RenderTransformOrigin="0.5, 0.5" VerticalAlignment="Center" Width="4">
                                    <Path.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleY="1" ScaleX="-1"/>
                                            <SkewTransform AngleY="0" AngleX="0"/>
                                            <RotateTransform Angle="0"/>
                                            <TranslateTransform/>
                                        </TransformGroup>
                                    </Path.RenderTransform>
                                </Path>
                            </StackPanel>
                        </Telerik:RadButton>
                        <Telerik:RadButton x:Name="MoveCurrentToPrevious" Visibility="{Binding NavigationButtonsVisibility}" Command="TelerikControls:RadDataFormCommands.MoveCurrentToPrevious" Height="18" Margin="2,4,2,4"  Width="18" Telerik:StyleManager.Theme="{StaticResource Theme}">
                            <ToolTipService.ToolTip>
                                <ToolTip Telerik:StyleManager.Theme="{StaticResource Theme}" Telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToPrevious"/>
                            </ToolTipService.ToolTip>
                            <Path Data="M0,0 L3.5,3.5 0,7 Z" Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" RenderTransformOrigin="0.5, 0.5" VerticalAlignment="Center" Width="4">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleY="1" ScaleX="-1"/>
                                        <SkewTransform AngleY="0" AngleX="0"/>
                                        <RotateTransform Angle="0"/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Path.RenderTransform>
                            </Path>
                        </Telerik:RadButton>
     
                        <Telerik:RadButton x:Name="MoveCurrentToNext" Visibility="{Binding NavigationButtonsVisibility}" Command="TelerikControls:RadDataFormCommands.MoveCurrentToNext" Height="18" Margin="2,4,2,4" Width="18" Telerik:StyleManager.Theme="{StaticResource Theme}">
                            <ToolTipService.ToolTip>
                                <ToolTip Telerik:StyleManager.Theme="{StaticResource Theme}"  Telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToNext"/>
                            </ToolTipService.ToolTip>
                            <Path Data="M0,0 L3.5,3.5 0,7 Z" Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" VerticalAlignment="Center" Width="4"/>
                        </Telerik:RadButton>
                        <Telerik:RadButton x:Name="MoveCurrentToLast"  Visibility="{Binding NavigationButtonsVisibility}" Command="TelerikControls:RadDataFormCommands.MoveCurrentToLast" Height="18" Margin="2,4,2,4"  Width="18" Telerik:StyleManager.Theme="{StaticResource Theme}">
                            <ToolTipService.ToolTip>
                                <ToolTip Telerik:StyleManager.Theme="{StaticResource Theme}" Telerik:LocalizationManager.ResourceKey="DataForm_MoveCurrentToLast"/>
                            </ToolTipService.ToolTip>
                            <StackPanel Orientation="Horizontal">
                                <Path Data="M0,0 L3.5,3.5 0,7 Z" Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" VerticalAlignment="Center" Width="4"/>
                                <Rectangle Fill="{StaticResource NagigatorIconColor}" HorizontalAlignment="Center" Height="7" VerticalAlignment="Center" Width="1"/>
                            </StackPanel>
                        </Telerik:RadButton>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right">
                        <Telerik:RadButton x:Name="AddNew" Visibility="{Binding AddNewButtonVisibility}" Command="TelerikControls:RadDataFormCommands.AddNew" Height="18" Margin="2,4,2,4" Width="18" Telerik:StyleManager.Theme="{StaticResource Theme}">
                            <ToolTipService.ToolTip>
                                <ToolTip Telerik:StyleManager.Theme="{StaticResource Theme}" Telerik:LocalizationManager.ResourceKey="DataForm_AddNew"/>
                            </ToolTipService.ToolTip>
                            <Path Data="F1M8.334,13.301L4.889,13.301L4.889,2.699L12.599,2.699L12.599,9.037L12.559,9.077L8.346,9.078L8.346,13.29z M13.74,9.442L13.74,1.602L3.747,1.602L3.747,14.397L8.784,14.397z" Stretch="Fill"  Width="8" Height="11" Fill="{StaticResource NagigatorIconColor}" RenderTransformOrigin="0.5,0.5">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="-1" />
                                    </TransformGroup>
                                </Path.RenderTransform>
                            </Path>
                        </Telerik:RadButton>
                        <Telerik:RadButton x:Name="BeginEdit" Visibility="{Binding EditButtonVisibility}" Command="TelerikControls:RadDataFormCommands.BeginEdit" Height="18" Margin="2,4,2,4" Width="18" Telerik:StyleManager.Theme="{StaticResource Theme}">
                            <ToolTipService.ToolTip>
                                <ToolTip Telerik:StyleManager.Theme="{StaticResource Theme}" Telerik:LocalizationManager.ResourceKey="DataForm_BeginEdit"/>
                            </ToolTipService.ToolTip>
                            <Path Data="M3.6943,11.9199L4.1323,9.5549C4.1443,9.4019,4.1953,9.2459,4.2973,9.1289L9.4233,4.0049L11.8853,6.4669L6.7593,11.5919C6.7043,11.6469,6.4893,11.7749,6.4183,11.7869L4.0083,12.2339C3.7943,12.2749,3.6533,12.1349,3.6943,11.9199 M4.8903,11.4789L6.2383,11.2519L10.9273,6.5619L10.3673,6.0059L5.7093,10.6679L4.8153,9.7169L4.5693,11.1329C4.7253,11.1989,4.8253,11.3219,4.8903,11.4789 M12.4513,5.9019L9.9893,3.4399L10.7863,2.6439C11.0063,2.4229,11.3643,2.4229,11.5853,2.6439L13.2483,4.3069C13.4683,4.5269,13.4683,4.8849,13.2483,5.1059z" Fill="{StaticResource NagigatorIconColor}" Stretch="Fill"  Width="10" Height="11"/>
                        </Telerik:RadButton>
                        <Telerik:RadButton x:Name="Delete" Visibility="{Binding DeleteButtonVisibility}" Command="TelerikControls:RadDataFormCommands.Delete" Height="18" Margin="2,4,4,4" Width="19" Telerik:StyleManager.Theme="{StaticResource Theme}" Padding="0">
                            <ToolTipService.ToolTip>
                                <ToolTip Telerik:StyleManager.Theme="{StaticResource Theme}" Telerik:LocalizationManager.ResourceKey="DataForm_Delete"/>
                            </ToolTipService.ToolTip>
                            <Path Data="M1,3 L2,3 L2,9 L3,9 L3,3 L4,3 L4,9 L5,9 L5,3 L6,3 L6,9 L7,9 L7,3 L8,3 L8,10 L1,10 z M2,0 L7,0 L7,0.99999994 L9,0.99999994 L9,2 L0,2 L0,0.99999994 L2,0.99999994 z" Fill="{StaticResource NagigatorIconColor}"  Stretch="Fill" Width="9" Height="11" />
                        </Telerik:RadButton>
                    </StackPanel>
                </Grid>
            </Border>
        </ControlTemplate>
     
         
        <Style x:Key="RadDataFormStyle" TargetType="TelerikControls:RadDataForm">
            <Setter Property="Template" Value="{StaticResource RadDataFormTemplate}" />
            <Setter Property="Foreground" Value="{StaticResource DataField_Foreground}" />
            <Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder}"/>
            <Setter Property="Background" Value="{StaticResource ControlBackground}"/>
            <Setter Property="BorderThickness" Value="1"/>
        </Style>
        <Style TargetType="TelerikControls:RadDataForm" BasedOn="{StaticResource RadDataFormStyle}"/>
     
         
        <Style x:Key="AutoGeneratedFieldsPresenterStyle" TargetType="TelerikDataForm:AutoGeneratedFieldsPresenter">
            <Setter Property="Template" Value="{StaticResource AutoGeneratedFieldsPresenterTemplate}" />
            <Setter Property="IsTabStop" Value="False"/>
        </Style>
        <Style TargetType="TelerikDataForm:AutoGeneratedFieldsPresenter" BasedOn="{StaticResource AutoGeneratedFieldsPresenterStyle}"/>
     
         
        <Style x:Key="DataFormDataFieldStyle" TargetType="TelerikControls:DataFormDataField">
            <Setter Property="Template" Value="{StaticResource DataFormDataFieldTemplate}" />
            <Setter Property="Background" Value="{StaticResource DataField_Background}"/>
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="BorderBrush" Value="{StaticResource DataField_BorderBrush}"/>
            <Setter Property="Padding" Value="4"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
        </Style>
        <Style TargetType="TelerikControls:DataFormDataField" BasedOn="{StaticResource DataFormDataFieldStyle}"/>
     
         
        <Style x:Key="CollectionNavigatorStyle"  TargetType="TelerikDataForm:CollectionNavigator">
            <Setter Property="Template" Value="{StaticResource CollectionNavigatorTemplate}" />
            <Setter Property="BorderBrush" Value="{StaticResource DataForm_CollectionNavigator_Border}"/>
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="Background" Value="{StaticResource DataForm_CollectionNavigatorBackground}"/>
            <Setter Property="BorderThickness" Value="0,0,0,1"/>
        </Style>
        <Style TargetType="TelerikDataForm:CollectionNavigator" BasedOn="{StaticResource CollectionNavigatorStyle}"/>
     
         
        <Style x:Key="DataFormValidationSummaryStyle" TargetType="TelerikDataForm:DataFormValidationSummary">
            <Setter Property="Template" Value="{StaticResource DataFormValidationSummaryTemplate}" />
        </Style>
        <Style TargetType="TelerikDataForm:DataFormValidationSummary"  BasedOn="{StaticResource DataFormValidationSummaryStyle}"/>
     
         
        <Style TargetType="TelerikControls:DataFormCheckBoxField" BasedOn="{StaticResource DataFormDataFieldStyle}"/>
        <Style TargetType="TelerikControls:DataFormComboBoxField" BasedOn="{StaticResource DataFormDataFieldStyle}"/>
        <Style TargetType="TelerikControls:DataFormDateField" BasedOn="{StaticResource DataFormDataFieldStyle}"/>

Back to Top
DevCraft banner