Telerik Forums
UI for WPF Forum
1 answer
281 views
Hi. I'm trying to figure out how to locate modify the attributes of a Hyperlink (e.g. NavigateUri) after it's been created. What's puzzling me is that it seems that you can create a HyperlinkInfo object and then insert it into the document, but there doesn't seem to be any way to get a HyperlinkInfo object back from the document. When I import my document from RTF and then save as xaml, I got the following results (at bottom.)

I know that there are ways to pull back start tags, inlines, and so forth, but none of those seem to correspond to an actual HyperlinkInfo object. Furthermore, I'm seeing two different kinds of Hyperlink information (one in the <FieldRangeStart...>xxxx</FieldRangeStart...> pair, and another in the <HyperlinkRangeStart...>xxxx</HyperlinkRangeStart> pair. It's not clear where I should make mods.

Also: In your InsertHyperlink demo, if I insert a Hyperlink and then come back to edit it, then in module InsertHyperlinkDialog.xaml.cs, the ShowDialog procedure on line 74 includes a parameter for "CurrentHyperLinkInfo as HyperlinkInfo". Indeed, if I break at that point, the information is there, having apparently been supplied by the editor. However, I cannot figure out how to get the same info independent of the editor.

Please explain how this all works. The xaml snippet I promised is as follows:

<t:FieldRangeStart AnnotationID="558">
       <t:HyperlinkField DateTimeFormatting="" DisplayMode="Result" GeneralFormatting="" LocationInFile="" NavigateUri="hypercase:///cite_000031"
NumericFormatting="" Target="" />
</t:FieldRangeStart>
<t:HyperlinkRangeStart AnnotationID="559">
    <t:HyperlinkInfo NavigateUri="hypercase:///cite_000031" />
</t:HyperlinkRangeStart>
    <t:Span FontSize="16" FontStyle="Italic" StyleName="Hyperlink" Text="Ass’n of Am. Physicians and Surgeons Inc. v. Clinton" />
    <t:Span FontSize="16" StyleName="Hyperlink" Text=", 997 F.2d 898, 909 (D.C. Cir. 1993)" />
<t:HyperlinkRangeEnd AnnotationID="559" />
<t:FieldRangeEnd AnnotationID="558" />



 

Tanya
Telerik team
 answered on 27 Nov 2014
2 answers
93 views
A two way binding to selected item is not applying the "Selected" (in this case "Pressed") template to the timeline item.

Surely expected behaviour would be the same as that of a Gridview or Listview, that is, setting the SelectedItem/s in the view model should result in the same appearance as if the user had actually clicked the timeline item with the SelectionMode set to single?
Tsvetie
Telerik team
 answered on 27 Nov 2014
5 answers
195 views
Hi,

I have strange tab navigation here:

When
   - the first cell in grid is current and the user presses <Shift>+<Tab> the GridView is focused
   - if the last cell in grid is current and the user presses <Tab> the GridView is focused

Normally I would expect that the first focusable element before the GridView or after the GridView is focused, but not the GridView itself. I would like to hide the focus visual on the GridView, but if the GridView is focused, the user looses orientation without a focus visual.

I have tried to make the GridView Focusable="false". This does not work, because the implementation expects the GridView to be focusable. Otherwise other things do not work.

What seems to be strange is that the GirdView moves the focus correctly in the first place but afterwards a second tab navigation routine is executed in the .NET core, that moves the focus again to the GridView. It seems that the KeyDown event is not marked as Handled in these cases and the focus moves twice. Is this behavior caused on our side or is it a bug? Thx.
Dimitrina
Telerik team
 answered on 27 Nov 2014
1 answer
462 views
Hi,

I am using version 2014.1.0310.40

I create a map with 3 layers, all of which inherit from VisualizationLayer.  Sometimes when I delete one of these layers, I get the following exception

