Telerik Forums
UI for WPF Forum
1 answer
74 views

TreeView.CheckedItems  is contains is checked item.

But now  checkeditems is contains all item..

Dinko | Tech Support Engineer
Telerik team
 answered on 14 Sep 2016
2 answers
122 views

hi all,

i need to create a radribbonWindow with a ribbon view in it to use the ribbon title bar as the window title bar in .net4 but it errors that it must be .net4.5.

is there any way to use .net 4 to do that?

best regards.

Dinko | Tech Support Engineer
Telerik team
 answered on 14 Sep 2016
1 answer
114 views

hi

i need to add a move right and move left for backstage open and close  in ribbon in wpf.

how can i add it?

 

Dinko | Tech Support Engineer
Telerik team
 answered on 14 Sep 2016
7 answers
188 views

I have noticed keyboard navigation doesn't work as I was expecting and I wanted to see if the behavior is normal. You can see the same behavior I am seeing in the IsExpandedRowBinding example. The keyboard navigation works as expected for the first level of items but navigation of the child items does not work the same. Pressing left or right does not expand or collapse child items and pressing up or down does not change the selected child item.  

Do I need to handle the navigation of the child items myself or is there something I can do to get the TreeListView to handle it?

 

Thanks

Stefan Nenchev
Telerik team
 answered on 14 Sep 2016
1 answer
1.1K+ views

Hello. I am currently trying to accomplish a couple of things with checkbox columns in a RadGridView. My experience with styling in XAML is zero, so good examples would be helpful.

 

I would like to be able to take the standard checkbox control and 

1. Make it larger (for both view and edit mode)

2. When in view mode, style the checkbox control in some way to make it stand out (like Bold or a different color).

 

The documentation does not provide any examples at all on how to apply styles outside of telling you to create a ControlTemplate and then applying that ControlTemplate to a Style. I believe this is tailored to a developer that already knows how to do these things. 

I would like to apply this per-grid for the time being.

Dilyan Traykov
Telerik team
 answered on 14 Sep 2016
4 answers
187 views

We use the AutoGeneratingPropertyDefinition hook in a RadPropertyGrid to specify templates for the various properties we expose.  For a collection exposed in this property grid, CollectionEditor seems like a great model, but is there any sort of comparable mechanism to override or specify the property definitions that then appear in the CollectionEditor?  I don't see anything that looks immediately obvious in CollectionEditor or CollectionEditorPicker, and the CollectionEditor that ends up in our RadPropertyGrid doesn't seem to hit the property grid's AutoGeneratingPropertyDefinition event handler.

 

Elsewhere in these forums, I see suggestions to override the complete Template of CollectionEditor; is that the only option in this case?  Are there any better/easier methods to specify DataTemplates for properties in a CollecitonEditor?

 

Thanks,

 

-David

Stefan
Telerik team
 answered on 14 Sep 2016
2 answers
852 views

Hi,

I would create a UserControl called ListUserControl, it should contains RadgridView and other telerik controls. Ok.

But, what is the best way to wrap dependecy properties of GridView?

In primis: ItemSource, I created a dependency property in my user control, but how can I link this property to ItemSource of gridview, what is the best way to do this?

 

public partial class ListViewUserControl : UserControl
    {
        public ListViewUserControl()
        {
            InitializeComponent();
        }
 
        public object ItemSource
        {
            get { return (object) GetValue(ItemSourceProperty); }
            set { SetValue(ItemSourceProperty, value); }
        }
 
        // Using a DependencyProperty as the backing store for ItemSource.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty ItemSourceProperty =
            DependencyProperty.Register(name: "ItemSource", propertyType: typeof(object), ownerType: typeof(object), typeMetadata: new PropertyMetadata(0));
 
 
    }

Dario Concilio
Top achievements
Rank 2
 answered on 14 Sep 2016
2 answers
149 views
I have a DocumentViewer that is displaying XPS content, I also use Telerik's controls for showing a report content. What I am attempting to do is get my XPS and report to have the same look, and I have everything matching except the scroll bars.

I have the style defined of the report as follows

