Telerik Forums
UI for WPF Forum
1 answer
70 views

HI all,

        I have created a rad pane custom control in a class say

public class CustomControl:RadPane{}
and i want to use that in my user control ,added the reference of the control and used it.
But the radpane header is not seen when used with the custom control ,only seen when we added a style to it but i dont want to apply any styles to the custom rad pane how can i achieve this?

Thanks in advance...
Masha
Telerik team
 answered on 10 Dec 2013
1 answer
152 views
Hi,

I have to show some 'POIs' on a map.
The POIs collection is bound using a typical MVVM approach.
Once the map is loaded, a 'best fit' must be applied to see all the POIs as closely as possible.
Finally, I must be able to change the location of the POIs by using drap and drop.

In my first attempt, I used MapPinPoint as elements for the POIs.
The 'move' operation was working fine, but unfortunately the GetBestView gave strange results.
(In fact I had to call it several times in order to really get the best view)
Here is the xaml for the pin point :

        <DataTemplate x:Key="ObstructionPointItemTemplate" DataType="mapLayers:ObstructionPointViewModel">
            <telerik:MapPinPoint                                        
                                        telerik:MapLayer.Location="{Binding Path=Location}"                                        
                                        ToolTip="{Binding Label}"
                                        >
                <i:Interaction.Behaviors>
                    <behaviors:PointBehavior/> <!--This behavior allows the drap and drop move-->
                </i:Interaction.Behaviors>
            </telerik:MapPinPoint>
        </DataTemplate>


Based on the decompiled code, I assumed my issue with 'GetBestView' was due to the fact that MapPinPoint wasn't a 'MapShape'
Thus, I decide to give it a chance with 'MapEllipse' :

        <DataTemplate x:Key="ObstructionPointItemTemplate" DataType="mapLayers:ObstructionPointViewModel">
            <telerik:MapEllipse Width="0.1"
                                        Height="0.1"
                                        telerik:MapLayer.Location="{Binding Path=Location}"
                                        Fill="{StaticResource PointFill}"                                        
                                        ToolTip="{Binding Label}"
                                        Stroke="{StaticResource ObstructionPointColor}"                                      
                                        StrokeThickness="2"                                
                                        >
            </telerik:MapEllipse>
        </DataTemplate>

Then the 'GetBestView()' just works fine, but unfortunately, I'm don't know how I can nicely implements the 'drag and drop' feture for MapShape.


Can you please provide some help ?

Thx
Andrey
Telerik team
 answered on 10 Dec 2013
3 answers
226 views
Just upgraded to 2013.3.1204 and installing Local Demos is no longer an option. Neither during the upgrade or later after 2013.3.1204 is installed using Turn Features On/Off.

ASP.NET and Kendo still have Local Demos but not WPF. Local Demos are really useful and provide plenty of source code as reference. 

If I install the click once WPF demos from the web site will I get the source code as well?
Yana
Telerik team
 answered on 10 Dec 2013
0 answers
111 views
I have been usingDocumentFragment to assemble a RadDocument from RadDocuments, but need to maintain the section headers from the original document. Currently they get dumped when assembling the document.

			var radDocument = RadDocumentHelper.GetDefaultDocument();
			foreach (var item in ClausesSelectedList)
			{
				radDocument = item.ClauseData.GetRadDocument(FieldOrderNumber, RevNumber.Value);
				var section = new Section();
				var frag = new DocumentFragment(radDocument);
				var docPos1 = new DocumentPosition(radDocument);
				docPos1.MoveToLastPositionInDocument();
				radDocument.InsertFragment(frag, docPos1);
			}
Clifford
Top achievements
Rank 1
 asked on 10 Dec 2013
1 answer
134 views
I am getting a null exception when trying to bind a raddocument to a radrichtextbox: {Void RecalculateRowHeights(Telerik.Windows.Documents.Layout.TableLayoutBox, Boolean)}