Cannot modify the logical children for this node at this time because a tree walk is in progress.  
at System.Windows.FrameworkElement.RemoveLogicalChild(Object child)
   at System.Windows.Controls.UIElementCollection.RemoveInternal(UIElement element)
   at System.Windows.Controls.UIElementCollection.Remove(UIElement element)
   at Telerik.Windows.Controls.Map.MapLayerCell.RemoveItem(MapObjectInfo info)
   at Telerik.Windows.Controls.Map.VisualizationLayer.AddItemToCluster(MapObjectInfo newInfo)
   at Telerik.Windows.Controls.Map.VisualizationLayer.AddItemToClusterOrCell(MapObjectInfo info)
   at Telerik.Windows.Controls.Map.VisualizationLayer.ArrangeItem(Object item)
   at Telerik.Windows.Controls.Map.MapLayer.LocationChangedHandler(DependencyObject source, DependencyPropertyChangedEventArgs eventArgs)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
   at System.Windows.StyleHelper.InvalidateContainerDependents(DependencyObject container, FrugalStructList`1& exclusionContainerDependents, FrugalStructList`1& oldContainerDependents, FrugalStructList`1& newContainerDependents)
   at System.Windows.StyleHelper.DoStyleInvalidations(FrameworkElement fe, FrameworkContentElement fce, Style oldStyle, Style newStyle)
   at System.Windows.StyleHelper.UpdateStyleCache(FrameworkElement fe, FrameworkContentElement fce, Style oldStyle, Style newStyle, Style& styleCache)
   at System.Windows.FrameworkElement.OnStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
   at System.Windows.FrameworkElement.UpdateStyleProperty()
   at System.Windows.FrameworkElement.InvalidateTreeDependentProperties(TreeChangeInfo parentTreeState, Boolean isSelfInheritanceParent)
   at System.Windows.FrameworkElement.OnAncestorChangedInternal(TreeChangeInfo parentTreeState)
   at System.Windows.TreeWalkHelper.OnAncestorChanged(DependencyObject d, TreeChangeInfo info, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at MS.Internal.PrePostDescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at MS.Internal.PrePostDescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at MS.Internal.PrePostDescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at MS.Internal.PrePostDescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at MS.Internal.PrePostDescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
   at MS.Internal.PrePostDescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
   at System.Windows.TreeWalkHelper.InvalidateOnTreeChange(FrameworkElement fe, FrameworkContentElement fce, DependencyObject parent, Boolean isAddOperation)
   at System.Windows.FrameworkElement.OnVisualParentChanged(DependencyObject oldParent)
   at System.Windows.Media.Visual.FireOnVisualParentChanged(DependencyObject oldParent)
   at System.Windows.Media.Visual.RemoveVisualChild(Visual child)
   at System.Windows.Media.VisualCollection.DisconnectChild(Int32 index)
   at System.Windows.Media.VisualCollection.RemoveRange(Int32 index, Int32 count)
   at System.Windows.Controls.UIElementCollection.RemoveRangeInternal(Int32 index, Int32 count)
   at System.Windows.Controls.Panel.RemoveChildren(GeneratorPosition pos, Int32 containerCount)
   at System.Windows.Controls.Panel.OnItemsChangedInternal(Object sender, ItemsChangedEventArgs args)
   at System.Windows.Controls.Panel.OnItemsChanged(Object sender, ItemsChangedEventArgs args)
   at System.Windows.Controls.ItemContainerGenerator.OnItemRemoved(Object item, Int32 itemIndex)
   at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
   at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
   at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at System.Windows.Controls.ItemCollection.OnViewCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
   at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
   at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
   at System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
   at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
   at System.Collections.ObjectModel.Collection`1.Remove(T item)
   at Apteco.Client.Visualisations.Map.WPF.Map.Model.Layers.LayersCollection.RemoveLayer(String layerName)

At present I have caught the exception and carried on, but I would be interested in fixing the issue

Thanks
Simon
Petar Mladenov
Telerik team
 answered on 27 Nov 2014
10 answers
190 views
Hello All,

I want to implement Cut, Copy and Paste feature for the Mind Map demo available in Telerik UI for WPF. So suppose I want to copy a node and its attached sub-children and paste it as children of another node.

Kindly help that how can I do this if I want to extend the Mind Map sample with this feature. 
Zarko
Telerik team
 answered on 27 Nov 2014
1 answer
201 views
Hi!

I have two problems but they are the same:

In my scenario I have a raddiagram and, in a moment of my application, I have show the diagram and to do zoom. If I put Diagram.IsEnabled = false, zoom doesn't works. In the other way, I put other attributes (resizing, draggin,...) at false, the zoom works correctly, but Diagram obtains the focus (I put Focusable = false) and I don't want this case, because I need to have the focus in another place of the window.

Exists the other way for to do this scenario?

Maite.
Pavel R. Pavlov
Telerik team
 answered on 27 Nov 2014
6 answers
211 views
Hello,
I followed your code for DiagramToolBox in Telerik Demo (please, check the attached image).
But the Cell Size doesn't work! Even I can see the initial value (20,20).
I tried Debug it, It wasn't hitting the setter in the property at all!

I added 
UpdateSourceTrigger=PropertyChanged and Converter={StaticResource DoubleToStringConverter}} to TextBox line. I thought I would need them. But it didn't work!
                           <StackPanel Orientation="Horizontal" Margin="10 12 10 0"><br>                                        <TextBlock Text="Cell Size" Width="90" Margin="20 0" VerticalAlignment="Center" /><br>                                        <TextBox Width="80" Text="{Binding CellSize, Mode=TwoWayUpdateSourceTrigger=PropertyChanged, <br>                                                                                                               Converter=   {StaticResource DoubleToStringConverter}}" /><br>                            </StackPanel>

