Telerik Forums
UI for WPF Forum
1 answer
735 views

After some digging I still am not able to get this to work.
In short, I would like to use the Telerik Components with my own Dictionary.xaml.
Can someone please point me in the right direction or describe what needs to be done.

 

You time in this is much appreciated.

Martin
Telerik team
 answered on 14 Mar 2018
2 answers
91 views

It would be a nicer UX if a user did not have to first move the frozen column indicator in order to resize a column.

I am happy to style it myself this way but I am struggling to find the correct element, is it the PART_FrozenColumnsPreview element?

 

Regards,
Maurice

Maurice
Top achievements
Rank 1
 answered on 13 Mar 2018
1 answer
94 views
Hello, my case is: I have a RadContextMenu, and there's a RadListBox filling the RadMenuGroupItem of the RadContextMenu.  And then I added a TextBlock in the ItemTemplate of the RadListBox. And finally, I added a ContextMenu on this TextBlock, this ContextMenu on TextBlock didn't work. Right clicking on the TextBlock which is also the an Item of the RadListBox, no ContextMenu pop up, nothing happened.  So what's the reason of it?  Is this kind of case supported?  Thanks for any comments, that would be great help for me, thanks a lot. 
Stefan
Telerik team
 answered on 13 Mar 2018
1 answer
177 views

Hi, I'm trying to use the PDF Viewer control, everything works nicely except for one thing,

he toolbar theme won't change no matter what I select.

 

            <telerik:RadPdfViewerToolBar x:Name="pdfViewTools"
                                         RadPdfViewer="{Binding ElementName=pdfViewer, Mode=OneTime}"
                                         telerik:StyleManager.Theme="Fluent"
                                         HasClockwiseButton="False"
                                         HasCounterclockwiseButton="False"
                                         HasOpenButton="False"
                                         HasPageDownButton="False"
                                         HasPagesCountGroup="False"
                                         HasPageUpButton="False"
                                         HasSignatureButton="False"/>
            <telerik:RadPdfViewer x:Name="pdfViewer"
                                  DataContext="{Binding CommandDescriptors, ElementName=pdfViewer}"
                                  Grid.Row="1"
                                  telerik:StyleManager.Theme="Fluent"
                                  telerik:RadPdfViewerAttachedComponents.RegisterContextMenu="True"/>

 

Where am I going wrong?

Tanya
Telerik team
 answered on 13 Mar 2018
3 answers
208 views

Hello,

I'm working on a scenario where i have to use 2 different types of appointments, with different properties. both share a common abstract base class, which is derived from the Appointment Class.

public abstract class MyBaseClass : Appointment
{
    private string _designation;
 
    public string Designation
    {
        get { return this.Storage<MyBaseClass>()._designation; }
        set
        {
            var storage = this.Storage<MyBaseClass>();
            if (value == storage._designation) return;
            storage._designation = value;
            this.OnPropertyChanged(() => this.Designation);
        }
    }
}
 
public class DerivedType : MyBaseClass
{
    private string _longText;
 
    public string LongText
    {
        get { return this.Storage<DerivedType>()._longText; }
        set
        {
           var storage = this.Storage<DerivedType>();
            if (value == storage._longText) return;
            storage._longText = value;
            this.OnPropertyChanged(() => this.LongText);
        }
    }
}
 
public class OtherType : MyBaseClass
{
    private bool _myBool;
 
    public bool MyBool
    {
        get { return this.Storage<OtherType>()._myBool; }
        set
        {
            var storage = this.Storage<OtherType>();
            if (value == storage._myBool) return;
            storage._myBool = value;
            this.OnPropertyChanged(() => this.MyBool);
        }
    }
}

 

When using a ListBox, i would simply put multiple datatemplates with DataType={x:Type ...} into the listbox resources. As this did not work, I tried to override  ScheduleViewDataTemplateSelector:

public override DataTemplate SelectTemplate(object item, DependencyObject container, ViewDefinitionBase activeViewDefinition)
{
     Occurrence o = (item as Occurrence);
     if (o.Appointment is DerivedType)
     return this.DerivedTypeTemplate;
...
}

 

<local:TelerikScheduleTemplateSelector x:Key="ScheduleTemplateSelector">
    <local:TelerikScheduleTemplateSelector.DerivedTypeTemplate>
        <DataTemplate>
            <Grid Background="LightGray">
                <Grid.RowDefinitions>
                    <RowDefinition MinHeight="15"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Label Grid.Row="0" Content="{Binding Appointment.LongText}" />
                <Label Grid.Row="1" MinHeight="30" Margin="2"  Background="Green" />
            </Grid>
        </DataTemplate>
 
        <local:TelerikScheduleTemplateSelector.OtherTypeTemplate>
            <DataTemplate>
                <Grid Background="LightGoldenrodYellow">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="20"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <CheckBox Grid.Row="0" Margin="2" IsChecked="{Binding Appointment.MyBool}" Content="asdf" />
                </Grid>
            </DataTemplate>
        </local:TelerikScheduleTemplateSelector.OtherTypeTemplate>