Here is the stack trace:

   at Telerik.Windows.Documents.Model.Table.RecalculateRowHeights(TableLayoutBox tableBox, Boolean shouldMeasureCells) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Model\Table.cs:line 960

   at Telerik.Windows.Documents.Layout.TableLayoutBox.MeasureOverride(SizeF availableSize) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Layout\TableLayoutBox.cs:line 278

   at Telerik.Windows.Documents.Layout.LayoutElement.MeasureCore(SizeF availableSize) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Layout\LayoutElement.cs:line 929

   at Telerik.Windows.Documents.Layout.LayoutElement.Measure(SizeF availableSize) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Layout\LayoutElement.cs:line 832

   at Telerik.Windows.Documents.Layout.SectionLayoutBox.MeasureOverrideInternal(SizeF availableSize) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Layout\SectionLayoutBox.cs:line 473

   at Telerik.Windows.Documents.Layout.SectionLayoutBox.MeasureOverride(SizeF availableSize) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Layout\SectionLayoutBox.cs:line 277

   at Telerik.Windows.Documents.Layout.LayoutElement.MeasureCore(SizeF availableSize) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Layout\LayoutElement.cs:line 929

   at Telerik.Windows.Documents.Layout.LayoutElement.Measure(SizeF availableSize) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Layout\LayoutElement.cs:line 832

   at Telerik.Windows.Documents.Layout.DocumentLayoutBox.MeasureOverrideInternal(SizeF availableSize) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Layout\DocumentLayoutBox.cs:line 184

   at Telerik.Windows.Documents.Layout.DocumentLayoutBox.MeasureOverride(SizeF availableSize) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Layout\DocumentLayoutBox.cs:line 138

   at Telerik.Windows.Documents.Layout.LayoutElement.MeasureCore(SizeF availableSize) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Layout\LayoutElement.cs:line 929

   at Telerik.Windows.Documents.Layout.LayoutElement.Measure(SizeF availableSize) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Layout\LayoutElement.cs:line 832

   at Telerik.Windows.Documents.Model.RadDocument.Measure(SizeF measureSize) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Model\RadDocument.cs:line 1197

   at Telerik.Windows.Documents.UI.DocumentPrintLayoutPresenter.MeasureOverride(Size availableSize) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\UI\DocumentPrintLayoutPresenter.cs:line 675

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)

   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at System.Windows.ContextLayoutManager.UpdateLayout()

   at System.Windows.UIElement.UpdateLayout()

   at Telerik.Windows.Documents.UI.DocumentPresenterBase.Telerik.Windows.Controls.IDocumentEditorPresenter.UpdateLayout()

   at Telerik.Windows.Controls.RadRichTextBox.<>c__DisplayClass1e.<UpdateEditorLayout>b__1d() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\UI\RadRichTextBox.cs:line 3728

   at Telerik.Windows.Controls.RadRichTextBox.UpdateEditorLayout(Boolean focusCarret, Boolean updateCaretSize, Boolean async) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\UI\RadRichTextBox.cs:line 3743

   at Telerik.Windows.Controls.RadRichTextBox.UpdateEditorLayout(Boolean async) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\UI\RadRichTextBox.cs:line 3704

   at Telerik.Windows.Controls.RadRichTextBox.UpdateEditorLayout() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\UI\RadRichTextBox.cs:line 3695

   at Telerik.Windows.Controls.RadRichTextBox.document_LayoutModeChanged(Object sender, EventArgs e) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\UI\RadRichTextBox.cs:line 2312

   at Telerik.Windows.Documents.Model.RadDocument.OnLayoutModeChanged() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Model\RadDocument.cs:line 6681

   at Telerik.Windows.Documents.Model.RadDocument.set_LayoutMode(DocumentLayoutMode value) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\Model\RadDocument.cs:line 265

   at Telerik.Windows.Controls.RadRichTextBox.SynchDocumentMiscProperties() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\UI\RadRichTextBox.cs:line 2774

   at Telerik.Windows.Controls.RadRichTextBox.set_Document(RadDocument value) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Documents\Core\UI\RadRichTextBox.cs:line 1262

   at NBCU.SAFE.POC.DA.UI.Control.TelerikRadEditorControl.DocumentProperty_Changed(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e) in C:\TfsProj\MiG4\Architectural Prototype\Modules\NBCU.SAFE.POC.DA\NBCU.SAFE.POC.DA.UI\Control\TelerikRadEditorControl.xaml.cs:line 39

   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)

   at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)

   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)

   at System.Windows.Data.BindingExpression.ScheduleTransfer(Boolean isASubPropertyChange)

   at MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean dependencySourcesChanged, Boolean initialValue, Boolean isASubPropertyChange)

   at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)

   at MS.Internal.Data.ClrBindingWorker.OnSourcePropertyChanged(Object o, String propName)

   at MS.Internal.Data.PropertyPathWorker.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)

   at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)

   at System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged(Object sender, PropertyChangedEventArgs args)

   at NBCU.SAFE.POC.DA.UI.ViewModel.ClauseMaintenanceViewModel.OnPropertyChanged(String propertyName) in C:\TfsProj\MiG4\Architectural Prototype\Modules\NBCU.SAFE.POC.DA\NBCU.SAFE.POC.DA.UI\ViewModel\ClauseMaintenanceViewModel.cs:line 106

   at NBCU.SAFE.POC.DA.UI.ViewModel.ClauseMaintenanceViewModel.set_SelectedClauseItem(HierarchyViewModel value) in C:\TfsProj\MiG4\Architectural Prototype\Modules\NBCU.SAFE.POC.DA\NBCU.SAFE.POC.DA.UI\ViewModel\ClauseMaintenanceViewModel

