Telerik Forums
UI for WPF Forum
1 answer
113 views
I am trying to use the new DragAndDrop manager with the RadComboBox, I want to be able to drop an element from a treeview onto the ComboBox and apply a custom Drop Event that will select the dragged entity from the list. I have AllowDrop="True" on the ComboBox and I know the Treeview is set up correctly because I use it to drag to a ListBox. When the line DragDropManager.AddDropHandler(RadComboBoxBelongsTo, OnDrop); is run I get the error: Cannot find a Resource with the Name/Key DraggableItem. How do I drag to a RadComboBox??

Sorry, should have posted this on the Silverlight Forum, not sure if its the same for WPF.
Vlad
Telerik team
 answered on 09 Apr 2012
0 answers
310 views
Hi Telerik Team,

I'm trying to replace my wpf ListView with RadGridView 
but found error "The calling thread cannot access this object because a different thread owns it."

The c# code-behined are same, it's already work if I binding to ListView.

Please suggestion.

TestRadGridView example project. [http://yousend.it/HvZeCs]

Regards,
prasong242
Prasong242
Top achievements
Rank 1
 asked on 07 Apr 2012
1 answer
150 views
I created a simple project to address our problem with RadControls (Docking, RichTextBox and TreeView), could you provide me a support ticket so I can upload the zip file.  Thanks.
Pavel Pavlov
Telerik team
 answered on 07 Apr 2012
11 answers
234 views
I have two entities, for instance entityA and entityB inherited from entityB. In ObjectContext there is
ObjectSet<entityA> entityAs;
But I need an ObjectResult<entityB>, and has created this (custom) property on ObjectContext:
ObjectResult<entityB> entityBs
{ ... }
So when I user entityBs as QueryName in RadEntityFrameWorkDataSource (in XAML), then nearly all works fine except AddNew, because the QueryName is used for getting ObjectResult<> property value of ObjectContext, and for entitySetName.
Can I somehow enforce the real base entit class's set name for use as entitySetName, and (any) ObjectQuery as object query used to create QueryabelEntityCollection?

It is not a solution, when I use for QueryName the base ObjectSet's name (and approperiate FilterDescription), because the AddNew produce a base class instance not a derived class's one. 

(ok, I can create manually QueryabelEntityCollection<entityB>, but it is not real beuty solution :))
Kovács
Top achievements
Rank 1
 answered on 06 Apr 2012
1 answer
305 views
I would like to disable Keyboard focus for the RichTextBox.
My RichTextBox is acting more like a viewer, with possibility to select text but not edit.
When I use snoop to check te keyboard focus on my application, I see Keyboard.FocusedElement = Caret
I'm experiencing difficulties disabling this focus.

When I execute UIElement.MoveFocus(new TraversalRequest(FocusNavigationDirection.Up)) I can't either move the focus
Andrew
Telerik team
 answered on 06 Apr 2012
1 answer
126 views
Hello,

I've got a Problem with the New Q1 2012 WPF RadTileView.
If i user the TileStateChanged Event (Online Doc), and set the FluidControl State Manualy to Large,Small, Normal, the layout looks Broken (File q12012.png , Version: 2012.1.215.40).
If i run exactly the same Code with the old Assemblys (2010.3.1110.40), the Layout looks correct.

The Animation of the TileItem are also Smoother in the Older Release as in the new one.

Is there any Workaround, for solving this Problem, or is it simply a Bug?

Greetings

Alfred



Zarko
Telerik team
 answered on 06 Apr 2012
4 answers
249 views
Hi,

I'm creating a chart that is based off the MeteoChart example. Specifically, I'm using the same concepts as the SplineLabelStyle in the MeteoChart to display custom icons overriding the default item label.

The MeteoChart has the following XAML to style the SeriesItemLabel with a custom control template that contains custom icons:
<Style x:Key="SplineLabelStyle" TargetType="charting:SeriesItemLabel">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="charting:SeriesItemLabel">
                <Canvas>
                    <Border x:Name="PART_TextContainer">
                        <Image x:Name="PART_Image"
                              Source="{Binding DataItem.WeatherImageSource}" />
                    </Border>
                </Canvas>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

What I'd like to do is add a tooltip to this image to display more information, ie:
<Style x:Key="SplineLabelStyle" TargetType="charting:SeriesItemLabel">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="charting:SeriesItemLabel">
                <Canvas>
                    <Border x:Name="PART_TextContainer">
                        <Image x:Name="PART_Image"
                              Source="{Binding DataItem.WeatherImageSource}"
                              ToolTip="{Binding DataItem.WeatherConditions}" />
                    </Border>
                </Canvas>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

The problem is that the above XAML doesn't work. While the example runs, tooltips are not displayed when hovering over the icon. I've tried shifting the tooltip to the canvas instead and even tried displaying fixed text as the tooltip, however none of these alternatives get tooltips to display.

I would like to display the tooltip on the customized item label because:
  1. these labels are easier targets to hover over instead of point marks,
  2. the labels are displayed in a different location to the point mark, and finally
  3. I'm actually hiding the point mark in my actual scenario (I'm just displaying the icons).