</local:TelerikScheduleTemplateSelector>

 

this seems to work partially, but I found some problems:

-> the bindings are not recognized, as I cannot set the DataType to DerivedType or to OtherType 
-> Sometimes when switching to other weeks in the scheduleview, I get Binding Errors, because of a missing MyBool Property on DerivedType, and vice-versa

Is there an easier way to get different looks based on the type of the appointment? Could you point me in the right direction, or maybe provide a small sample?

Thanks a lot!

                         

 

 

Stefan
Telerik team
 answered on 13 Mar 2018
5 answers
227 views

Hi, 

we are using the rad docking and set a automationid to all levels (RadDocking, RadSplitContainer, RadPaneGroup and RadPane) but if we let the CUIT run it needs much time or he doesn´t find the control.

Also if we check the UI with AccChecker we can see that there is no AutomationId set. 

If have downloaded a example from this thread:

https://www.telerik.com/forums/cuit-is-failing-perform-actions-on-the-controls-placed-inside-the-radpanegroup#g4MK_X_CbU-XMfaGOlK9vg

But it doesn´t work on my computer and I can see that there is no automationid set. 

See AutomationIds in the Code.jpg file.

In the file ACC.jpg you could see that there is no AutomationId found. 

Currently it´s not possible to upload the source code because it´s to big and it´s not allowed.

Could you tell me where we miss something or is it a bug?

Thanks for your help.

 

Kalin
Telerik team
 answered on 13 Mar 2018
1 answer
533 views

I cannot find a way to remove the gray border in the RadPdfViewer.
The border is inside of the scrollviewer and I cannot find a way to set Borderwith or Margin or Padding to Zero.

Tanya
Telerik team
 answered on 13 Mar 2018
1 answer
281 views

I have a Window that I have dropped a RadPdfViewer on, the system added Telerik.Windows.Controls, Telerik.Windows.Controls.FixedDocumentViewers, Telerik.Windows.Documents.Core, and Telerik.Windows.Documents.Fixed.

I have done nothing else, when I run the app I get an Exception:

 

System.Windows.Markup.XamlParseException
  HResult=0x80131501
  Message=Could not load file or assembly 'Telerik.Windows.Controls.FixedDocumentViewers, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The system cannot find the file specified.
  Source=PresentationFramework
  StackTrace:
   at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
   at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at Foundation.Windows.Controls.Pdf.PdfViewer.InitializeComponent() in D:\Mw\Insurance\Source\Alabama\Common\Foundation.Windows.Controls.Pdf\PdfViewer.xaml:line 1
Inner Exception 1:
FileNotFoundException: Could not load file or assembly 'Telerik.Windows.Controls.FixedDocumentViewers, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The system cannot find the file specified.

Tanya
Telerik team
 answered on 12 Mar 2018
5 answers
322 views

Hi!

I'm trying to use binding in DragDropBehavior of RadListBox like this

<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="MyProject.Views.MyView"
                     ....
                     xmlns:behaviors="clr-namespace:MyProject.Behaviors"
                     
mc:Ignorable="d"
                     d:DesignHeight="300"
                     d:DesignWidth="300">
<Grid>
          ...
           <telerik:RadListBox ItemsSource="{Binding Items}"
                         <telerik:RadListBox.DragDropBehavior>
                                       <behaviors:MyDragDropBehavior AllowReorder="True" DropCommand="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Path=DataContext.DropCommand}"/>
                         </telerik:RadListBox.DragDropBehavior>
           </telerik:RadListBox>
</Grid>
</UserControl>

View gets viewmodel via injection

public partial class MyView : UserControl
{
                   public MyView (ViewModels.MyViewModel viewModel)
                   {
                                InitializeComponent();
                                DataContext = viewModel;
                    }
}

Behavior code:

public class MyDragDropBehavior : Telerik.Windows.DragDrop.Behaviors.ListBoxDragDropBehavior
{
                   public override bool CanDrop(Telerik.Windows.DragDrop.Behaviors.DragDropState state)
                   {
                                    return state.IsSameControl;
                   }
                 
                 public override void Drop(Telerik.Windows.DragDrop.Behaviors.DragDropState state)
                  {
                                  base.Drop(state);
                                  DropCommand.Execute(null);
                  }
                 