And this is the code:
		private RadDocument GetRadDocument(IEnumerable table)
		{
			StyleDefinition customTableStyle = new StyleDefinition("MyCustomTableStyle"StyleType.Table);
			//customTableStyle.SpanProperties.FontSize = _exhibitTableInfo.point_size;
			//customTableStyle.SpanProperties.FontFamily = new FontFamily(_exhibitTableInfo.typeface);
			//customTableStyle.SpanProperties.FontWeight = _exhibitTableInfo.col_bold_flag == "Y" ? FontWeights.Bold : FontWeights.Normal;
			customTableStyle.BasedOnName = RadDocumentDefaultStyles.DefaultTableGridStyleName;
			StyleDefinition firstRowStyle = new StyleDefinition(StyleType.Table);
			//firstRowStyle.SpanProperties.FontWeight = _exhibitTableInfo.hdr_bold_flag == "Y" ? FontWeights.Bold : FontWeights.Normal;
			//if (_exhibitTableInfo.hdr_underlined_flag == "Y") firstRowStyle.SpanProperties.UnderlineDecoration = UnderlineTypes.Line;
			customTableStyle.ConditionalTableStylesCollection.Add(ConditionalTableStyleTypes.FirstRow, firstRowStyle);
 
			var radDocument = RadDocumentHelper.GetDefaultDocument();
			radDocument.StyleRepository.Add(customTableStyle);
			var radSection = new Section();
			var radTable = new Table();
			radTable.Style = customTableStyle;
			//radTable.Borders = new TableBorders(new Border(Convert.ToSingle(_exhibitTableInfo.cell_border_width), BorderStyle.Single, Colors.Black));
 
			//var type = GetTypeOfIEnumerable(table);
			//if (type != null) // probably no records in table, so no data to add to table
			//{
			//  properties = type.GetProperties().ToDictionary<PropertyInfo, string>(i => i.Name);
 
			//  radTable.Rows.Add(GetHeaderRow());
			//  foreach (var row in table) radTable.Rows.Add(GetDataRow(row));
			//}
 
			radDocument.Sections.Add(radSection);
			radSection.Blocks.Add(new Table());
			return radDocument;
		}
Clifford
Top achievements
Rank 1
 answered on 09 Dec 2013