How can I define tooltips for custom item labels?

Alternatively, how can I customize the PointMarkItemStyle to display custom icons (and then I can use the default item tooltip provided).

Kind regards,
Dave.

Evgenia
Telerik team
 answered on 06 Apr 2012
1 answer
199 views
I am doing a search/replace in code using the RadDocument and I am getting a strange null error.

Here is the code:
doc.Selection.Clear();
            DocumentTextSearch search = new DocumentTextSearch(doc);
            var rangesTrackingDocumentChanges = new List<TextRange>();
            var resultRanges = search.FindAll(searchText);
 
            foreach (var textRange in resultRanges)
            {
                TextRange newRange = new TextRange(new DocumentPosition(textRange.StartPosition, true), new DocumentPosition(textRange.EndPosition, true));
                rangesTrackingDocumentChanges.Add(newRange);
            }
 
            foreach (var textRange in rangesTrackingDocumentChanges)
            {
                doc.CaretPosition.MoveToPosition(textRange.StartPosition);
                doc.DeleteRange(textRange.StartPosition, textRange.EndPosition);
                doc.Insert(mergeText, new Telerik.Windows.Documents.Model.Styles.StyleDefinition());
                textRange.StartPosition.Dispose();
                textRange.EndPosition.Dispose();
            }


When the RadDocument is simple,this works fine, however, when I put the Merge fields in Tables, it is throwing an error on the search.FindAll() method:

System.NullReferenceException: Object reference not set to an instance of an object.
  "   at Telerik.Windows.Documents.TextSearch.DocumentTextMap.MoveToFirstBoxInWord(DocumentPosition position) in c:\\TB\\102\\WPF_Scrum\\Release_WPF\\Sources\\Development\\Documents\\Core\\TextSearch\\DocumentTextMap.cs:line 313\r\n   at Telerik.Windows.Documents.TextSearch.DocumentTextMap.InitMap(DocumentPosition fromPosition, DocumentPosition toPosition) in c:\\TB\\102\\WPF_Scrum\\Release_WPF\\Sources\\Development\\Documents\\Core\\TextSearch\\DocumentTextMap.cs:line 115\r\n   at Telerik.Windows.Documents.TextSearch.DocumentTextSearch.FindInternal(String regEx, DocumentPosition fromPosition, DocumentPosition toPosition, Boolean findFirst) in c:\\TB\\102\\WPF_Scrum\\Release_WPF\\Sources\\Development\\Documents\\Core\\TextSearch\\DocumentTextSearch.cs:line 90\r\n   at Telerik.Windows.Documents.TextSearch.DocumentTextSearch.FindAll(String regEx) in c:\\TB\\102\\WPF_Scrum\\Release_WPF\\Sources\\Development\\Documents\\Core\\TextSearch\\DocumentTextSearch.cs:line 52\r\n   at Service.ServiceHandler.Documentation.DocDataMgr.MergeText(RadDocument doc, String mergeName, String mergeText) in N:\\BMS\\svn_r3\\Rf3Db\\Service\\ServiceHandler\\Documentation\\DocDataMgr.cs:line 947"

Here is the text I am searching for:   "{ MERGEFIELD TmHeader }"