                 public ICommand DropCommand
                 {
                               get { return (ICommand)GetValue(DropCommandProperty); }
                               set { SetValue(DropCommandProperty, value); }
                 }
 
                  public static readonly DependencyProperty DropCommandProperty =DependencyProperty.Register("DropCommand", typeof(ICommand), typeof(MyDragDropBehavior), new PropertyMetadata(null));
}

Items binding is working well. Behavior is working but binding to DropCommand is not. I obtain binding error:

Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.UserControl', AncestorLevel='1''. BindingExpression:Path=DataContext.DropCommand; DataItem=null; target element is 'MyDragDropBehavior' (HashCode=25707777); target property is 'DropCommand' (type 'ICommand')

ViewModel is

public class MyViewModel
{
                     public MyViewModel()
                     {
                                      DropCommand = new DelegateCommand(OnDrop);
                                      Items = new ObservableCollection<MyItem>();
                      }
                     public ObservableCollection<MyItem> Items { get; set; }
                     public DelegateCommand DropCommand { get; set; }

                     private void OnDrop(){}
}

What is wrong?

Martin
Telerik team
 answered on 12 Mar 2018
1 answer
67 views

Hello Team,

We are into the WPF application development. We are using the RadPivotGrid control to view the information grid. To view the same BI format we are saving the  view(i.e in XML format). When we save the view. our application is saving the data in our database in XML format. Please review the attached file which is saved in xml format. But we want to know the what is the <ValueTypes> node which is created while saving the view. We want to know what is the version number saved in the file. Is there any relation with .net framework version while generating the XML string?

Below is the XML string.

