Telerik Forums
UI for WPF Forum
6 answers
702 views
Hello,

I'm trying to use the PDF viewer to look at a specific page number in a pdf document. I try to set the document source, and then set the CurrentPageNumber property. The viewer will still only load the pdf on the first page. Is there a different way to jump to a specific page in the document?

I used the following:
PdfDocumentSource newDoc = new PdfDocumentSource(new Uri(@"C:\12345.pdf"));
pdfViewer.DocumentSource = newDoc;
pdfViewer.CurrentPageNumber = 5;

Peshito
Telerik team
 answered on 25 Sep 2018
3 answers
313 views

Hi,

i use a RadDocking Control and a RadButton so save layout changes. Now i want to reset
the Layout and delete all changes + refreshing the RadDocking Control. Saving is no
problem, but how do i reload the original xaml layout?

 thanks a lot

regards

Rene

Vladimir Stoyanov
Telerik team
 answered on 25 Sep 2018
1 answer
162 views

Hi,

I'm working with a RadCartesianChart to display Value / Time.
I'm using an DateTimeContinuousAxis as bottom axis. 
On this Axis I use a Major Step Unit in Days.

I display 2 series. One with value in days and one with value in hour.

The day serie is display with a simple LineSeries.

The hour serie MUST but be displayed in a RangeBarSeries to show min/max values.

In this case the Bar are to wide. My probleme is that RangeBarSerieModel generate a RadSize in function of the Axis Step size and not in function of the value covered by it.
In this case the Bar are to wide. 

For example 1 step == 1 day is represented by 28px then the bar have a width of 28px.

Is it possible to change the behavior to have a bar width = (Day/hour) * StepSize = Min(1,  1/24 * 28) ?

This way the width of the bar correspond to the time the value represent.

Thanks,

 

 


Dinko | Tech Support Engineer
Telerik team
 answered on 25 Sep 2018
0 answers
243 views

Hi. I'm adding a binding to the cell size and everything works correctly. 

xmlns:primitives="clr-namespace:Telerik.Windows.Controls.Diagrams.Primitives;assembly=Telerik.Windows.Controls.Diagrams"
 
<telerik:RadDiagram x:Name="diagram"      primitives:BackgroundGrid.CellSize="{Binding CellSize , Mode=TwoWay}"   />

 

But as soon as I connect the template, the binding disappears

1.   <telerik:RadDiagram x:Name="diagram" Template="{StaticResource RadDiagramTemplate}"  
2. Background="{Binding SelectedColorDiagram,   Mode=TwoWay, Converter={StaticResource customColorToBrushConverter}}"
3.primitives:BackgroundGrid.CellSize="{Binding CellSize , Mode=TwoWay}"   />

Other bindings, such as Background, work fine

 

I need a template to change ManipulationAdorner. Template code:

001.<ControlTemplate TargetType="{x:Type telerik:RadDiagram}" x:Key="RadDiagramTemplate">
002.              
003.                   <Grid>
004.                      <Grid.ColumnDefinitions>
005.                          <ColumnDefinition Width="*" />
006.                          <ColumnDefinition Width="Auto" />
007.                      </Grid.ColumnDefinitions>
008.                      <Grid.RowDefinitions>
009.                          <RowDefinition Height="*" />
010.                          <RowDefinition Height="Auto" />
011.                      </Grid.RowDefinitions>
012.                      <Grid Background="{TemplateBinding Background}">
013.                          <Grid x:Name="BackPanel">
014.                              <Grid.Visibility>
015.                                  <Binding Path="IsBackgroundSurfaceVisible" RelativeSource="{RelativeSource TemplatedParent}">
016.                                      <Binding.Converter>
017.                                          <telerik:BooleanToVisibilityConverter />
018.                                      </Binding.Converter>
019.                                  </Binding>
020.                              </Grid.Visibility>
021.                              <primitives:GraphPaper>
022.                                  <primitives:GraphPaper.CacheMode>
023.                                      <BitmapCache />
024.                                  </primitives:GraphPaper.CacheMode>
025.                              </primitives:GraphPaper>
026.                          </Grid>
027.                          <Grid x:Name="MainPanel" RenderTransformOrigin="0.5,0.5">
028.                              <telerik:DiagramSurface x:Name="ItemsHost" Background="Transparent" />
029.                              <primitives:AdornerSurface Background="{x:Null}">
030.                                  <Rectangle x:Name="SelectionRectangle" Style="{TemplateBinding SelectionRectangleStyle}" />
031.                                  <primitives:ManipulationAdorner x:Name="ManipulationAdorner"
032.                                                                             Diagram="{x:Null}"
033.                                                                             Position="0,0"
034.                                                                             RenderTransformOrigin="0.5,0.5"
035.                                                                             Style="{StaticResource ManipulationAdornerStyle}"
036.                                                                             Visibility="Collapsed"
037.                                                                             ZoomLevel="{TemplateBinding Zoom}">
038.                                      <telerik:StyleManager.Theme>
039.                                          <telerik:Office_BlackTheme />
040.                                      </telerik:StyleManager.Theme>
041.                                  </primitives:ManipulationAdorner>
042.                                  <primitives:ConnectionManipulationAdorner x:Name="ConnectionManipulationAdorner"
043.                                                                                       Diagram="{x:Null}"
044.                                                                                       Position="0,0"
045.                                                                                       RenderTransformOrigin="0.5,0.5"
046.                                                                                       Visibility="Collapsed">
047.                                      <primitives:ConnectionManipulationAdorner.RenderTransform>
048.                                          <RotateTransform />
049.                                      </primitives:ConnectionManipulationAdorner.RenderTransform>
050.                                      <telerik:StyleManager.Theme>
051.                                          <telerik:Office_BlackTheme />
052.                                      </telerik:StyleManager.Theme>
053.                                  </primitives:ConnectionManipulationAdorner>
054.                                  <primitives:GroupsAdorner x:Name="GroupsAdorner"
055.                                                                       HorizontalAlignment="Stretch"
056.                                                                       VerticalAlignment="Stretch" />
057.                                  <primitives:AlignmentAdorner x:Name="AlignmentAdorner"
058.                                                                          HorizontalAlignment="Stretch"
059.                                                                          VerticalAlignment="Stretch"
060.                                                                          Diagram="{x:Null}"
061.                                                                          Position="0,0"
062.                                                                          RenderTransformOrigin="0.5,0.5">
063.                                      <primitives:AlignmentAdorner.RenderTransform>
064.                                          <RotateTransform />
065.                                      </primitives:AlignmentAdorner.RenderTransform>
066.                                  </primitives:AlignmentAdorner>
067.                                  <primitives:DrawingAdorner x:Name="DrawingAdorner"
068.                                                                        HorizontalAlignment="Stretch"
069.                                                                        VerticalAlignment="Stretch"
070.                                                                        Diagram="{x:Null}"
071.                                                             
072.                                                                        Position="0,0"
073.                                                                        RenderTransformOrigin="0.5,0.5">
074.                                      <primitives:DrawingAdorner.RenderTransform>
075.                                          <RotateTransform />
076.                                      </primitives:DrawingAdorner.RenderTransform>
077.                                  </primitives:DrawingAdorner>
078.                              </primitives:AdornerSurface>
079.                          </Grid>
080.                          <primitives:AdornerSurface x:Name="FrontPanel">
081.                              <primitives:AdornerSurface.Visibility>
082.                                  <Binding Path="IsInformationAdornerVisible" RelativeSource="{RelativeSource TemplatedParent}">
083.                                      <Binding.Converter>
084.                                          <telerik:BooleanToVisibilityConverter />
085.                                      </Binding.Converter>
086.                                  </Binding>
087.                              </primitives:AdornerSurface.Visibility>
088.                              <primitives:ItemInformationAdorner x:Name="ItemInformationAdorner">
089.                                  <telerik:StyleManager.Theme>
090.                                      <telerik:Office_BlackTheme />
091.                                  </telerik:StyleManager.Theme>
092.                              </primitives:ItemInformationAdorner>
093.                          </primitives:AdornerSurface>
094.                      </Grid>
095.                      <Rectangle Grid.Row="1"
096.                                     Grid.Column="1"
097.                                     Fill="White" />
098.                      <ScrollBar x:Name="HorizontalScrollbar"
099.                                     Grid.Row="1"
100.                                     Grid.Column="0"
101.                                     HorizontalAlignment="Stretch"
102.                                     VerticalAlignment="Bottom"
103.                                     Orientation="Horizontal">
104.                          <telerik:StyleManager.Theme>
105.                              <telerik:Office_BlackTheme />
106.                          </telerik:StyleManager.Theme>
107.                      </ScrollBar>
108.                      <ScrollBar x:Name="VerticalScrollbar"
109.                                     Grid.Row="0"
110.                                     Grid.Column="1"
111.                                     HorizontalAlignment="Right"
112.                                     VerticalAlignment="Stretch"
113.                                     Orientation="Vertical">
114.                          <telerik:StyleManager.Theme>
115.                              <telerik:Office_BlackTheme />
116.                          </telerik:StyleManager.Theme>
117.                      </ScrollBar>
118.                  </Grid>
119.              </ControlTemplate>

 