<Style TargetType="telerikReporting:ReportViewer">
  <Setter Property="Template">
    <Setter.Value>
      <ControlTemplate TargetType="telerikReporting:ReportViewer">
        <Grid x:Name="LayoutRoot">
          <Border BorderBrush="{StaticResource OuterControlBorderBrush}"
              BorderThickness="1"
              CornerRadius="6">
            <Border
              Margin="0"
              Padding="6"
              Background="{StaticResource ControlBackgroundBrush}"
              BorderBrush="{StaticResource InnerControlBorderBrush}"
              BorderThickness="1"
              CornerRadius="5">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="auto" />
                  <RowDefinition Height="*" />
                  <RowDefinition Height="2" />
                  <RowDefinition Height="auto" />
                </Grid.RowDefinitions>
 
                <!-- Toolbar -->
                <telerik:RadToolBar Grid.Row="0"  >
                  <!-- Cut out to make the post shorter-->
                </telerik:RadToolBar>
 
                <Grid Grid.Row="1" >
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                  </Grid.ColumnDefinitions>
 
                  <!-- Viewer Area -->
                  <Border Grid.Column="2"
                    CornerRadius="4"
                    BorderThickness="1"
                    BorderBrush="{StaticResource OuterViewerAreaBorderBrush}">
                    <Border BorderThickness="1"
                      Margin="0"
                      CornerRadius="3"
                      Background="{StaticResource InnerViewerAreaBackground}"
                      BorderBrush="{StaticResource InnerViewerAreaBorderBrush}">
                      <Grid>
                        <ScrollViewer x:Name="PageScrollViewer"
                          Visibility="Visible"
                          BorderThickness="0"
                          HorizontalScrollBarVisibility="Auto"
                          VerticalScrollBarVisibility="Visible">
                          <telerik:StyleManager.Theme>
                            <telerik:Office_SilverTheme/>
                          </telerik:StyleManager.Theme>
                          <ContentControl x:Name="PageContainer">
                            <ContentControl.Resources>
                              <ControlTemplate x:Key="PrintPreviewTemplate">
                                <Border x:Name="PageBorder"
                                  Background="{StaticResource PageBorderBackground}"
                                  BorderBrush="{StaticResource PageBorderBorderBrush}"
                                  BorderThickness="1"
                                  Margin="10"
                                  VerticalAlignment="Center"
                                  HorizontalAlignment="Center">
                                  <telerik:LayoutTransformControl
                                x:Name="PageContainer"
                                LayoutTransform="{Binding PageTransform}"
                                Content="{Binding PageRoot}" />
                                </Border>
                              </ControlTemplate>
                              <ControlTemplate x:Key="InteractiveTemplate">
                                <ContentPresenter Margin="10"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Top">
                                  <ContentPresenter.Content>
                                    <telerik:LayoutTransformControl
                                    x:Name="PageContainer"
                                    LayoutTransform="{Binding PageTransform}"
                                    Content="{Binding PageRoot}" />
                                  </ContentPresenter.Content>
                                </ContentPresenter>
                              </ControlTemplate>
                            </ContentControl.Resources>
                          </ContentControl>
                        </ScrollViewer>
 
                        <!-- Progress -->
                        <telerikReporting:DialogBox x:Name="ViewerProgressMessage">
                          <!-- Cut out to make the post shorter-->
                        </telerikReporting:DialogBox>
 
                        <!-- Error message -->
                        <TextBox x:Name="ViewerError">
                            <!-- Cut out to make the post shorter-->
                        </TextBox>
 
                        <!-- Export dialog -->
                        <telerikReporting:DialogBox x:Name="ExportDialog">
                          <!-- Cut out to make the post shorter-->
                        </telerikReporting:DialogBox>
                      </Grid>
                    </Border>
                  </Border>
                </Grid>
 
                <!-- Status Area -->
                <Grid  Grid.Row="4">
                  <!-- Cut out to make the post shorter-->
                </Grid>
              </Grid>
            </Border>
          </Border>
        </Grid>
      </ControlTemplate>
    </Setter.Value>
  </Setter>
</Style>


I extrated the style of the DocumentViewer using Blend and attempted to override the ScrollViewer's style to use the same theme

<!-- Office_SilverTheme -->
<SolidColorBrush x:Key="OuterControlBorderBrush" Color="#3FFFFFFF" />
<SolidColorBrush x:Key="InnerControlBorderBrush" Color="#FF7E7E95" />
<LinearGradientBrush x:Key="ControlBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
  <GradientStop Color="#FFF0F0F9"/>
  <GradientStop Color="#FF9F9FBB" Offset="0.1"/>
  <GradientStop Color="#FFE1E1EA" Offset="1"/>
</LinearGradientBrush>
 