<?xml version="1.0"?>
<RawData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <SerializationString>&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;Data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;T&gt;
    &lt;TI K="1984105613" N="Telerik.Pivot.Core.LocalDataSourceProvider, Telerik.Pivot.Core, Version=2014.2.729.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7" /&gt;
  &lt;/T&gt;
  &lt;P&gt;
    &lt;PV Key="1" TypeKey="-664072138"&gt;
      &lt;Value xsi:type="xsd:string"&gt;&amp;lt;DataProviderSettings xmlns="http://schemas.datacontract.org/2004/07/AIMSDotNet" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&amp;gt;&amp;lt;Aggregates xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"&amp;gt;&amp;lt;a:anyType i:type="b:PropertyAggregateDescription" xmlns:b="http://schemas.datacontract.org/2004/07/Telerik.Pivot.Core"&amp;gt;&amp;lt;b:CustomName i:nil="true"/&amp;gt;&amp;lt;b:TotalFormat i:nil="true" xmlns:c="http://schemas.datacontract.org/2004/07/Telerik.Pivot.Core.Totals"/&amp;gt;&amp;lt;b:StringFormat i:nil="true"/&amp;gt;&amp;lt;b:StringFormatSelector i:nil="true" xmlns:c="http://schemas.datacontract.org/2004/07/Telerik.Pivot.Core.Aggregates"/&amp;gt;&amp;lt;b:AggregateFunction i:type="b:SumAggregateFunction" xmlns:c="http://schemas.datacontract.org/2004/07/Telerik.Pivot.Core.Aggregates"/&amp;gt;&amp;lt;b:PropertyName&amp;gt;Stock&amp;lt;/b:PropertyName&amp;gt;&amp;lt;/a:anyType&amp;gt;&amp;lt;/Aggregates&amp;gt;&amp;lt;AggregatesLevel&amp;gt;0&amp;lt;/AggregatesLevel&amp;gt;&amp;lt;AggregatesPosition&amp;gt;Rows&amp;lt;/AggregatesPosition&amp;gt;&amp;lt;Columns xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"&amp;gt;&amp;lt;a:anyType i:type="b:PropertyGroupDescription" xmlns:b="http://schemas.datacontract.org/2004/07/Telerik.Pivot.Core"&amp;gt;&amp;lt;b:CustomName i:nil="true"/&amp;gt;&amp;lt;b:GroupComparer i:type="b:GroupNameComparer"/&amp;gt;&amp;lt;b:SortOrder&amp;gt;Ascending&amp;lt;/b:SortOrder&amp;gt;&amp;lt;b:GroupFilter i:nil="true" xmlns:c="http://schemas.datacontract.org/2004/07/Telerik.Pivot.Core.Filtering"/&amp;gt;&amp;lt;b:ShowGroupsWithNoData&amp;gt;false&amp;lt;/b:ShowGroupsWithNoData&amp;gt;&amp;lt;b:CalculatedItems/&amp;gt;&amp;lt;b:PropertyName&amp;gt;WarehouseCode&amp;lt;/b:PropertyName&amp;gt;&amp;lt;/a:anyType&amp;gt;&amp;lt;/Columns&amp;gt;&amp;lt;Filters xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/&amp;gt;&amp;lt;Rows xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"&amp;gt;&amp;lt;a:anyType i:type="b:PropertyGroupDescription" xmlns:b="http://schemas.datacontract.org/2004/07/Telerik.Pivot.Core"&amp;gt;&amp;lt;b:CustomName i:nil="true"/&amp;gt;&amp;lt;b:GroupComparer i:type="b:GroupNameComparer"/&amp;gt;&amp;lt;b:SortOrder&amp;gt;Ascending&amp;lt;/b:SortOrder&amp;gt;&amp;lt;b:GroupFilter i:nil="true" xmlns:c="http://schemas.datacontract.org/2004/07/Telerik.Pivot.Core.Filtering"/&amp;gt;&amp;lt;b:ShowGroupsWithNoData&amp;gt;false&amp;lt;/b:ShowGroupsWithNoData&amp;gt;&amp;lt;b:CalculatedItems/&amp;gt;&amp;lt;b:PropertyName&amp;gt;StyleDescription&amp;lt;/b:PropertyName&amp;gt;&amp;lt;/a:anyType&amp;gt;&amp;lt;a:anyType i:type="b:PropertyGroupDescription" xmlns:b="http://schemas.datacontract.org/2004/07/Telerik.Pivot.Core"&amp;gt;&amp;lt;b:CustomName i:nil="true"/&amp;gt;&amp;lt;b:GroupComparer i:type="b:GroupNameComparer"/&amp;gt;&amp;lt;b:SortOrder&amp;gt;Ascending&amp;lt;/b:SortOrder&amp;gt;&amp;lt;b:GroupFilter i:nil="true" xmlns:c="http://schemas.datacontract.org/2004/07/Telerik.Pivot.Core.Filtering"/&amp;gt;&amp;lt;b:ShowGroupsWithNoData&amp;gt;false&amp;lt;/b:ShowGroupsWithNoData&amp;gt;&amp;lt;b:CalculatedItems/&amp;gt;&amp;lt;b:PropertyName&amp;gt;ColorDescription&amp;lt;/b:PropertyName&amp;gt;&amp;lt;/a:anyType&amp;gt;&amp;lt;a:anyType i:type="b:PropertyGroupDescription" xmlns:b="http://schemas.datacontract.org/2004/07/Telerik.Pivot.Core"&amp;gt;&amp;lt;b:CustomName i:nil="true"/&amp;gt;&amp;lt;b:GroupComparer i:type="b:GroupNameComparer"/&amp;gt;&amp;lt;b:SortOrder&amp;gt;Ascending&amp;lt;/b:SortOrder&amp;gt;&amp;lt;b:GroupFilter i:nil="true" xmlns:c="http://schemas.datacontract.org/2004/07/Telerik.Pivot.Core.Filtering"/&amp;gt;&amp;lt;b:ShowGroupsWithNoData&amp;gt;false&amp;lt;/b:ShowGroupsWithNoData&amp;gt;&amp;lt;b:CalculatedItems/&amp;gt;&amp;lt;b:PropertyName&amp;gt;Size&amp;lt;/b:PropertyName&amp;gt;&amp;lt;/a:anyType&amp;gt;&amp;lt;/Rows&amp;gt;&amp;lt;/DataProviderSettings&amp;gt;&lt;/Value&gt;
    &lt;/PV&gt;
  &lt;/P&gt;
  &lt;R&gt;
    &lt;RV Key="21184986" IsRoot="true" TypeKey="1984105613"&gt;
      &lt;D&gt;
        &lt;PD PN="" VK="1" RK="0" TK="1984105613" TCK="0" /&gt;
      &lt;/D&gt;
    &lt;/RV&gt;
  &lt;/R&gt;
&lt;/Data&gt;</SerializationString>
  <ValueTypes>
    <string>Telerik.Pivot.Core.LocalDataSourceProvider, Telerik.Pivot.Core, Version=2014.2.729.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7</string>
  </ValueTypes>
</RawData>

We want to know what is the significance of the  version number(i.e Version=2014.2.729.45) in the below context? 

  <ValueTypes>
    <string>Telerik.Pivot.Core.LocalDataSourceProvider, Telerik.Pivot.Core, Version=2014.2.729.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7</string>
  </ValueTypes>
</RawData>

Following are the software specifications

OS: WINDOWS 10

.Net Framework: 4.6.2

Telerik Version: 14.2.729.0

 

Regards,

Chakradhar

 

 

Dilyan Traykov
Telerik team
 answered on 12 Mar 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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?