Telerik Forums
UI for WPF Forum
1 answer
362 views
I would remove the RadGridView scrollbars, I will use the RadDataPager to display only the amount of items that fit on the screen. But is not working. Any idea how to proceed? Sorry for my bad English.

My Code:

<Grid>
 
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition x:Name="rGridView"
                       Height="*" />
    </Grid.RowDefinitions>
 
    <telerik:RadDataPager PageSize="{Binding LinhasGridView, ElementName= ucCadastroCidade}"
                          Grid.Row="0"
                          Source="{Binding Items, ElementName=dtCidade}"
                          IsTotalItemCountFixed="True"
                          DisplayMode="FirstLastPreviousNextNumeric, Text" />
 
    <telerik:RadGridView x:Name="dtCidade"
                         Grid.Row="1"
                         AutoGenerateColumns="False"
                         ItemsSource="{Binding ListaCidade, ElementName= ucCadastroCidade}">
        <telerik:RadGridView.Columns>
            <telerik:GridViewDataColumn Width="*"
                                        Header="Cidade"
                                        DataMemberBinding="{Binding nm_Cidade}" />
            <telerik:GridViewDataColumn Width="*"
                                        Header="Estado"
                                        DataMemberBinding="{Binding UF.nm_Uf}" />
        </telerik:RadGridView.Columns>
    </telerik:RadGridView >
 
</Grid>


Here I do the calculation:

LinhasGridView = (double)(rGridView.ActualHeight / dtCidade.RowHeight);

Thank you!

Boris
Telerik team
 answered on 28 Nov 2014
1 answer
239 views
I would like to add a image in Raddocument  behind table. 
How can I do this?

Tanya
Telerik team
 answered on 27 Nov 2014
3 answers
119 views
I'm programmatically generating LegendItems for a RadLegend object, but the labels for the legend all seem to be partially transparent or grayed out or something. I can't find any properties to change this, and it doesn't seem like default behavior since the documentation doesn't show anything like this.

XAML:
<UserControl x:Class="Construct.UX.Views.Visualizations.DataLegend"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <telerik:RadLegend x:Name="Legend" />
    </Grid>
</UserControl>


Item generation code:
// ...
 
LegendItem newLegendItem = new LegendItem();
newLegendItem.MarkerFill = new SolidColorBrush(newEntry.Color);
newLegendItem.Title = newEntry.Name;
 
// ...
 
Legend.Items.Add(newLegendItem);
 
// ...
Sia
Telerik team
 answered on 27 Nov 2014
1 answer
234 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
68 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
161 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
400 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
149 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
172 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
171 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
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?