How it is working in the Demo without a converter ?

Thank you.
Alaa
Top achievements
Rank 1
 answered on 27 Nov 2014
6 answers
542 views
hi

 

i have main window for the WPF aplication.
how can i put the radwindow onside the  main windows,
so the  sub radwindow  will be only onside the main window, (detemine RestrictionZone,some thing like MDI)

private
void button1_Click(object sender, RoutedEventArgs e)

 

{

 

RadWindow t = new RadWindow();

 

t.Width = 500;t.Height = 300;

t.Show();

}


/*
on asp  .net telerik i know how to do it, But on WPF i have no idea( need help)

 

<telerik:RadWindowManager ID="RadWindowManager1" RestrictionZoneID="windowsDataArea" runat="server">

 

 

<Windows>

 


*/

Kalin
Telerik team
 answered on 27 Nov 2014
1 answer
194 views
Hi!

I try to use the ScheduleView control for tasks of my agents.
Every task has a date, but not a time, therefore I want to hide Time ticks.
I write this xaml code:

<telerik:WeekViewDefinition MajorTickLength="1day" MinorTickLength="1day" ShowTimeRuler="False" ShowAllDayArea="False"  />

The result shown in WeekViewDefinition.png attached file.
My questions are:

1. why I see a long vertical scrollbar? and how can I fix it?
2. I want show the Appointments in matrix, [like WeekViewMatrixDefinition.png attached file]. how can I do it?

Thank you for any help.
yehuda
Yana
Telerik team
 answered on 27 Nov 2014
3 answers
215 views
Hi

I want to change the behaviour of certain commands - as one example, I want to be able to execute ChangePageOrientationCommand in a protected document.  The current value of CanExecuteBehaviorInProtectedDocument for that command is CanExecuteBehaviorInProtectedDocument.Never.

So, easy, right?  I can derive from ChangePageOrientationCommand and override CanExecuteBehaviorInProtectedDocument.  Done.

Then what I'd like to do is derive from RichTextBoxCommands, override the virtual ChangePageOrientationCommand and set the public Commands dependency property on RadRichTextBox... but I can't - the RichTextBoxCommands constructor is internal.

Is there an extensibility point I'm missing?  

While I could just instantiate this new command elsewhere and point by ribbon button to this, I'd also like to subtly change the behavior of InsertCommand and DeleteCommand (so they don't execute in certain scenarios).  This is much harder, as they're called internally by keyboard and mouse handling.

Thanks

Charlie
Mihail
Telerik team
 answered on 27 Nov 2014
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?