8 answers
117 views
Trying to customize Styles/Template for RadDataForm using the Windows8Touch theme in Expression Blend. For some odd reason, the Header immediately disappears.

Any help?
Keaire
Top achievements
Rank 1
 answered on 09 Dec 2013
1 answer
153 views

I am creating a drag and drop dashboard page and I need some assistance with the drag and drop from RadTreeView to Grid.  My goal is to drag an item from the tree which is text base, and have it render a user control at the point of drop on the Grid.

I have been looking for an example of this with no luck and was hoping this is possible.  If it is possible do you have an example project that demonstrates this?

<Grid Name="cDashboardGrid" Background="White">

</Grid>

Yoan
Telerik team
 answered on 09 Dec 2013
4 answers
98 views
Hello,

i have a problem with the property FieldIndicatorVisibility. When i use RadPropertyGrid direct in my control, it works find, when i set FieldIndicatorVisibility="Collapsed". But when i define a DataTemplate, in which i use the RadPropertyGrid, and then use the DataTemplate in my control, the field indicator will always be shown.

Have you some suggestion for that? Thanks!

Ivan
Ivan
Top achievements
Rank 1
 answered on 09 Dec 2013
1 answer
97 views
Hi, 
    I have a gridview attached to the list of entities using MVVM pattern.
    If the user select the row, the color of the selected row is orange ( or gradient of the orange), but if the selection
    of the row is by code, the color is gray.

How can you let the same color for selection?

Thanks

 
Yoan
Telerik team
 answered on 09 Dec 2013
1 answer
201 views
I think this product does not meet my needs, but I would still like answers to the following questions. If there is a better product fit, please let me know. What I want is this HeatMap display in a 2D chart.

I need to display several hundred thousand points in a heatmap, possibly several million. The product page says HeatMap can "render an obscene amount of visual detail without slowing down and without sacrificing interactivity". I am not seeing this so I would like to know what I need to change. Using 120,000 points it is pretty slow.

I wonder if the problem is the column headers. I was hoping HeatMap would act like a chart and only display "axis labels" at appropriate points, not *all* of them.

Is there any way to zoom along the x-axis? With this many points, the user will want to zoom in on specific areas.

BTW, it would be nice if we could upload zip files of projects, not just code snippets.

Public Class TempInfo
    Public Property Timestamp As DateTime
    Public Property SensorIndex As Int32
    Public Property Temperature As Single
 
    Public Sub New(ByVal adTimestamp As DateTime, ByVal aiSensorIndex As Int32, ByVal afTemperature As Single)
        Timestamp = adTimestamp
        SensorIndex = aiSensorIndex
        Temperature = afTemperature
    End Sub
End Class
 
Class MainWindow
 
    Private Sub MainWindow_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
        Dim infos As New List(Of TempInfo)
        Dim loRandom As New Random
        For liDateCounter As Int32 = 1 To 10000
            For liSensorCounter As Int32 = 1 To 12
                infos.Add(New TempInfo(DateTime.Now.AddHours(liDateCounter), liSensorCounter, loRandom.Next(70, 90)))
            Next
        Next
 
        RadHeatMap1.Definition.ItemsSource = infos
    End Sub
End Class
 
<Window x:Class="MainWindow"
    Title="MainWindow" Height="350" Width="525" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <Grid>
        <telerik:RadHeatMap HorizontalAlignment="Stretch" Name="RadHeatMap1" VerticalAlignment="Stretch" SnapsToDevicePixels="True" UseLayoutRounding="True">
            <telerik:RadHeatMap.Definition>
                <telerik:CategoricalDefinition ItemsSource="{Binding}"
                                    RowGroupMemberPath="SensorIndex"
                                    ColumnGroupMemberPath="Timestamp"
                                    ValuePath="Temperature" />
            </telerik:RadHeatMap.Definition>
        </telerik:RadHeatMap>
    </Grid>
</Window>
Petar Marchev
Telerik team
 answered on 09 Dec 2013
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?