Why after I add a template,  primitives:BackgroundGrid is stop working?

Svyatoslav
Top achievements
Rank 1
 asked on 24 Sep 2018
1 answer
318 views

Hi all

I am binding the 'IsSelectedProperty' to trigger actions when a RadDiagramShape is selected (Clicked).

I also need to handle when the Background of the Diagram is clicked.. I've tried the override '(Preview)OnMouseDown' functions, but these also get called when the shape is clicked. I want to distinguish the case where the background of the diagram is clicked only... not a shape. Any ideas what I should be using?

 

Thanks

Dinko | Tech Support Engineer
Telerik team
 answered on 24 Sep 2018
3 answers
110 views

I have found that when scrolling through up and down the years that I get incorrect values.  I have attached pictures of these values.  Obviously, when I select 1990 I expect to get years listed between 1990 and 2000 but I don't get that.

 

<telerik:RadDatePicker
    Grid.Row="4"
    Grid.Column="2"
    Margin="20,5,5,5"
    MaxHeight="60"
    IsEnabled="True"
    Background="{DynamicResource PrimaryBackgroundBrush}"
    Foreground="{DynamicResource PrimaryForegroundBrush}"
    SelectedDate="{Binding Patient.DOB, Mode=TwoWay}"
    DisplayDateStart="{Binding Patient.DOBDateStart}"
    DisplayDateEnd="{Binding Patient.DOBDateEnd}"
    SelectableDateStart="{Binding Patient.DOBDateStart}"
    SelectableDateEnd="{Binding Patient.DOBDateEnd}"
    DateTimeWatermarkContent="Enter Birth Date"
    ToolTip="{Binding [0].ErrorContent}">
</telerik:RadDatePicker>
Dilyan Traykov
Telerik team
 answered on 21 Sep 2018
1 answer
133 views

I have a touch based application that uses a large font (Segoe UI 28) .  I need to force the Year/Decade Panels to display correctly.  How do I prevent the host panel from collapsing when I pick a year (it goes from wide accommodating the entire calendar down to listing only the Years) and I need to guarantee it doesn't crowd the years into a very small place?

 

Dilyan Traykov
Telerik team
 answered on 21 Sep 2018
4 answers
361 views

Hi.
This company to develop its software production required a components for UI layer, which according to your company's records and resume Terelik, Trial version of it with real Database ourselves on a system specification and the results are listed below
is, we test.
Of course, we order your copy for WPF, WinForm & Ajax, but we consider all the tests did with WPF.
According to our results, the speed of loading and grouping based on columns in the grade products than other companies such as Janus DevleloperEXpress and was very low. So please, if possible solution for improving your present problem. 

Test System Properties:

CPU:                               Core2 2.2 Gh

RAM:                               1G

Platform:                                   WIN XP SP3

Programing Language:      .NET 3.5 C# 2008

 

Record Count and Results:

RowCount:                       65000

ColCount:                        10

ResultTime:                     8.5 s

 

Dinko | Tech Support Engineer
Telerik team
 answered on 21 Sep 2018
0 answers
110 views

Hi,

The ClassDiagram example defines the class shape inside <style> definition. I need now dynamically access one TextBlock inside the definition as I need to set the text according to user input. I'm having hard time to do this as following does not work:

private void NewClass_Click(object sender, Telerik.Windows.RadRoutedEventArgs e)
       {
           ClassShape newClass= new ClassShape() { Content = "Class1", Position = new Point(300, 120) };
           //newClass.ApplyTemplate();
           var textBlock = newClass.FindName("TypeName") as TextBlock;
 
           newClass.Loaded += this.OnNewClassLoaded;
           this.diagram.Items.Add(newClass);
       }

 