Here is the RadDocument:  
"<t:RadDocument xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:t=\"clr-namespace:Telerik.Windows.Documents.Model;assembly=Telerik.Windows.Documents\" xmlns:s=\"clr-namespace:Telerik.Windows.Documents.Model.Styles;assembly=Telerik.Windows.Documents\" version=\"1.2\" LayoutMode=\"Flow\" LineSpacing=\"1.14999997615814\" LineSpacingType=\"Auto\" ParagraphDefaultSpacingAfter=\"12\" ParagraphDefaultSpacingBefore=\"0\" SectionDefaultPageSize=\"816,1056\" StyleName=\"defaultDocumentStyle\">\r\n  <t:RadDocument.ProtectionSettings>\r\n    <t:DocumentProtectionSettings EnableDocumentProtection=\"False\" Enforce=\"False\" HashingAlgorithm=\"None\" HashingSpinCount=\"0\" ProtectionMode=\"ReadOnly\" />\r\n  </t:RadDocument.ProtectionSettings>\r\n  <t:RadDocument.Styles>\r\n    <s:StyleDefinition DisplayName=\"Document Default Style\" IsCustom=\"False\" IsDefault=\"False\" IsPrimary=\"True\" Name=\"defaultDocumentStyle\" Type=\"Default\">\r\n      <s:StyleDefinition.ParagraphStyle>\r\n        <s:ParagraphProperties LineSpacing=\"1.14999997615814\" SpacingAfter=\"12\" />\r\n      </s:StyleDefinition.ParagraphStyle>\r\n      <s:StyleDefinition.SpanStyle>\r\n        <s:SpanProperties FontFamily=\"Verdana\" FontSize=\"16\" FontStyle=\"Normal\" FontWeight=\"Normal\" />\r\n      </s:StyleDefinition.SpanStyle>\r\n    </s:StyleDefinition>\r\n    <s:StyleDefinition BasedOnName=\"TableNormal\" DisplayName=\"TableGrid\" IsCustom=\"False\" IsDefault=\"False\" IsPrimary=\"True\" Name=\"TableGrid\" Type=\"Table\">\r\n      <s:StyleDefinition.ParagraphStyle>\r\n        <s:ParagraphProperties LineSpacing=\"1\" SpacingAfter=\"0\" />\r\n      </s:StyleDefinition.ParagraphStyle>\r\n      <s:StyleDefinition.TableStyle>\r\n        <s:TableProperties Borders=\"1,Single,#FF000000\" />\r\n      </s:StyleDefinition.TableStyle>\r\n    </s:StyleDefinition>\r\n    <s:StyleDefinition DisplayName=\"TableNormal\" IsCustom=\"False\" IsDefault=\"True\" IsPrimary=\"True\" Name=\"TableNormal\" Type=\"Table\" />\r\n  </t:RadDocument.Styles>\r\n  <t:Section>\r\n    <t:Paragraph TextAlignment=\"Left\">\r\n      <t:Paragraph.TabStops>\r\n        <t:TabStop Position=\"208\" TabStopType=\"Left\" />\r\n      </t:Paragraph.TabStops>\r\n    </t:Paragraph>\r\n    <t:Paragraph TextAlignment=\"Left\">\r\n      <t:Paragraph.TabStops>\r\n        <t:TabStop Position=\"208\" TabStopType=\"Left\" />\r\n      </t:Paragraph.TabStops>\r\n      <t:Span Text=\"{}{ MERGEFIELD TmDate } { MERGEFIELD TmLeft }{ MERGEFIELD TmRight }\" />\r\n    </t:Paragraph>\r\n    <t:Paragraph TextAlignment=\"Left\">\r\n      <t:Paragraph.TabStops>\r\n        <t:TabStop Position=\"208\" TabStopType=\"Left\" />\r\n      </t:Paragraph.TabStops>\r\n    </t:Paragraph>\r\n    <t:Table GridColumnWidthsSerializationInfo=\"\" LayoutMode=\"AutoFit\" PreferredWidth=\"Auto\" StyleName=\"TableGrid\" TableIndent=\"0\">\r\n      <t:TableRow>\r\n        <t:TableCell ColumnSpan=\"1\" RowSpan=\"1\">\r\n          <t:Paragraph>\r\n            <t:Span Text=\" { MERGEFIELD TmHeader } \" />\r\n          </t:Paragraph>\r\n        </t:TableCell>\r\n        <t:TableCell ColumnSpan=\"1\" RowSpan=\"1\">\r\n          <t:Paragraph />\r\n        </t:TableCell>\r\n        <t:TableCell ColumnSpan=\"1\" RowSpan=\"1\">\r\n          <t:Paragraph />\r\n        </t:TableCell>\r\n      </t:TableRow>\r\n      <t:TableRow>\r\n        <t:TableCell ColumnSpan=\"1\" RowSpan=\"1\">\r\n          <t:Paragraph />\r\n        </t:TableCell>\r\n        <t:TableCell ColumnSpan=\"1\" RowSpan=\"1\">\r\n          <t:Paragraph />\r\n        </t:TableCell>\r\n        <t:TableCell ColumnSpan=\"1\" RowSpan=\"1\">\r\n          <t:Paragraph />\r\n        </t:TableCell>\r\n      </t:TableRow>\r\n    </t:Table>\r\n    <t:Paragraph TextAlignment=\"Left\">\r\n      <t:Paragraph.TabStops>\r\n        <t:TabStop Position=\"208\" TabStopType=\"Left\" />\r\n      </t:Paragraph.TabStops>\r\n    </t:Paragraph>\r\n  </t:Section>\r\n</t:RadDocument>"

Martin Ivanov
Telerik team
 answered on 06 Apr 2012
3 answers
99 views
Hello,

I'm looking to stack a chart on top of an existing chart, that scrolls along the same timeline as the bottom chart.  Something like this:

http://www.google.com/finance?q=NASDAQ%3AMSFT

Any guidance on how to do this?

Thank you,
Michael
Bartholomeo Rocca
Top achievements
Rank 1
 answered on 06 Apr 2012
1 answer
143 views
How do I format the GanttView Columns displaying Custom formats?
I have try to set the StringFormat like this:
<telerik:ColumnDefinition MemberBinding="{Binding End , StringFormat={}{0:d}}" Header="End" ColumnWidth="100" >
                     <telerik:ColumnDefinition.CellEditTemplate>
                     <DataTemplate>
                         <telerik:RadDatePicker SelectedValue="{Binding End,Mode=TwoWay}" />
                     </DataTemplate>
                 </telerik:ColumnDefinition.CellEditTemplate>
             </telerik:ColumnDefinition>

But it does not work.

As a workaround i have done following in my custom tasks class:
public String End_str
{
    get
    {
        return base.End.ToString("yyyy-MM-dd"); 
    }
}



Br /Sture
Miroslav Nedyalkov
Telerik team
 answered on 06 Apr 2012
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
Book
FileDialogs
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
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?