Telerik Forums
UI for WPF Forum
32 answers
305 views
Has anyone  got an example or tutorial of using SQL Tables to store Gantt View information?
Martin Ivanov
Telerik team
 answered on 02 Oct 2018
3 answers
170 views

Hi everyone,

I would like to customize the AppointmentDialog and the RecurrenceDialog in same time but I have a problem.

So, I made in two ResourceDictionary a ControlTemplate foreach Dialog.

  • <ControlTemplate x:Key="EditAppointmentTemplate" TargetType="telerik:SchedulerDialog">...</ControlTemplate >
  • <ControlTemplate x:Key="EditRecurrenceTemplate" TargetType="telerik:SchedulerDialog">...</ControlTemplate >

After that, I create another ResourceDictionary where I define the Styles :

  •                     <Style BasedOn="{StaticResource EditRecurrenceDialogStyle}" TargetType="telerik:SchedulerDialog" x:Key="EditRecurrenceDialogStyle">
                            <Setter Property="Template" Value="{StaticResource EditRecurrenceTemplate}"/>
                        </Style>
  •                     <Style BasedOn="{StaticResource EditAppointmentDialogStyle}" TargetType="telerik:SchedulerDialog" x:Key="EditAppointmentDialogStyle">
                            <Setter Property="Template" Value="{StaticResource EditAppointmentTemplate}"/>
                        </Style>

Then, in the telerik:RadScheduleView I set the proprieties in the following way :

  •             <telerik:RadScheduleView
                                        ...
                                        AppointmentsSource="{Binding Appointments}"
                                        EditRecurrenceDialogStyle="{StaticResource EditRecurrenceDialogStyle}"
                                        EditAppointmentDialogStyle="{StaticResource EditAppointmentDialogStyle}"
                                        ...>

When I test the styles individually it works. However when I test with both styles define, I have this error:

  • ArgumentException: Item has already been added. Key in dictionary: 'Telerik.Windows.Controls.SchedulerDialog'  Key being added: 'Telerik.Windows.Controls.SchedulerDialog'

How can I fix that ?
Thanks in advance for your help.

Gael
Top achievements
Rank 1
 answered on 01 Oct 2018
9 answers
231 views
I currently provide columns and bar charts with a LinearAxis using a ScatterPointSeries with a custom PointTemplate and SmartLabelStrategy (as suggested in this forum). However, now I need to add functionality for Stacked and Stacked100 bars/columns that are supported by BarSeries.  I would prefer to have less, not more, code just to draw the bars/columns for a LinearAxis.  Are there any plans to support a BarSeries for LinearAxis?  Thanks - Mitch
Dinko | Tech Support Engineer
Telerik team
 answered on 01 Oct 2018
5 answers
371 views

If I use a TabControl with the Fluent theme and switch to the dark mode then the header of the control does not switch to dark theme properly.

The background seems transparent and the header content is not visible.

Version 2018 R3

See really simple sample project attached (renamed zip to jpg ;) ).


Dinko | Tech Support Engineer
Telerik team
 answered on 01 Oct 2018
6 answers
195 views

i have two problems in using map control in right to left

i am using a custom map tile provider

the flow direction of my application is right to left when i open the map control my map tiles are mirrored all the streets and texts and ... are reverse as if i have put the image in front of a mirror. to relieve that issue i put the flow direction of the rad map to left to right. now i have my second problem! when i want to export the map view as a png file the exported file is mirrored!

is this a known issues or am i doing something wrong ?

thx in advance for your help

Sayyed Hossein
Top achievements
Rank 1
 answered on 29 Sep 2018
1 answer
132 views

     Hi there,

I want to be able to show symbol shapes in the toolbox but create the actual shapes when it is dropped on the diagram. right now gallery items accept a shape but cant change the appearance of it. style templates didnt work either. any idea how to do this ?

Zickige
Top achievements
Rank 1
 answered on 28 Sep 2018
4 answers
212 views

Hello,

I'm getting a Dictionnary exception when using the Import function of the RtfFormatProvider in a Task.

Here's an example of the code that is run:

Private Async Sub LoadItems
   Dim loadingTasks As New List(Of Task)
   '-- Async task #1
   loadingTasks.Add(Task.Run(Function() LoadData1(paramObj)))
   '-- Async task #2
   loadingTasks.Add(Task.Run(Function() LoadData2(paramObj)))
End Sub
 