This is absolutely driving me crazy, so any help would be much appreciated.

 

The definition of ClassShape is something like:

<Window.Resources>
       <Style TargetType="local:ClassShape">
           <Setter Property="IsCollapsible" Value="True" />
           <Setter Property="IsResizingEnabled" Value="False" />
           <Setter Property="MinHeight" Value="100" />
           <Setter Property="MinWidth" Value="100" />
           <Setter Property="Padding" Value="15 5" />
           <Setter Property="Width" Value="150" />
           <Setter Property="Height" Value="Auto" />
           <Setter Property="HorizontalContentAlignment" Value="Left" />
           <Setter Property="Template">
               <Setter.Value>
                   <ControlTemplate TargetType="local:ClassShape">
                       <Grid x:Name="RootPanel">
                           <VisualStateManager.VisualStateGroups>
                               <VisualStateGroup x:Name="MouseStates">
                                   <VisualState x:Name="Normal" />
                                   <VisualState x:Name="MouseOver" />
                               </VisualStateGroup>
                               <VisualStateGroup x:Name="CollapsedStates">
                                   <VisualState x:Name="Expanded" />
                                   <VisualState x:Name="Collapsed" />
                               </VisualStateGroup>
                               <VisualStateGroup x:Name="ActiveConectionStates">
                                   <VisualState x:Name="NormalActiveConnectionState" />
                                   <VisualState x:Name="ActiveConnectionInsideShape">
                                       <Storyboard>
                                           <ObjectAnimationUsingKeyFrames Duration="0"
                                                                          Storyboard.TargetName="ActiveSelectedBorder"
                                                                          Storyboard.TargetProperty="Visibility">
                                               <DiscreteObjectKeyFrame KeyTime="0">
                                                   <DiscreteObjectKeyFrame.Value>
                                                       <Visibility>Visible</Visibility>
                                                   </DiscreteObjectKeyFrame.Value>
                                               </DiscreteObjectKeyFrame>
                                           </ObjectAnimationUsingKeyFrames>
                                       </Storyboard>
                                   </VisualState>
                               </VisualStateGroup>
                               <VisualStateGroup x:Name="ConnectorsAdornerVisibilityStates">
                                   <VisualState x:Name="ConnectorsAdornerCollapsed" />
                                   <VisualState x:Name="ConnectorsAdornerVisible">
                                       <Storyboard>
                                           <ObjectAnimationUsingKeyFrames Duration="0"
                                                                          Storyboard.TargetName="ConnectorsControl"
                                                                          Storyboard.TargetProperty="Visibility">
                                               <DiscreteObjectKeyFrame KeyTime="0">
                                                   <DiscreteObjectKeyFrame.Value>
                                                       <Visibility>Visible</Visibility>
                                                   </DiscreteObjectKeyFrame.Value>
                                               </DiscreteObjectKeyFrame>
                                           </ObjectAnimationUsingKeyFrames>
                                       </Storyboard>
                                   </VisualState>
                               </VisualStateGroup>
                               <VisualStateGroup x:Name="SelectionStates">
                                   <VisualState x:Name="Selected" />
                                   <VisualState x:Name="SelectedInGroup" />
                                   <VisualState x:Name="Unselected" />
                                   <VisualState x:Name="SelectedAsGroup" />
                               </VisualStateGroup>
                               <VisualStateGroup x:Name="EditMode">
                                   <VisualState x:Name="NormalMode" />
                                   <VisualState x:Name="NormalEditMode">
                                       <Storyboard>
                                           <ObjectAnimationUsingKeyFrames Duration="0"
                                                                          Storyboard.TargetName="TextContent"
                                                                          Storyboard.TargetProperty="Visibility">
                                               <DiscreteObjectKeyFrame KeyTime="0">
                                                   <DiscreteObjectKeyFrame.Value>
                                                       <Visibility>Collapsed</Visibility>
                                                   </DiscreteObjectKeyFrame.Value>
                                               </DiscreteObjectKeyFrame>
                                           </ObjectAnimationUsingKeyFrames>
                                           <ObjectAnimationUsingKeyFrames Duration="0"
                                                                          Storyboard.TargetName="EditContent"
                                                                          Storyboard.TargetProperty="Visibility">
                                               <DiscreteObjectKeyFrame KeyTime="0">
                                                   <DiscreteObjectKeyFrame.Value>
                                                       <Visibility>Visible</Visibility>
                                                   </DiscreteObjectKeyFrame.Value>
                                               </DiscreteObjectKeyFrame>
                                           </ObjectAnimationUsingKeyFrames>
                                       </Storyboard>
                                   </VisualState>
                                   <VisualState x:Name="TextBoxEditMode">
                                       <Storyboard>
                                           <ObjectAnimationUsingKeyFrames Duration="0"
                                                                          Storyboard.TargetName="TextContent"
                                                                          Storyboard.TargetProperty="Visibility">
                                               <DiscreteObjectKeyFrame KeyTime="0">
                                                   <DiscreteObjectKeyFrame.Value>
                                                       <Visibility>Collapsed</Visibility>
                                                   </DiscreteObjectKeyFrame.Value>
                                               </DiscreteObjectKeyFrame>
                                           </ObjectAnimationUsingKeyFrames>
                                           <ObjectAnimationUsingKeyFrames Duration="0"
                                                                          Storyboard.TargetName="EditTextBox"
                                                                          Storyboard.TargetProperty="Visibility">
                                               <DiscreteObjectKeyFrame KeyTime="0">
                                                   <DiscreteObjectKeyFrame.Value>
                                                       <Visibility>Visible</Visibility>
                                                   </DiscreteObjectKeyFrame.Value>
                                               </DiscreteObjectKeyFrame>
                                           </ObjectAnimationUsingKeyFrames>
                                       </Storyboard>
                                   </VisualState>
                               </VisualStateGroup>
                               <VisualStateGroup x:Name="DropStates">
                                   <VisualState x:Name="DropNormal" />
                                   <VisualState x:Name="DropComplete" />
                                   <VisualState x:Name="DragOver" />
                               </VisualStateGroup>
                           </VisualStateManager.VisualStateGroups>
                           <Grid.RowDefinitions>
                               <RowDefinition Height="Auto" />
                               <RowDefinition Height="*" />
                               <RowDefinition Height="Auto" />
                           </Grid.RowDefinitions>
                           <Border x:Name="ContainerBorder"
                                   Grid.RowSpan="3"
                                   Background="{TemplateBinding Background}"
                                   BorderBrush="{TemplateBinding BorderBrush}"
                                   BorderThickness="{TemplateBinding BorderThickness}"
                                   CornerRadius="8" />
                           <Grid x:Name="NormalContent" MinHeight="50">
                               <Grid.ColumnDefinitions>
                                   <ColumnDefinition />
                                   <ColumnDefinition Width="Auto" />
                               </Grid.ColumnDefinitions>
                               <Border Grid.ColumnSpan="2"
                                       BorderBrush="{TemplateBinding BorderBrush}"
                                       BorderThickness="1 1 1 0"
                                       CornerRadius="8 8 0 0">
                                   <Border.Background>
                                       <LinearGradientBrush StartPoint="0, 0.5" EndPoint="1, 0.5">
                                           <LinearGradientBrush.GradientStops>
                                               <GradientStop Color="#FFD4DDEF" />
                                               <GradientStop Offset="1" Color="#FFFFFFFF" />
                                           </LinearGradientBrush.GradientStops>
                                       </LinearGradientBrush>
                                   </Border.Background>
                               </Border>
                               <StackPanel x:Name="TextContent"
                                           Margin="{TemplateBinding Padding}"
                                           HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                           VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                   <TextBlock FontSize="12"
                                              FontWeight="Bold"
                                              Text="{TemplateBinding Content}" />
                                   <TextBlock x:Name="TypeName"
                                              Grid.Row="1"
                                              Margin="5 0 0 0"
                                              FontSize="9"
                                              Text="" />
Sami
Top achievements
Rank 1
 asked on 20 Sep 2018
10 answers
1.7K+ views
I have filtering enabled in my RadGridView column.  When an existing row has it's cell value updated for the filtered column, the row should be excluded if it's outside of the filter parameters - however, this is not the case.  I have to manually go back and adjust the filter for the row to be excluded.

How can I ensure that all current data in the grid is correctly filtered, even when cells are updated after the row is added?
Stefan
Telerik team
 answered on 20 Sep 2018
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?