Telerik Forums
UI for WPF Forum
6 answers
303 views
Hi Telerik,

I can't seem to find the DropPosition when determining wheter a drop is allowed? Am I overlooking something? I can see the relative position and I guess I could calculate the relative position, but since the curson changes depending on drop position, I'm thinking the information is there somewhere...

Thnaks for any help,

Anders, Denmark
Tina Stancheva
Telerik team
 answered on 09 Apr 2012
1 answer
293 views
I've tried the demo and it opens and saves in html format perfectly.

This seems like a possibility in a case where you want to store a document as html format but allow rich editing and not have to rely on a web browser control for doing your editing.  For example a wpf app where you want users to be able to make and edit Wikipages inside the app but store them in html format for a web interface to the same app.

Can anyone confirm if they use it this way?
Boby
Telerik team
 answered on 09 Apr 2012
1 answer
147 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
344 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
161 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
255 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
337 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
143 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
284 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
237 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
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?