<SolidColorBrush x:Key="OuterViewerAreaBorderBrush" Color="#66FFFFFF" />
<SolidColorBrush x:Key="InnerViewerAreaBorderBrush" Color="#FF7E7E95" />
<SolidColorBrush x:Key="InnerViewerAreaBackground" Color="White" />
<SolidColorBrush x:Key="ForegroundBrush" Color="Black" />
<SolidColorBrush x:Key="PageBorderBackground" Color="White" />
<SolidColorBrush x:Key="PageBorderBorderBrush" Color="DarkGray" />
<SolidColorBrush x:Key="ErrorMessageForeground" Color="Gray" />
<!-- Office_SilverTheme -->
 
<Style x:Key="TelerikDocumentStyle" BasedOn="{x:Null}" TargetType="{x:Type DocumentViewer}">
  <Setter Property="Template">
    <Setter.Value>
      <ControlTemplate TargetType="{x:Type DocumentViewer}">
        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Focusable="False">
          <Grid Background="{TemplateBinding Background}" KeyboardNavigation.TabNavigation="Local">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ContentControl Grid.Column="0" Focusable="{TemplateBinding Focusable}" Grid.Row="0" Style="{DynamicResource {ComponentResourceKey ResourceId=PUIDocumentViewerToolBarStyleKey, TypeInTargetAssembly={x:Type Documents:PresentationUIStyleResources}}}" TabIndex="0"/>
            <ScrollViewer x:Name="PART_ContentHost" CanContentScroll="true" Grid.Column="0" Focusable="{TemplateBinding Focusable}" HorizontalScrollBarVisibility="Auto" IsTabStop="true" Grid.Row="1" TabIndex="1">
              <telerik:StyleManager.Theme>
                <telerik:Office_SilverTheme/>
              </telerik:StyleManager.Theme>
            </ScrollViewer>
            <DockPanel Grid.Row="1">
              <FrameworkElement DockPanel.Dock="Right" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
              <Rectangle Height="10" Visibility="Visible" VerticalAlignment="top">
                <Rectangle.Fill>
                  <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                    <LinearGradientBrush.GradientStops>
                      <GradientStopCollection>
                        <GradientStop Color="#66000000" Offset="0"/>
                        <GradientStop Color="Transparent" Offset="1"/>
                      </GradientStopCollection>
                    </LinearGradientBrush.GradientStops>
                  </LinearGradientBrush>
                </Rectangle.Fill>
              </Rectangle>
            </DockPanel>
            <ContentControl x:Name="PART_FindToolBarHost" Grid.Column="0" Focusable="{TemplateBinding Focusable}" Grid.Row="2" TabIndex="2"/>
          </Grid>
        </Border>
      </ControlTemplate>
    </Setter.Value>
  </Setter>
</Style>


However when I try it the scroll arrows are missing and the three dashes are missing from the middle of the bars. What do I need to do to correctly style a DocumentViewer to have the same scroll bar style as the Report controll?
Dennis
Top achievements
Rank 1
 answered on 14 Sep 2016
1 answer
155 views
Hi All,

I have a requirement to get the data from telerik radgridview and pass it to view model for manipulation.  The data in the grid may be after filtering/sorting/pagination and I want to get the collection from the grid that is presently in the grid and sent it to delegate command for operation.  I have placed a button to call Approve delegate command and I want to pass the gridview collection to the particular delegate method.

Can any one help me how can I pass filtered grid view collection to view model command?


<Button Height="30" Width="30" Margin="1,0,0,0" ToolTip="Approve" Command="{Binding Approve}" Cursor="Hand"></Button>

<telerik:RadGridView x:Name="GridView">
....
....
</telerik:RadGridView>

<telerik:RadDataPager Margin="5,0,15,0" x:Name="GridviewPager" Source="{Binding Items, ElementName=GridView}" PageSize="33" />

Thanks
Selvakumar R
Selvakumar
Top achievements
Rank 1
 answered on 13 Sep 2016
1 answer
166 views

Hi,

We use the latest telerik wpf version and found RichTextBox performance very bad when it come to the documents that have more than 150 pages(have 50 tables atleast).

We find latency when we type, the letters appear 5 secs after typing. Is there a way to improve this performance ? I have seen many reported performance issue but couldn't find any working solution. Could you help us in this issue please ?

Regards

Anand

Anand
Top achievements
Rank 1
 answered on 13 Sep 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?