Private Function LoadData1(paramObj As Object)
   Dim objectList = New List(Of MyItemClass)
 
   objectList.AddRange(New ObservableCollection(Of MyItemClass)(MyItemClass.GetAll())
 
   Return objectList
End Function
 
'In MyItemClass:
Public Function GetAll() As List(Of MyItemClass)
   '[Some code...]
   Dim frmtValue As String
   '[Some more code...]
   Dim doc As New RadDocument()
   Dim rfp As New RtfFormatProvider()
 
   doc = rfp.Import(frmtValue) 'The exception is triggered here
   '[Some code...]
End Function

 

I'm loading items in parralel using Tasks.

Those items have a property bound to a RichTextBox and I'm deserializing the RTF string in a RadDocument through a RtfFormatProvider.

The code worked fine when I didn't use the Tasks and called the function in a synchronous way. However, since I switch to Tasks, I get the follwing error on the Import method:

"An item with the same key has already been added"

at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at Telerik.Windows.Documents.FormatProviders.ReplaceStyleNameHandler.Add(String displayName, String name)
   at Telerik.Windows.Documents.FormatProviders.ReplaceStyleNameHandler.InitializeStyleDisplayNameToStyleNameDictionary()
   at Telerik.Windows.Documents.FormatProviders.ReplaceStyleNameHandler.get_StyleDisplayNameToStyleName()
   at Telerik.Windows.Documents.FormatProviders.ReplaceStyleNameHandler.TryGetStyleNamesByStyleName(String displayName, RadDocumentDefaultStyleInfo& defaultStyleInfo)
   at Telerik.Windows.Documents.FormatProviders.ReplaceStyleNameHandler.Replace(ReplaceStyleNameContext context)
   at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfStyleImporter.DoVisitText(RtfText text)
   at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfElementIteratorBase.VisitElement(RtfElement element, Boolean recursive)
   at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfElementIteratorBase.VisitGroupChildren(RtfGroup group, Boolean recursive)
   at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfStyleImporter.ImportStyleGroup(RtfGroup group)
   at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfStylesTable.FillStyle(RtfGroup group, StyleType type, Boolean isDefault)
   at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfStylesTable.DoVisitGroup(RtfGroup group)
   at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfElementIteratorBase.VisitElement(RtfElement element, Boolean recursive)
   at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfElementIteratorBase.VisitGroupChildren(RtfGroup group, Boolean recursive)
   at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfStylesTable.ReadTable(RtfGroup group, RtfImportContext context)
   at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfHandlers.RtfGroupHandlers.StylesTableHandler(RtfGroup group, RtfImportContext context)
   at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfDocumentImporter.DoVisitGroup(RtfGroup group)
   at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfElementIteratorBase.VisitElement(RtfElement element, Boolean recursive)
   at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfElementIteratorBase.VisitGroupChildren(RtfGroup group, Boolean recursive)
   at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfDocumentImporter.ImportRoot(RtfGroup rtfGroup)
   at Telerik.Windows.Documents.FormatProviders.Rtf.Import.RtfDocumentImporter.Import(Stream input, RtfImportSettings settings)
   at Telerik.Windows.Documents.FormatProviders.Rtf.RtfFormatProvider.Import(Stream input)
   at Telerik.Windows.Documents.FormatProviders.Rtf.RtfFormatProvider.Import(String input)

 

(PS: The code has been tested with the latest release of UI for WPF)

 

I don't suppose the RtfFormatProvider has a hidden ConcurrentDictionary somewhere that could solve this? :)

Do you know if what I'm trying to acheive is possible?

Boby
Telerik team
 answered on 28 Sep 2018
3 answers
127 views

I am saving the layout using the savelayout method on the docking control.

This works fine (although i have no pane titles but that is another question) until I float panes on external monitors (I have 3). 

When I do this and I use the save layout method I get an error 'Managed Debugging Assistant: 'FatalExecutionEngineError'. The runtime has encountered a fatal error. The address of the error was at 0x65bf395f, on thread 0x4548. The error code is 0x80131623. This error may be a bug in the CLOR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.

My code (in the Window closing event) is:

MemoryStream stream = new MemoryStream();
DockMain.SaveLayout(stream);

stream.Seek(0, SeekOrigin.Begin);

StreamReader reader = new StreamReader(stream);

var layout = reader.ReadToEnd();

Then i persist layout to a file.

 

Can you please assist.

 

Rob

Dilyan Traykov
Telerik team
 answered on 27 Sep 2018
2 answers
212 views

Hi,

Based on this ( https://www.telerik.com/forums/cannot-implicitly-convert-type-radwindow-to-window )

i tried to get the HostWindow in an mvvm + prism with prismapplication.

But it failed in CreateShell() the Shell is a RadWindow and is created but there is no HostWindow retuned and so it will not work.

Maybe because in PRism the changed the return Type to Window ( i think it was DependencObject before ) 

but so what can i do to return the Shell here ? 

thanks br

thomas

 

protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
    containerRegistry.RegisterSingleton<ShellWindow>();
}
 
protected override Window CreateShell()
{
    var shellwin = Container.Resolve<ShellWindow>();
    var appwin = Window.GetWindow(shellwin);
    return appwin;
}

 

Thomas
Top achievements
Rank 1
 answered on 27 Sep 2018
1 answer
255 views

I want to be able to toggle between the different orientations of the schedule view. I have a property bound to my view model but this doesn't seem to be working. I have tried different variations. Can someone tell me what i may be missing?

<p><telerik:TimelineViewDefinition  VisibleDays="30" <br>                                                     x:Name="TimelineViewDefinition"<br>                                                     MajorTickLength="1d" <br>                                                     Orientation="{Binding DataContext.ScheduleViewOrientation, RelativeSource={RelativeSource Mode=FindAncestor,                                                                                             AncestorType=telerik:RadScheduleView}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"</p><p>                                                     StretchAppointments="True"<br>                                                     MinorTickLength="1d"  <br>                                                     GroupHeaderDateStringFormat="MM-dd"<br>                                                     StretchGroupHeaders="False" ></p>




Dilyan Traykov
Telerik team
 answered on 26 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
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
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?